diff --git a/.changeset/breezy-suits-float.md b/.changeset/breezy-suits-float.md new file mode 100644 index 00000000000..60e061223d8 --- /dev/null +++ b/.changeset/breezy-suits-float.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +#added address book remove feature diff --git a/.changeset/purple-seas-help.md b/.changeset/purple-seas-help.md new file mode 100644 index 00000000000..01f8b0049b6 --- /dev/null +++ b/.changeset/purple-seas-help.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +#removed unused key files and move public_key test file. diff --git a/.changeset/seven-schools-invent.md b/.changeset/seven-schools-invent.md new file mode 100644 index 00000000000..81b6ce44b99 --- /dev/null +++ b/.changeset/seven-schools-invent.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +Integration tests for USDC token transfer #internal diff --git a/.changeset/tame-tomatoes-refuse.md b/.changeset/tame-tomatoes-refuse.md new file mode 100644 index 00000000000..530f9d2b519 --- /dev/null +++ b/.changeset/tame-tomatoes-refuse.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +#added feat: support creating solana chain config in job distributor page diff --git a/.changeset/weak-weeks-grin.md b/.changeset/weak-weeks-grin.md new file mode 100644 index 00000000000..df03df2303c --- /dev/null +++ b/.changeset/weak-weeks-grin.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +Bump Solana to include MultiNode integration. #added diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index d6b47cef2ae..210709443be 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -99,6 +99,7 @@ core/scripts/gateway @smartcontractkit/dev-services # TODO: transmission folder, owner should be found /contracts/src/v0.8/vrf @smartcontractkit/dev-services /contracts/src/v0.8/keystone @smartcontractkit/keystone +/contracts/src/v0.8/workflow @smartcontractkit/dev-services /core/gethwrappers/ccip @smartcontractkit/ccip-onchain /core/gethwrappers/functions @smartcontractkit/dev-services @@ -107,6 +108,7 @@ core/scripts/gateway @smartcontractkit/dev-services /core/gethwrappers/llo-feeds @smartcontractkit/data-streams-engineers /core/gethwrappers/operatorforwarder @smartcontractkit/data-feeds-engineers /core/gethwrappers/shared @smartcontractkit/core-solidity +/core/gethwrappers/workflow @smartcontractkit/dev-services # The following don't exist yet but should. They are already included here to allow the teams to # set these folders up and own them immediately. diff --git a/.github/e2e-tests.yml b/.github/e2e-tests.yml index aee250420e0..912d7f01f89 100644 --- a/.github/e2e-tests.yml +++ b/.github/e2e-tests.yml @@ -943,7 +943,7 @@ runner-test-matrix: - PR E2E Core Tests - Merge Queue E2E Core Tests - Nightly E2E Tests - test_cmd: cd integration-tests/ && go test smoke/ccip_test.go -timeout 12m -test.parallel=1 -count=1 -json + test_cmd: cd integration-tests/ && go test smoke/ccip_test.go -timeout 12m -test.parallel=2 -count=1 -json pyroscope_env: ci-smoke-ccipv1_6-evm-simulated test_env_vars: E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2 @@ -963,6 +963,34 @@ runner-test-matrix: E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2 E2E_JD_VERSION: 0.4.0 + - id: smoke/ccip_usdc_test.go:* + path: integration-tests/smoke/ccip_usdc_test.go + test_env_type: docker + runs_on: ubuntu-latest + triggers: + - PR E2E Core Tests + - Merge Queue E2E Core Tests + - Nightly E2E Tests + test_cmd: cd integration-tests/ && go test smoke/ccip_usdc_test.go -timeout 12m -test.parallel=1 -count=1 -json + pyroscope_env: ci-smoke-ccipv1_6-evm-simulated + test_env_vars: + E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2 + E2E_JD_VERSION: 0.4.0 + + - id: smoke/fee_boosting_test.go:* + path: integration-tests/smoke/fee_boosting_test.go + test_env_type: docker + runs_on: ubuntu-latest + triggers: + - PR E2E Core Tests + - Merge Queue E2E Core Tests + - Nightly E2E Tests + test_cmd: cd integration-tests/ && go test smoke/fee_boosting_test.go -timeout 15m -test.parallel=1 -count=1 -json + pyroscope_env: ci-smoke-ccipv1_6-evm-simulated + test_env_vars: + E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2 + E2E_JD_VERSION: 0.4.0 + # END: CCIPv1.6 tests # START: CCIP tests diff --git a/.github/workflows/automation-benchmark-tests.yml b/.github/workflows/automation-benchmark-tests.yml index 3a07ecefaa0..9a4a127dede 100644 --- a/.github/workflows/automation-benchmark-tests.yml +++ b/.github/workflows/automation-benchmark-tests.yml @@ -24,7 +24,7 @@ on: jobs: run-e2e-tests-workflow: name: Run E2E Tests - uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@f1f2dac0a20f0e02408eb7f528c768fe95c39229 + uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@5412507526722a7b1c5d719fa686eed5a1bc4035 # ctf-run-tests@0.2.0 with: test_path: .github/e2e-tests.yml test_ids: '${{ inputs.testType }}/automation_test.go:TestAutomationBenchmark' diff --git a/.github/workflows/automation-load-tests.yml b/.github/workflows/automation-load-tests.yml index 71bfbfa029e..24c7017ee9a 100644 --- a/.github/workflows/automation-load-tests.yml +++ b/.github/workflows/automation-load-tests.yml @@ -19,7 +19,7 @@ on: jobs: run-e2e-tests-workflow: name: Run E2E Tests - uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@f1f2dac0a20f0e02408eb7f528c768fe95c39229 + uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@5412507526722a7b1c5d719fa686eed5a1bc4035 # ctf-run-tests@0.2.0 with: test_path: .github/e2e-tests.yml test_ids: 'load/automationv2_1/automationv2_1_test.go:TestLogTrigger' diff --git a/.github/workflows/automation-nightly-tests.yml b/.github/workflows/automation-nightly-tests.yml index 222eac2e75b..c184021f028 100644 --- a/.github/workflows/automation-nightly-tests.yml +++ b/.github/workflows/automation-nightly-tests.yml @@ -10,7 +10,7 @@ on: jobs: run-e2e-tests-workflow: name: Run E2E Tests - uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@f1f2dac0a20f0e02408eb7f528c768fe95c39229 + uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@5412507526722a7b1c5d719fa686eed5a1bc4035 # ctf-run-tests@0.2.0 with: test_path: .github/e2e-tests.yml test_trigger: Automation Nightly Tests diff --git a/.github/workflows/automation-ondemand-tests.yml b/.github/workflows/automation-ondemand-tests.yml index f85a1330e6e..c72715bf9db 100644 --- a/.github/workflows/automation-ondemand-tests.yml +++ b/.github/workflows/automation-ondemand-tests.yml @@ -153,7 +153,7 @@ jobs: call-run-e2e-tests-workflow: name: Run E2E Tests needs: set-tests-to-run - uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@f1f2dac0a20f0e02408eb7f528c768fe95c39229 + uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@5412507526722a7b1c5d719fa686eed5a1bc4035 # ctf-run-tests@0.2.0 with: test_path: .github/e2e-tests.yml test_list: ${{ needs.set-tests-to-run.outputs.test_list }} diff --git a/.github/workflows/ccip-chaos-tests.yml b/.github/workflows/ccip-chaos-tests.yml index 29d41267f1e..14754ee5283 100644 --- a/.github/workflows/ccip-chaos-tests.yml +++ b/.github/workflows/ccip-chaos-tests.yml @@ -15,8 +15,7 @@ concurrency: jobs: run-e2e-tests-workflow: name: Run E2E Tests - uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@f1f2dac0a20f0e02408eb7f528c768fe95c39229 - with: + uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@5412507526722a7b1c5d719fa686eed5a1bc4035 # ctf-run-tests@0.2.0 test_path: .github/e2e-tests.yml chainlink_version: ${{ github.sha }} require_chainlink_image_versions_in_qa_ecr: ${{ github.sha }} diff --git a/.github/workflows/ccip-load-tests.yml b/.github/workflows/ccip-load-tests.yml index 038888f8049..4f5b7ac509c 100644 --- a/.github/workflows/ccip-load-tests.yml +++ b/.github/workflows/ccip-load-tests.yml @@ -31,7 +31,7 @@ concurrency: jobs: run-e2e-tests-workflow: name: Run E2E Tests - uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@f1f2dac0a20f0e02408eb7f528c768fe95c39229 + uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@5412507526722a7b1c5d719fa686eed5a1bc4035 # ctf-run-tests@0.2.0 with: test_path: .github/e2e-tests.yml test_trigger: E2E CCIP Load Tests diff --git a/.github/workflows/delete-caches.yml b/.github/workflows/delete-caches.yml index aaba0dda623..64b9e799665 100644 --- a/.github/workflows/delete-caches.yml +++ b/.github/workflows/delete-caches.yml @@ -24,10 +24,14 @@ jobs: uses: actions/checkout@v4.1.2 - name: Setup gh-actions-cache extension + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: gh extension install actions/gh-actions-cache - name: Retrieve Trunk SHA id: get-sha + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | SHA=$(gh pr view -R $REPO $PR_NUMBER --json mergeCommit --jq .mergeCommit.oid) echo "sha=$SHA" >> $GITHUB_OUTPUT diff --git a/.github/workflows/find-new-flaky-tests.yml b/.github/workflows/find-new-flaky-tests.yml index c9a015206fd..363305af468 100644 --- a/.github/workflows/find-new-flaky-tests.yml +++ b/.github/workflows/find-new-flaky-tests.yml @@ -100,7 +100,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@9da200418b01268201a0e6477832734a14720d07 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@9c9821d6013f4838eb26970c2eef594f4d25398b - name: Find new or updated test packages if: ${{ inputs.runAllTests == false }} @@ -259,7 +259,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@9da200418b01268201a0e6477832734a14720d07 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@9c9821d6013f4838eb26970c2eef594f4d25398b - name: Run tests with flakeguard shell: bash @@ -301,7 +301,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@9da200418b01268201a0e6477832734a14720d07 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@9c9821d6013f4838eb26970c2eef594f4d25398b - name: Set combined test results id: set_test_results diff --git a/.github/workflows/integration-chaos-tests.yml b/.github/workflows/integration-chaos-tests.yml index 3be161005f8..314e54a1ab8 100644 --- a/.github/workflows/integration-chaos-tests.yml +++ b/.github/workflows/integration-chaos-tests.yml @@ -10,7 +10,7 @@ on: jobs: run-e2e-tests-workflow: name: Run E2E Tests - uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@f1f2dac0a20f0e02408eb7f528c768fe95c39229 + uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@5412507526722a7b1c5d719fa686eed5a1bc4035 # ctf-run-tests@0.2.0 with: test_path: .github/e2e-tests.yml chainlink_version: ${{ github.sha }} diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 52c8e8f71b2..08383aed12d 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -210,7 +210,7 @@ jobs: contents: read needs: [build-chainlink, changes] if: github.event_name == 'pull_request' && ( needs.changes.outputs.core_changes == 'true' || needs.changes.outputs.github_ci_changes == 'true') - uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@5412507526722a7b1c5d719fa686eed5a1bc4035 #ctf-run-tests@0.2.0 + uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@5412507526722a7b1c5d719fa686eed5a1bc4035 # ctf-run-tests@0.2.0 with: workflow_name: Run Core E2E Tests For PR chainlink_version: ${{ inputs.evm-ref || github.sha }} @@ -251,7 +251,7 @@ jobs: contents: read needs: [build-chainlink, changes] if: github.event_name == 'merge_group' && ( needs.changes.outputs.core_changes == 'true' || needs.changes.outputs.github_ci_changes == 'true') - uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@ca50645120f0f07ed8c0df08175a5d6b3e4ac454 #ctf-run-tests@0.1.2 + uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@5412507526722a7b1c5d719fa686eed5a1bc4035 # ctf-run-tests@0.2.0 with: workflow_name: Run Core E2E Tests For Merge Queue chainlink_version: ${{ inputs.evm-ref || github.sha }} @@ -296,7 +296,7 @@ jobs: contents: read needs: [build-chainlink, changes] if: github.event_name == 'pull_request' && (needs.changes.outputs.ccip_changes == 'true' || needs.changes.outputs.github_ci_changes == 'true') - uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@ca50645120f0f07ed8c0df08175a5d6b3e4ac454 #ctf-run-tests@0.1.2 + uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@5412507526722a7b1c5d719fa686eed5a1bc4035 # ctf-run-tests@0.2.0 with: workflow_name: Run CCIP E2E Tests For PR chainlink_version: ${{ inputs.evm-ref || github.sha }} @@ -337,7 +337,7 @@ jobs: contents: read needs: [build-chainlink, changes] if: github.event_name == 'merge_group' && (needs.changes.outputs.ccip_changes == 'true' || needs.changes.outputs.github_ci_changes == 'true') - uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@ca50645120f0f07ed8c0df08175a5d6b3e4ac454 #ctf-run-tests@0.1.2 + uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@5412507526722a7b1c5d719fa686eed5a1bc4035 # ctf-run-tests@0.2.0 with: workflow_name: Run CCIP E2E Tests For Merge Queue chainlink_version: ${{ inputs.evm-ref || github.sha }} diff --git a/.github/workflows/on-demand-ocr-soak-test.yml b/.github/workflows/on-demand-ocr-soak-test.yml index a96c000fa44..ac97d3c6355 100644 --- a/.github/workflows/on-demand-ocr-soak-test.yml +++ b/.github/workflows/on-demand-ocr-soak-test.yml @@ -39,7 +39,7 @@ on: jobs: run-e2e-tests-workflow: name: Run E2E Tests - uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@f1f2dac0a20f0e02408eb7f528c768fe95c39229 + uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@5412507526722a7b1c5d719fa686eed5a1bc4035 # ctf-run-tests@0.2.0 with: test_path: .github/e2e-tests.yml test_ids: ${{ inputs.testToRun}} diff --git a/.github/workflows/on-demand-vrfv2-performance-test.yml b/.github/workflows/on-demand-vrfv2-performance-test.yml index 0a9cec3db93..aadef377718 100644 --- a/.github/workflows/on-demand-vrfv2-performance-test.yml +++ b/.github/workflows/on-demand-vrfv2-performance-test.yml @@ -67,7 +67,7 @@ jobs: run-e2e-tests-workflow: name: Run E2E Tests needs: set-tests-to-run - uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@f1f2dac0a20f0e02408eb7f528c768fe95c39229 + uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@5412507526722a7b1c5d719fa686eed5a1bc4035 # ctf-run-tests@0.2.0 with: custom_test_list_json: ${{ needs.set-tests-to-run.outputs.test_list }} chainlink_version: ${{ inputs.chainlink_version }} diff --git a/.github/workflows/on-demand-vrfv2-smoke-tests.yml b/.github/workflows/on-demand-vrfv2-smoke-tests.yml index fcb083df708..4ebc38a8081 100644 --- a/.github/workflows/on-demand-vrfv2-smoke-tests.yml +++ b/.github/workflows/on-demand-vrfv2-smoke-tests.yml @@ -70,7 +70,7 @@ jobs: run-e2e-tests-workflow: name: Run E2E Tests needs: set-tests-to-run - uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@f1f2dac0a20f0e02408eb7f528c768fe95c39229 + uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@5412507526722a7b1c5d719fa686eed5a1bc4035 # ctf-run-tests@0.2.0 with: custom_test_list_json: ${{ needs.set-tests-to-run.outputs.test_list }} chainlink_version: ${{ inputs.chainlink_version }} diff --git a/.github/workflows/on-demand-vrfv2plus-performance-test.yml b/.github/workflows/on-demand-vrfv2plus-performance-test.yml index 534aea3d27d..f6d120ac178 100644 --- a/.github/workflows/on-demand-vrfv2plus-performance-test.yml +++ b/.github/workflows/on-demand-vrfv2plus-performance-test.yml @@ -67,7 +67,7 @@ jobs: run-e2e-tests-workflow: name: Run E2E Tests needs: set-tests-to-run - uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@f1f2dac0a20f0e02408eb7f528c768fe95c39229 + uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@5412507526722a7b1c5d719fa686eed5a1bc4035 # ctf-run-tests@0.2.0 with: custom_test_list_json: ${{ needs.set-tests-to-run.outputs.test_list }} chainlink_version: ${{ inputs.chainlink_version }} diff --git a/.github/workflows/on-demand-vrfv2plus-smoke-tests.yml b/.github/workflows/on-demand-vrfv2plus-smoke-tests.yml index 9137cc64d98..af26c527988 100644 --- a/.github/workflows/on-demand-vrfv2plus-smoke-tests.yml +++ b/.github/workflows/on-demand-vrfv2plus-smoke-tests.yml @@ -70,7 +70,7 @@ jobs: run-e2e-tests-workflow: name: Run E2E Tests needs: set-tests-to-run - uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@f1f2dac0a20f0e02408eb7f528c768fe95c39229 + uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@5412507526722a7b1c5d719fa686eed5a1bc4035 # ctf-run-tests@0.2.0 with: custom_test_list_json: ${{ needs.set-tests-to-run.outputs.test_list }} chainlink_version: ${{ inputs.chainlink_version }} diff --git a/.github/workflows/run-nightly-e2e-tests.yml b/.github/workflows/run-nightly-e2e-tests.yml index 0637363ca76..eba1108f89f 100644 --- a/.github/workflows/run-nightly-e2e-tests.yml +++ b/.github/workflows/run-nightly-e2e-tests.yml @@ -20,7 +20,7 @@ on: jobs: call-run-e2e-tests-workflow: name: Run E2E Tests - uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@f1f2dac0a20f0e02408eb7f528c768fe95c39229 + uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@5412507526722a7b1c5d719fa686eed5a1bc4035 # ctf-run-tests@0.2.0 with: chainlink_version: ${{ inputs.chainlink_version || 'develop' }} test_path: .github/e2e-tests.yml diff --git a/.github/workflows/run-selected-e2e-tests.yml b/.github/workflows/run-selected-e2e-tests.yml index b53bc756f4d..0e7c97c67fc 100644 --- a/.github/workflows/run-selected-e2e-tests.yml +++ b/.github/workflows/run-selected-e2e-tests.yml @@ -35,7 +35,7 @@ run-name: ${{ inputs.workflow_run_name }} jobs: call-run-e2e-tests-workflow: name: Run E2E Tests - uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@f1f2dac0a20f0e02408eb7f528c768fe95c39229 + uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@5412507526722a7b1c5d719fa686eed5a1bc4035 # ctf-run-tests@0.2.0 with: chainlink_version: ${{ github.event.inputs.chainlink_version }} test_path: .github/e2e-tests.yml diff --git a/.github/workflows/solidity-foundry-artifacts.yml b/.github/workflows/solidity-foundry-artifacts.yml index f8a57e3f1c7..5a971f65174 100644 --- a/.github/workflows/solidity-foundry-artifacts.yml +++ b/.github/workflows/solidity-foundry-artifacts.yml @@ -18,6 +18,7 @@ on: - "shared" - "transmission" - "vrf" + - "workflow" commit_to_use: type: string description: 'commit SHA to use for artifact generation; if empty HEAD will be used' diff --git a/.github/workflows/solidity-foundry.yml b/.github/workflows/solidity-foundry.yml index dd331730405..efbdd77ccb5 100644 --- a/.github/workflows/solidity-foundry.yml +++ b/.github/workflows/solidity-foundry.yml @@ -39,7 +39,8 @@ jobs: { "name": "operatorforwarder", "setup": { "run-coverage": true, "min-coverage": 55.7, "run-gas-snapshot": true, "run-forge-fmt": false }}, { "name": "shared", "setup": { "run-coverage": true, "extra-coverage-params": "--no-match-path='*CallWithExactGas*' --ir-minimum", "min-coverage": 32.6, "run-gas-snapshot": true, "run-forge-fmt": false }}, { "name": "transmission", "setup": { "run-coverage": true, "min-coverage": 61.5, "run-gas-snapshot": true, "run-forge-fmt": false }}, - { "name": "vrf", "setup": { "run-coverage": false, "min-coverage": 98.5, "run-gas-snapshot": false, "run-forge-fmt": false }} + { "name": "vrf", "setup": { "run-coverage": false, "min-coverage": 98.5, "run-gas-snapshot": false, "run-forge-fmt": false }}, + { "name": "workflow", "setup": { "run-coverage": true, "extra-coverage-params": "--ir-minimum", "min-coverage": 65.0, "run-gas-snapshot": false, "run-forge-fmt": true }} ] EOF @@ -73,7 +74,7 @@ jobs: uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes with: - list-files: 'shell' + list-files: "shell" filters: | non_src: - '.github/workflows/solidity-foundry.yml' @@ -113,12 +114,14 @@ jobs: - 'contracts/src/v0.8/vendor/**/*.sol' transmission: - 'contracts/src/v0.8/transmission/**/*.sol' + workflow: + - 'contracts/src/v0.8/workflow/**/*.sol' - name: Detect non-test changes uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes-non-test with: - list-files: 'shell' + list-files: "shell" # This is a valid input, see https://github.com/dorny/paths-filter/pull/226 predicate-quantifier: every filters: | @@ -148,7 +151,8 @@ jobs: # passing required check for PRs that don't have filtered changes. steps: - name: Checkout the repo - if: ${{ contains(fromJson(needs.changes.outputs.all_changes), matrix.product.name) + if: + ${{ contains(fromJson(needs.changes.outputs.all_changes), matrix.product.name) || contains(fromJson(needs.changes.outputs.all_changes), 'shared') || needs.changes.outputs.non_src_changes == 'true' }} uses: actions/checkout@v4.2.1 @@ -159,7 +163,8 @@ jobs: # and not native Foundry. This is to make sure the dependencies # stay in sync. - name: Setup NodeJS - if: ${{ contains(fromJson(needs.changes.outputs.all_changes), matrix.product.name) + if: + ${{ contains(fromJson(needs.changes.outputs.all_changes), matrix.product.name) || contains(fromJson(needs.changes.outputs.all_changes), 'shared') || needs.changes.outputs.non_src_changes == 'true' }} uses: ./.github/actions/setup-nodejs @@ -167,7 +172,8 @@ jobs: prod: "true" - name: Install Foundry - if: ${{ contains(fromJson(needs.changes.outputs.all_changes), matrix.product.name) + if: + ${{ contains(fromJson(needs.changes.outputs.all_changes), matrix.product.name) || contains(fromJson(needs.changes.outputs.all_changes), 'shared') || needs.changes.outputs.non_src_changes == 'true' }} uses: foundry-rs/foundry-toolchain@8f1998e9878d786675189ef566a2e4bf24869773 # v1.2.0 @@ -179,7 +185,8 @@ jobs: # In order to avoid it, in such cases we will extract all required solc versions manually and install them sequentially. # More information: https://github.com/foundry-rs/foundry/issues/4736 - name: Check if Solc version is set in foundry.toml - if: ${{ contains(fromJson(needs.changes.outputs.all_changes), matrix.product.name) + if: + ${{ contains(fromJson(needs.changes.outputs.all_changes), matrix.product.name) || contains(fromJson(needs.changes.outputs.all_changes), 'shared') || needs.changes.outputs.non_src_changes == 'true' }} shell: bash @@ -228,7 +235,8 @@ jobs: fi - name: Run Forge build - if: ${{ contains(fromJson(needs.changes.outputs.all_changes), matrix.product.name) + if: + ${{ contains(fromJson(needs.changes.outputs.all_changes), matrix.product.name) || contains(fromJson(needs.changes.outputs.all_changes), 'shared') || needs.changes.outputs.non_src_changes == 'true' }} run: | @@ -240,7 +248,8 @@ jobs: FOUNDRY_PROFILE: ${{ matrix.product.name }} - name: Run Forge tests - if: ${{ contains(fromJson(needs.changes.outputs.all_changes), matrix.product.name) + if: + ${{ contains(fromJson(needs.changes.outputs.all_changes), matrix.product.name) || contains(fromJson(needs.changes.outputs.all_changes), 'shared') || needs.changes.outputs.non_src_changes == 'true' }} run: | @@ -251,7 +260,8 @@ jobs: FOUNDRY_PROFILE: ${{ matrix.product.name }} - name: Run Forge snapshot - if: ${{ (contains(fromJson(needs.changes.outputs.all_changes), matrix.product.name) + if: + ${{ (contains(fromJson(needs.changes.outputs.all_changes), matrix.product.name) || contains(fromJson(needs.changes.outputs.all_changes), 'shared') || needs.changes.outputs.non_src_changes == 'true') && matrix.product.setup.run-gas-snapshot }} @@ -264,14 +274,16 @@ jobs: # required for code coverage report generation - name: Setup LCOV - if: ${{ (contains(fromJson(needs.changes.outputs.all_changes), matrix.product.name) + if: + ${{ (contains(fromJson(needs.changes.outputs.all_changes), matrix.product.name) || contains(fromJson(needs.changes.outputs.all_changes), 'shared') || needs.changes.outputs.non_src_changes == 'true') && matrix.product.setup.run-coverage }} uses: hrishikesh-kadam/setup-lcov@f5da1b26b0dcf5d893077a3c4f29cf78079c841d # v1.0.0 - name: Run coverage for ${{ matrix.product.name }} - if: ${{ (contains(fromJson(needs.changes.outputs.all_changes), matrix.product.name) + if: + ${{ (contains(fromJson(needs.changes.outputs.all_changes), matrix.product.name) || contains(fromJson(needs.changes.outputs.all_changes), 'shared') || needs.changes.outputs.non_src_changes == 'true') && matrix.product.setup.run-coverage }} @@ -287,7 +299,8 @@ jobs: FOUNDRY_PROFILE: ${{ matrix.product.name }} - name: Prune lcov report - if: ${{ (contains(fromJson(needs.changes.outputs.all_changes), matrix.product.name) + if: + ${{ (contains(fromJson(needs.changes.outputs.all_changes), matrix.product.name) || contains(fromJson(needs.changes.outputs.all_changes), 'shared') || needs.changes.outputs.non_src_changes == 'true') && matrix.product.setup.run-coverage }} @@ -295,7 +308,8 @@ jobs: ./contracts/scripts/lcov_prune ${{ matrix.product.name }} ./contracts/lcov.info ./contracts/lcov.info.pruned - name: Report code coverage for ${{ matrix.product.name }} - if: ${{ (contains(fromJson(needs.changes.outputs.all_changes), matrix.product.name) + if: + ${{ (contains(fromJson(needs.changes.outputs.all_changes), matrix.product.name) || contains(fromJson(needs.changes.outputs.all_changes), 'shared') || needs.changes.outputs.non_src_changes == 'true') && matrix.product.setup.run-coverage }} @@ -309,7 +323,7 @@ jobs: # runs only if non-test contracts were modified; scoped only to modified or added contracts analyze: - needs: [ changes, define-matrix ] + needs: [changes, define-matrix] name: Run static analysis if: needs.changes.outputs.not_test_sol_modified == 'true' && github.event_name != 'merge_group' runs-on: ubuntu-22.04 @@ -335,13 +349,13 @@ jobs: - name: Set up Python uses: actions/setup-python@v5.2.0 with: - python-version: '3.8' + python-version: "3.8" - name: Install solc-select and solc uses: smartcontractkit/.github/actions/setup-solc-select@b6e37806737eef87e8c9137ceeb23ef0bff8b1db # validate-solidity-artifacts@0.1.0 with: - to_install: '0.8.24' - to_use: '0.8.24' + to_install: "0.8.24" + to_use: "0.8.24" - name: Install Slither uses: smartcontractkit/.github/actions/setup-slither@b6e37806737eef87e8c9137ceeb23ef0bff8b1db # validate-solidity-artifacts@0.1.0 @@ -497,7 +511,6 @@ jobs: fi done # actions that execute only if any existing contracts were modified end here - - name: Print Slither summary shell: bash run: | @@ -511,9 +524,9 @@ jobs: - name: Validate if all Slither run for all contracts uses: smartcontractkit/.github/actions/validate-solidity-artifacts@094e8de69ca35d17f321cecc062cbeed12642ef5 # validate-solidity-artifacts@0.2.0 with: - validate_slither_reports: 'true' - validate_uml_diagrams: 'false' - slither_reports_path: 'contracts/slither-reports-current' + validate_slither_reports: "true" + validate_uml_diagrams: "false" + slither_reports_path: "contracts/slither-reports-current" sol_files: ${{ needs.changes.outputs.not_test_sol_modified_files }} - name: Upload Slither reports @@ -533,14 +546,14 @@ jobs: id: find-comment with: issue-number: ${{ github.event.pull_request.number }} - comment-author: 'github-actions[bot]' - body-includes: 'Static analysis results' + comment-author: "github-actions[bot]" + body-includes: "Static analysis results" - name: Extract job summary URL id: job-summary-url uses: pl-strflt/job-summary-url-action@df2d22c5351f73e0a187d20879854b8d98e6e001 # v1.0.0 with: - job: 'Run static analysis' + job: "Run static analysis" - name: Build Slither reports artifacts URL id: build-slither-artifact-url diff --git a/.github/workflows/solidity-hardhat.yml b/.github/workflows/solidity-hardhat.yml index 06f4ceabe58..7283e17e13f 100644 --- a/.github/workflows/solidity-hardhat.yml +++ b/.github/workflows/solidity-hardhat.yml @@ -25,7 +25,7 @@ jobs: with: filters: | src: - - 'contracts/src/!(v0.8/(ccip|functions|keystone|l2ep|liquiditymanager|llo-feeds|transmission|vrf)/**)/**/*' + - 'contracts/src/!(v0.8/(ccip|functions|keystone|l2ep|liquiditymanager|llo-feeds|transmission|vrf|workflow)/**)/**/*' - 'contracts/test/**/*' - 'contracts/package.json' - 'contracts/pnpm-lock.yaml' diff --git a/common/client/multi_node.go b/common/client/multi_node.go index 7d631954c54..5ac595161af 100644 --- a/common/client/multi_node.go +++ b/common/client/multi_node.go @@ -2,7 +2,6 @@ package client import ( "context" - "errors" "fmt" "math/big" "sync" @@ -32,7 +31,9 @@ type MultiNode[ CHAIN_ID types.ID, RPC any, ] struct { - services.StateMachine + services.Service + eng *services.Engine + primaryNodes []Node[CHAIN_ID, RPC] sendOnlyNodes []SendOnlyNode[CHAIN_ID, RPC] chainID CHAIN_ID @@ -47,9 +48,6 @@ type MultiNode[ activeMu sync.RWMutex activeNode Node[CHAIN_ID, RPC] - - chStop services.StopChan - wg sync.WaitGroup } func NewMultiNode[ @@ -73,15 +71,19 @@ func NewMultiNode[ primaryNodes: primaryNodes, sendOnlyNodes: sendOnlyNodes, chainID: chainID, - lggr: logger.Sugared(lggr).Named("MultiNode").With("chainID", chainID.String()), selectionMode: selectionMode, nodeSelector: nodeSelector, - chStop: make(services.StopChan), leaseDuration: leaseDuration, chainFamily: chainFamily, reportInterval: reportInterval, deathDeclarationDelay: deathDeclarationDelay, } + c.Service, c.eng = services.Config{ + Name: "MultiNode", + Start: c.start, + Close: c.close, + }.NewServiceEngine(logger.With(lggr, "chainID", chainID.String())) + c.lggr = c.eng.SugaredLogger c.lggr.Debugf("The MultiNode is configured to use NodeSelectionMode: %s", selectionMode) @@ -93,16 +95,12 @@ func (c *MultiNode[CHAIN_ID, RPC]) ChainID() CHAIN_ID { } func (c *MultiNode[CHAIN_ID, RPC]) DoAll(ctx context.Context, do func(ctx context.Context, rpc RPC, isSendOnly bool)) error { - var err error - ok := c.IfNotStopped(func() { - ctx, _ = c.chStop.Ctx(ctx) - + return c.eng.IfNotStopped(func() error { callsCompleted := 0 for _, n := range c.primaryNodes { select { case <-ctx.Done(): - err = ctx.Err() - return + return ctx.Err() default: if n.State() != nodeStateAlive { continue @@ -111,15 +109,11 @@ func (c *MultiNode[CHAIN_ID, RPC]) DoAll(ctx context.Context, do func(ctx contex callsCompleted++ } } - if callsCompleted == 0 { - err = ErroringNodeError - } for _, n := range c.sendOnlyNodes { select { case <-ctx.Done(): - err = ctx.Err() - return + return ctx.Err() default: if n.State() != nodeStateAlive { continue @@ -127,11 +121,11 @@ func (c *MultiNode[CHAIN_ID, RPC]) DoAll(ctx context.Context, do func(ctx contex do(ctx, n.RPC(), true) } } + if callsCompleted == 0 { + return ErroringNodeError + } + return nil }) - if !ok { - return errors.New("MultiNode is stopped") - } - return err } func (c *MultiNode[CHAIN_ID, RPC]) NodeStates() map[string]string { @@ -149,53 +143,44 @@ func (c *MultiNode[CHAIN_ID, RPC]) NodeStates() map[string]string { // // Nodes handle their own redialing and runloops, so this function does not // return any error if the nodes aren't available -func (c *MultiNode[CHAIN_ID, RPC]) Start(ctx context.Context) error { - return c.StartOnce("MultiNode", func() (merr error) { - if len(c.primaryNodes) == 0 { - return fmt.Errorf("no available nodes for chain %s", c.chainID.String()) +func (c *MultiNode[CHAIN_ID, RPC]) start(ctx context.Context) error { + if len(c.primaryNodes) == 0 { + return fmt.Errorf("no available nodes for chain %s", c.chainID.String()) + } + var ms services.MultiStart + for _, n := range c.primaryNodes { + if n.ConfiguredChainID().String() != c.chainID.String() { + return ms.CloseBecause(fmt.Errorf("node %s has configured chain ID %s which does not match multinode configured chain ID of %s", n.String(), n.ConfiguredChainID().String(), c.chainID.String())) } - var ms services.MultiStart - for _, n := range c.primaryNodes { - if n.ConfiguredChainID().String() != c.chainID.String() { - return ms.CloseBecause(fmt.Errorf("node %s has configured chain ID %s which does not match multinode configured chain ID of %s", n.String(), n.ConfiguredChainID().String(), c.chainID.String())) - } - n.SetPoolChainInfoProvider(c) - // node will handle its own redialing and automatic recovery - if err := ms.Start(ctx, n); err != nil { - return err - } + n.SetPoolChainInfoProvider(c) + // node will handle its own redialing and automatic recovery + if err := ms.Start(ctx, n); err != nil { + return err } - for _, s := range c.sendOnlyNodes { - if s.ConfiguredChainID().String() != c.chainID.String() { - return ms.CloseBecause(fmt.Errorf("sendonly node %s has configured chain ID %s which does not match multinode configured chain ID of %s", s.String(), s.ConfiguredChainID().String(), c.chainID.String())) - } - if err := ms.Start(ctx, s); err != nil { - return err - } + } + for _, s := range c.sendOnlyNodes { + if s.ConfiguredChainID().String() != c.chainID.String() { + return ms.CloseBecause(fmt.Errorf("sendonly node %s has configured chain ID %s which does not match multinode configured chain ID of %s", s.String(), s.ConfiguredChainID().String(), c.chainID.String())) } - c.wg.Add(1) - go c.runLoop() - - if c.leaseDuration.Seconds() > 0 && c.selectionMode != NodeSelectionModeRoundRobin { - c.lggr.Infof("The MultiNode will switch to best node every %s", c.leaseDuration.String()) - c.wg.Add(1) - go c.checkLeaseLoop() - } else { - c.lggr.Info("Best node switching is disabled") + if err := ms.Start(ctx, s); err != nil { + return err } + } + c.eng.Go(c.runLoop) - return nil - }) + if c.leaseDuration.Seconds() > 0 && c.selectionMode != NodeSelectionModeRoundRobin { + c.lggr.Infof("The MultiNode will switch to best node every %s", c.leaseDuration.String()) + c.eng.Go(c.checkLeaseLoop) + } else { + c.lggr.Info("Best node switching is disabled") + } + + return nil } // Close tears down the MultiNode and closes all nodes -func (c *MultiNode[CHAIN_ID, RPC]) Close() error { - return c.StopOnce("MultiNode", func() error { - close(c.chStop) - c.wg.Wait() - - return services.CloseAll(services.MultiCloser(c.primaryNodes), services.MultiCloser(c.sendOnlyNodes)) - }) +func (c *MultiNode[CHAIN_ID, RPC]) close() error { + return services.CloseAll(services.MultiCloser(c.primaryNodes), services.MultiCloser(c.sendOnlyNodes)) } // SelectRPC returns an RPC of an active node. If there are no active nodes it returns an error. @@ -233,8 +218,7 @@ func (c *MultiNode[CHAIN_ID, RPC]) selectNode() (node Node[CHAIN_ID, RPC], err e c.activeNode = c.nodeSelector.Select() if c.activeNode == nil { c.lggr.Criticalw("No live RPC nodes available", "NodeSelectionMode", c.nodeSelector.Name()) - errmsg := fmt.Errorf("no live nodes available for chain %s", c.chainID.String()) - c.SvcErrBuffer.Append(errmsg) + c.eng.EmitHealthErr(fmt.Errorf("no live nodes available for chain %s", c.chainID.String())) return nil, ErroringNodeError } @@ -296,8 +280,7 @@ func (c *MultiNode[CHAIN_ID, RPC]) checkLease() { } } -func (c *MultiNode[CHAIN_ID, RPC]) checkLeaseLoop() { - defer c.wg.Done() +func (c *MultiNode[CHAIN_ID, RPC]) checkLeaseLoop(ctx context.Context) { c.leaseTicker = time.NewTicker(c.leaseDuration) defer c.leaseTicker.Stop() @@ -305,15 +288,13 @@ func (c *MultiNode[CHAIN_ID, RPC]) checkLeaseLoop() { select { case <-c.leaseTicker.C: c.checkLease() - case <-c.chStop: + case <-ctx.Done(): return } } } -func (c *MultiNode[CHAIN_ID, RPC]) runLoop() { - defer c.wg.Done() - +func (c *MultiNode[CHAIN_ID, RPC]) runLoop(ctx context.Context) { nodeStates := make([]nodeWithState, len(c.primaryNodes)) for i, n := range c.primaryNodes { nodeStates[i] = nodeWithState{ @@ -332,7 +313,7 @@ func (c *MultiNode[CHAIN_ID, RPC]) runLoop() { select { case <-monitor.C: c.report(nodeStates) - case <-c.chStop: + case <-ctx.Done(): return } } @@ -376,7 +357,7 @@ func (c *MultiNode[CHAIN_ID, RPC]) report(nodesStateInfo []nodeWithState) { if total == dead { rerr := fmt.Errorf("no primary nodes available: 0/%d nodes are alive", total) c.lggr.Criticalw(rerr.Error(), "nodeStates", nodesStateInfo) - c.SvcErrBuffer.Append(rerr) + c.eng.EmitHealthErr(rerr) } else if dead > 0 { c.lggr.Errorw(fmt.Sprintf("At least one primary node is dead: %d/%d nodes are alive", live, total), "nodeStates", nodesStateInfo) } diff --git a/common/client/multi_node_test.go b/common/client/multi_node_test.go index 57b849a3c0a..f8fdd4261b2 100644 --- a/common/client/multi_node_test.go +++ b/common/client/multi_node_test.go @@ -13,6 +13,7 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/zap" + "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-common/pkg/logger" @@ -76,7 +77,7 @@ func TestMultiNode_Dial(t *testing.T) { chainID: types.RandomID(), }) err := mn.Start(tests.Context(t)) - assert.EqualError(t, err, fmt.Sprintf("no available nodes for chain %s", mn.chainID.String())) + assert.ErrorContains(t, err, fmt.Sprintf("no available nodes for chain %s", mn.chainID)) }) t.Run("Fails with wrong node's chainID", func(t *testing.T) { t.Parallel() @@ -92,7 +93,7 @@ func TestMultiNode_Dial(t *testing.T) { nodes: []Node[types.ID, multiNodeRPCClient]{node}, }) err := mn.Start(tests.Context(t)) - assert.EqualError(t, err, fmt.Sprintf("node %s has configured chain ID %s which does not match multinode configured chain ID of %s", nodeName, nodeChainID, mn.chainID)) + assert.ErrorContains(t, err, fmt.Sprintf("node %s has configured chain ID %s which does not match multinode configured chain ID of %s", nodeName, nodeChainID, mn.chainID)) }) t.Run("Fails if node fails", func(t *testing.T) { t.Parallel() @@ -108,7 +109,7 @@ func TestMultiNode_Dial(t *testing.T) { nodes: []Node[types.ID, multiNodeRPCClient]{node}, }) err := mn.Start(tests.Context(t)) - assert.EqualError(t, err, expectedError.Error()) + assert.ErrorIs(t, err, expectedError) }) t.Run("Closes started nodes on failure", func(t *testing.T) { @@ -127,7 +128,7 @@ func TestMultiNode_Dial(t *testing.T) { nodes: []Node[types.ID, multiNodeRPCClient]{node1, node2}, }) err := mn.Start(tests.Context(t)) - assert.EqualError(t, err, expectedError.Error()) + assert.ErrorIs(t, err, expectedError) }) t.Run("Fails with wrong send only node's chainID", func(t *testing.T) { t.Parallel() @@ -146,7 +147,7 @@ func TestMultiNode_Dial(t *testing.T) { sendonlys: []SendOnlyNode[types.ID, multiNodeRPCClient]{sendOnly}, }) err := mn.Start(tests.Context(t)) - assert.EqualError(t, err, fmt.Sprintf("sendonly node %s has configured chain ID %s which does not match multinode configured chain ID of %s", sendOnlyName, sendOnlyChainID, mn.chainID)) + assert.ErrorContains(t, err, fmt.Sprintf("sendonly node %s has configured chain ID %s which does not match multinode configured chain ID of %s", sendOnlyName, sendOnlyChainID, mn.chainID)) }) newHealthySendOnly := func(t *testing.T, chainID types.ID) *mockSendOnlyNode[types.ID, multiNodeRPCClient] { @@ -173,7 +174,7 @@ func TestMultiNode_Dial(t *testing.T) { sendonlys: []SendOnlyNode[types.ID, multiNodeRPCClient]{sendOnly1, sendOnly2}, }) err := mn.Start(tests.Context(t)) - assert.EqualError(t, err, expectedError.Error()) + assert.ErrorIs(t, err, expectedError) }) t.Run("Starts successfully with healthy nodes", func(t *testing.T) { t.Parallel() @@ -185,9 +186,7 @@ func TestMultiNode_Dial(t *testing.T) { nodes: []Node[types.ID, multiNodeRPCClient]{node}, sendonlys: []SendOnlyNode[types.ID, multiNodeRPCClient]{newHealthySendOnly(t, chainID)}, }) - defer func() { assert.NoError(t, mn.Close()) }() - err := mn.Start(tests.Context(t)) - require.NoError(t, err) + servicetest.Run(t, mn) selectedNode, err := mn.selectNode() require.NoError(t, err) assert.Equal(t, node, selectedNode) @@ -210,9 +209,7 @@ func TestMultiNode_Report(t *testing.T) { }) mn.reportInterval = tests.TestInterval mn.deathDeclarationDelay = tests.TestInterval - defer func() { assert.NoError(t, mn.Close()) }() - err := mn.Start(tests.Context(t)) - require.NoError(t, err) + servicetest.Run(t, mn) tests.AssertLogCountEventually(t, observedLogs, "At least one primary node is dead: 1/2 nodes are alive", 2) }) t.Run("Report critical error on all node failure", func(t *testing.T) { @@ -228,11 +225,9 @@ func TestMultiNode_Report(t *testing.T) { }) mn.reportInterval = tests.TestInterval mn.deathDeclarationDelay = tests.TestInterval - defer func() { assert.NoError(t, mn.Close()) }() - err := mn.Start(tests.Context(t)) - require.NoError(t, err) + servicetest.Run(t, mn) tests.AssertLogCountEventually(t, observedLogs, "no primary nodes available: 0/1 nodes are alive", 2) - err = mn.Healthy() + err := mn.HealthReport()["MultiNode"] require.Error(t, err) assert.Contains(t, err.Error(), "no primary nodes available: 0/1 nodes are alive") }) @@ -251,9 +246,7 @@ func TestMultiNode_CheckLease(t *testing.T) { logger: lggr, nodes: []Node[types.ID, multiNodeRPCClient]{node}, }) - defer func() { assert.NoError(t, mn.Close()) }() - err := mn.Start(tests.Context(t)) - require.NoError(t, err) + servicetest.Run(t, mn) tests.RequireLogMessage(t, observedLogs, "Best node switching is disabled") }) t.Run("Misconfigured lease check period won't start", func(t *testing.T) { @@ -268,9 +261,7 @@ func TestMultiNode_CheckLease(t *testing.T) { nodes: []Node[types.ID, multiNodeRPCClient]{node}, leaseDuration: 0, }) - defer func() { assert.NoError(t, mn.Close()) }() - err := mn.Start(tests.Context(t)) - require.NoError(t, err) + servicetest.Run(t, mn) tests.RequireLogMessage(t, observedLogs, "Best node switching is disabled") }) t.Run("Lease check updates active node", func(t *testing.T) { @@ -289,10 +280,8 @@ func TestMultiNode_CheckLease(t *testing.T) { nodes: []Node[types.ID, multiNodeRPCClient]{node, bestNode}, leaseDuration: tests.TestInterval, }) - defer func() { assert.NoError(t, mn.Close()) }() mn.nodeSelector = nodeSelector - err := mn.Start(tests.Context(t)) - require.NoError(t, err) + servicetest.Run(t, mn) tests.AssertLogEventually(t, observedLogs, fmt.Sprintf("Switching to best node from %q to %q", node.String(), bestNode.String())) tests.AssertEventually(t, func() bool { mn.activeMu.RLock() diff --git a/common/client/node_lifecycle_test.go b/common/client/node_lifecycle_test.go index 6f9b4653393..e510e0a308a 100644 --- a/common/client/node_lifecycle_test.go +++ b/common/client/node_lifecycle_test.go @@ -395,7 +395,7 @@ func TestUnit_NodeLifecycle_aliveLoop(t *testing.T) { rpc.On("SubscribeToHeads", mock.Anything).Return(make(<-chan Head), sub, nil).Once() expectedError := errors.New("failed to subscribe to finalized heads") rpc.On("SubscribeToFinalizedHeads", mock.Anything).Return(nil, sub, expectedError).Once() - lggr, _ := logger.TestObserved(t, zap.DebugLevel) + lggr := logger.Test(t) node := newDialedNode(t, testNodeOpts{ config: testNodeConfig{ finalizedBlockPollInterval: tests.TestInterval, diff --git a/common/client/transaction_sender_test.go b/common/client/transaction_sender_test.go index 5517a0c8dda..3844a4536ff 100644 --- a/common/client/transaction_sender_test.go +++ b/common/client/transaction_sender_test.go @@ -12,6 +12,7 @@ import ( "go.uber.org/zap" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/common/types" ) @@ -38,31 +39,17 @@ func (rpc *sendTxRPC) SendTransaction(ctx context.Context, _ any) error { return rpc.sendTxErr } +// newTestTransactionSender returns a sendTxMultiNode and TransactionSender. +// Only the TransactionSender is run via Start/Close. func newTestTransactionSender(t *testing.T, chainID types.ID, lggr logger.Logger, nodes []Node[types.ID, SendTxRPCClient[any]], sendOnlyNodes []SendOnlyNode[types.ID, SendTxRPCClient[any]], ) (*sendTxMultiNode, *TransactionSender[any, types.ID, SendTxRPCClient[any]]) { mn := sendTxMultiNode{NewMultiNode[types.ID, SendTxRPCClient[any]]( lggr, NodeSelectionModeRoundRobin, 0, nodes, sendOnlyNodes, chainID, "chainFamily", 0)} - err := mn.StartOnce("startedTestMultiNode", func() error { return nil }) - require.NoError(t, err) txSender := NewTransactionSender[any, types.ID, SendTxRPCClient[any]](lggr, chainID, mn.chainFamily, mn.MultiNode, classifySendTxError, tests.TestInterval) - err = txSender.Start(tests.Context(t)) - require.NoError(t, err) - - t.Cleanup(func() { - err := mn.Close() - if err != nil { - // Allow MultiNode to be closed early for testing - require.EqualError(t, err, "MultiNode has already been stopped: already stopped") - } - err = txSender.Close() - if err != nil { - // Allow TransactionSender to be closed early for testing - require.EqualError(t, err, "TransactionSender has already been stopped: already stopped") - } - }) + servicetest.Run(t, txSender) return &mn, txSender } @@ -82,7 +69,9 @@ func TestTransactionSender_SendTransaction(t *testing.T) { node.On("String").Return("node name").Maybe() node.On("RPC").Return(rpc).Maybe() node.On("State").Return(state).Maybe() - node.On("Close").Return(nil).Once() + node.On("Start", mock.Anything).Return(nil).Maybe() + node.On("Close").Return(nil).Maybe() + node.On("SetPoolChainInfoProvider", mock.Anything).Return(nil).Maybe() return node } @@ -91,10 +80,10 @@ func TestTransactionSender_SendTransaction(t *testing.T) { } t.Run("Fails if there is no nodes available", func(t *testing.T) { - lggr, _ := logger.TestObserved(t, zap.DebugLevel) + lggr := logger.Test(t) _, txSender := newTestTransactionSender(t, types.RandomID(), lggr, nil, nil) _, err := txSender.SendTransaction(tests.Context(t), nil) - assert.EqualError(t, err, ErroringNodeError.Error()) + assert.ErrorIs(t, err, ErroringNodeError) }) t.Run("Transaction failure happy path", func(t *testing.T) { @@ -137,7 +126,7 @@ func TestTransactionSender_SendTransaction(t *testing.T) { <-testContext.Done() }) - lggr, _ := logger.TestObserved(t, zap.DebugLevel) + lggr := logger.Test(t) _, txSender := newTestTransactionSender(t, types.RandomID(), lggr, []Node[types.ID, SendTxRPCClient[any]]{mainNode}, nil) @@ -161,11 +150,11 @@ func TestTransactionSender_SendTransaction(t *testing.T) { <-testContext.Done() }) - lggr, _ := logger.TestObserved(t, zap.DebugLevel) + lggr := logger.Test(t) _, txSender := newTestTransactionSender(t, chainID, lggr, []Node[types.ID, SendTxRPCClient[any]]{fastNode, slowNode}, nil) _, sendErr := txSender.SendTransaction(tests.Context(t), nil) - require.EqualError(t, sendErr, expectedError.Error()) + require.ErrorIs(t, sendErr, expectedError) }) t.Run("Returns success without waiting for the rest of the nodes", func(t *testing.T) { chainID := types.RandomID() @@ -181,19 +170,19 @@ func TestTransactionSender_SendTransaction(t *testing.T) { // block caller til end of the test <-testContext.Done() }) - lggr, _ := logger.TestObserved(t, zap.WarnLevel) - mn, txSender := newTestTransactionSender(t, chainID, lggr, + lggr := logger.Test(t) + _, txSender := newTestTransactionSender(t, chainID, lggr, []Node[types.ID, SendTxRPCClient[any]]{fastNode, slowNode}, []SendOnlyNode[types.ID, SendTxRPCClient[any]]{slowSendOnly}) rtnCode, err := txSender.SendTransaction(tests.Context(t), nil) require.NoError(t, err) require.Equal(t, Successful, rtnCode) - require.NoError(t, mn.Close()) }) t.Run("Fails when multinode is closed", func(t *testing.T) { chainID := types.RandomID() fastNode := newNode(t, nil, nil) + fastNode.On("ConfiguredChainID").Return(chainID).Maybe() // hold reply from the node till end of the test testContext, testCancel := context.WithCancel(tests.Context(t)) defer testCancel() @@ -201,20 +190,21 @@ func TestTransactionSender_SendTransaction(t *testing.T) { // block caller til end of the test <-testContext.Done() }) + slowNode.On("ConfiguredChainID").Return(chainID).Maybe() slowSendOnly := newNode(t, errors.New("send only failed"), func(_ mock.Arguments) { // block caller til end of the test <-testContext.Done() }) + slowSendOnly.On("ConfiguredChainID").Return(chainID).Maybe() - lggr, _ := logger.TestObserved(t, zap.DebugLevel) - - mn, txSender := newTestTransactionSender(t, chainID, lggr, + mn, txSender := newTestTransactionSender(t, chainID, logger.Test(t), []Node[types.ID, SendTxRPCClient[any]]{fastNode, slowNode}, []SendOnlyNode[types.ID, SendTxRPCClient[any]]{slowSendOnly}) + require.NoError(t, mn.Start(tests.Context(t))) require.NoError(t, mn.Close()) _, err := txSender.SendTransaction(tests.Context(t), nil) - require.EqualError(t, err, "MultiNode is stopped") + require.ErrorContains(t, err, "service is stopped") }) t.Run("Fails when closed", func(t *testing.T) { chainID := types.RandomID() @@ -231,22 +221,24 @@ func TestTransactionSender_SendTransaction(t *testing.T) { <-testContext.Done() }) - lggr, _ := logger.TestObserved(t, zap.DebugLevel) + var txSender *TransactionSender[any, types.ID, SendTxRPCClient[any]] - _, txSender := newTestTransactionSender(t, chainID, lggr, + t.Cleanup(func() { // after txSender.Close() + _, err := txSender.SendTransaction(tests.Context(t), nil) + assert.EqualError(t, err, "TransactionSender not started") + }) + + _, txSender = newTestTransactionSender(t, chainID, logger.Test(t), []Node[types.ID, SendTxRPCClient[any]]{fastNode, slowNode}, []SendOnlyNode[types.ID, SendTxRPCClient[any]]{slowSendOnly}) - require.NoError(t, txSender.Close()) - _, err := txSender.SendTransaction(tests.Context(t), nil) - require.EqualError(t, err, "TransactionSender not started") }) t.Run("Returns error if there is no healthy primary nodes", func(t *testing.T) { chainID := types.RandomID() primary := newNodeWithState(t, nodeStateUnreachable, nil, nil) sendOnly := newNodeWithState(t, nodeStateUnreachable, nil, nil) - lggr, _ := logger.TestObserved(t, zap.DebugLevel) + lggr := logger.Test(t) _, txSender := newTestTransactionSender(t, chainID, lggr, []Node[types.ID, SendTxRPCClient[any]]{primary}, @@ -265,7 +257,7 @@ func TestTransactionSender_SendTransaction(t *testing.T) { unhealthyNode := newNodeWithState(t, nodeStateUnreachable, nil, unexpectedCall) unhealthySendOnlyNode := newNodeWithState(t, nodeStateUnreachable, nil, unexpectedCall) - lggr, _ := logger.TestObserved(t, zap.DebugLevel) + lggr := logger.Test(t) _, txSender := newTestTransactionSender(t, chainID, lggr, []Node[types.ID, SendTxRPCClient[any]]{mainNode, unhealthyNode}, diff --git a/contracts/.changeset/fair-pans-prove.md b/contracts/.changeset/fair-pans-prove.md new file mode 100644 index 00000000000..652af3c9fe7 --- /dev/null +++ b/contracts/.changeset/fair-pans-prove.md @@ -0,0 +1,5 @@ +--- +'@chainlink/contracts': patch +--- + +#internal bump license to 1.6 diff --git a/contracts/.changeset/neat-melons-retire.md b/contracts/.changeset/neat-melons-retire.md new file mode 100644 index 00000000000..a3f6d185dcd --- /dev/null +++ b/contracts/.changeset/neat-melons-retire.md @@ -0,0 +1,5 @@ +--- +'@chainlink/contracts': minor +--- + +Add workflow registry contract to core in /dev folder diff --git a/contracts/.prettierignore b/contracts/.prettierignore index 440cf95afa2..483a8cb89db 100644 --- a/contracts/.prettierignore +++ b/contracts/.prettierignore @@ -22,6 +22,7 @@ LinkToken.json typechain **/vendor src/v0.8/ccip/** +src/v0.8/workflow/** # Ignore TS definition and map files **/**.d.ts diff --git a/contracts/FOUNDRY_GUIDE.md b/contracts/FOUNDRY_GUIDE.md new file mode 100644 index 00000000000..733968e6a00 --- /dev/null +++ b/contracts/FOUNDRY_GUIDE.md @@ -0,0 +1,246 @@ +# Foundry Guide + +We lock Foundry to a specific version in the `GNUmakefile`. +To ensure you have the correct local version run `make foundry`. +When you see formatting or gas differences between local and CI, it often means there is a version mismatch. +We use a locked version to avoid formatting or gas changes that suddenly pop up in CI when breaking changes are pushed to the nightly Foundry feed. + + +## How to start a new Foundry project + +There are several files to modify when starting a new Solidity project. +Everything starts with a foundry profile in `contracts/foundry.toml`, +this profile name will be used in most of the other files. +We will assume the profile is called `newproject`. + +The foundry profile should look similar to this. + +```toml +[profile.newproject] +solc_version = '0.8.24' +src = 'src/v0.8/newproject' +test = 'src/v0.8/newproject/test' +optimizer_runs = 1_000_000 +evm_version = 'paris' +``` + +After that, we have to enable CI by editing the following files. + +- `.github/CODEOWNERS` + - Add `newproject` in three places. + - `/contracts/**/*newproject* @smartcontractkit/newproject` + - `/contracts/src/v0.8/*newproject* @smartcontractkit/newproject` + - `/core/gethwrappers/*newproject* @smartcontractkit/newproject` + - Look at the file layout for the correct positions for each of these lines. Please keep the ordering alphabetical. +- `.github/workflows/solidity-foundry.yml` + - Add `newproject` to the `Define test matrix` section. + - Set the min coverage >=98%. + - Enable run-gas-snapshot. + - Enable run-forge-fmt. + - Add `newproject` to the `Checkout the repo` step. +- `.github/workflows/solidity-hardhat.yml` + - Add `newproject` to the ignored list to avoid hardhat CI running for `newproject` changes. +- `contracts/GNUmakefile` + - Add `newproject` to the ALL_FOUNDRY_PRODUCTS list in alphabetical order. +- `contracts/.prettierignore` + - Add `src/v0.8/newproject/**` . + +To enable geth wrapper generation, you will also have to create the following files. + +- `contracts/scripts` + - Create a file called `native_solc_compile_all_newproject`. + - See example below. +- `core/gethwrappers` + - Create a folder `newproject`. + - It's easiest to copy another projects folder and replace the contracts in `go_generate.go` with your own contracts. + - `ccip` is a good version to copy. + - Remove the contents of the `generated` folder. + - Remove the contents of the `generated-wrapper-dependency-versions-do-not-edit.txt` file. + - Remove the contents of the `mocks` folder. +- If you need mocks, define them in `.mockery.yaml`. + +```bash +#!/usr/bin/env bash + +set -e + +echo " ┌──────────────────────────────────────────────┐" +echo " │ Compiling Newproject contracts... │" +echo " └──────────────────────────────────────────────┘" + +SOLC_VERSION="0.8.24" +OPTIMIZE_RUNS=1000000 +# Optional optimizer run overrides. Please remove if not used +OPTIMIZE_RUNS_SINGLE_CONTRACT=5000 + + +SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" +python3 -m pip install --require-hashes -r "$SCRIPTPATH"/requirements.txt +solc-select install $SOLC_VERSION +solc-select use $SOLC_VERSION +export SOLC_VERSION=$SOLC_VERSION + +ROOT="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; cd ../../ && pwd -P )" + +compileContract () { + local contract + contract=$(basename "$1" ".sol") + + local optimize_runs=$OPTIMIZE_RUNS + + case $1 in + "newproject/SingleContract.sol") + optimize_runs=$OPTIMIZE_RUNS_SINGLE_CONTRACT + ;; + esac + + solc --overwrite --optimize --optimize-runs $optimize_runs --metadata-hash none \ + -o "$ROOT"/contracts/solc/v$SOLC_VERSION/"$contract" \ + --abi --bin --allow-paths "$ROOT"/contracts/src/v0.8 \ + --bin-runtime --hashes --metadata --metadata-literal --combined-json abi,hashes,metadata,srcmap,srcmap-runtime \ + --evm-version paris \ + "$ROOT"/contracts/src/v0.8/"$1" +} + +compileContract newproject/SingleContract.sol +compileContract newproject/OtherContract.sol + +``` + +You should now have a fully set-up project with CI enabled. +Create a PR that introduces this setup without adding all the project's Solidity complexity, ideally before you start. +This is important +because the people approving the PR for this CI are different people from the ones approving the Solidity code. + +## Testing with Foundry + +We aim for (near) 100% line coverage. +Line coverage can sometimes be misleading though, so you should also look at the branch coverage. +The CI will only take line coverage into account, which means branch coverage spot checks are highly recommended. +Setting the line coverage requirement to ~100% means you will almost guarantee all branches are also taken. + +We have a strict layout and naming convention for Foundry tests. +This is to ensure consistency within the Chainlink codebases +and make it easier for developers to work on different projects. +If your Foundry project does not yet follow the structures described below, please consider refactoring it. +The test naming structure is especially important as CI depends on it for its snapshot generation. + + +### Test file layout + +Each foundry project has its own folder in the appropriate Solidity version folder. Within this folder there is a `test` +folder that contains all tests. This test folder mirrors the non-test folder structure with the exception that for each +contract to be tested, there is a folder with that contract's name. Within that folder, there is a test file for each +function that is tested and optionally a setup file which is shared between the function tests. Each file has a single +contract with the name `<Contract>_<function>` e.g. `contract OnRamp_getFee is OnRampSetup`. + +Consider the following folder structure. +``` +├── Router.sol +├── FeeQuoter.sol +├── onRamp +│ ├── OnRamp.sol +│ └── AnotherOnRamp.sol +``` + +The folder including tests would look like this. + +``` +├── Router.sol +├── FeeQuoter.sol +├── onRamp +│ ├── OnRamp.sol +│ └── AnotherOnRamp.sol +├── test +│ ├── Router +│ │ ├── Router.ccipSend.t.sol +│ │ ├── Router.recoverTokens.t.sol +│ │ ├── RouterSetup.t.sol +│ │ └── .... +│ ├── FeeQuoter +│ │ ├── FeeQuoter.onReport.t.sol +│ │ ├── FeeQuoter.updatePrices.t.sol +│ │ └── .... +│ ├── onRamp +│ │ ├── OnRamp +│ │ │ ├── OnRamp.constructor.t.sol +│ │ │ ├── OnRamp.getFee.t.sol +│ │ │ └── .... +│ │ ├── AnotherOnRamp +│ │ │ ├── AnotherOnRamp.constructor.t.sol +│ │ │ ├── AnotherOnRamp.getFee.t.sol +│ │ │ └── .... +``` + +### Test naming + +Tests are named according to the following format: + +``` +test_FunctionName_Description for standard tests. +test_FunctionName_RevertWhen_Condition for tests expecting a revert. +testFuzz_FunctionName_Description for fuzz tests. +testFork_FunctionName_Description for tests that fork from a network. +``` + +Including the function name first will group tests for the same function together in the gas snapshot. Using this format +will automatically exclude fuzz, fork and reverting tests from the gas snapshot. This leads to a less flaky snapshot +with fewer merge conflicts. + +Examples of correct test names for a function `getFee` are: + +``` +test_getFee - the base success case +test_getFee_MultipleFeeTokens - another success case with a specific scenario +test_getFee_RevertWhen_CursedByRMN - getFee reverts when it's cursed by the RMN. The error name should be used as condition when there is a single tests that checks for it +testFuzz_getFee_OnlyFeeTokens - a fuzz test that asserts that only fee tokens are used +testFork_getFee_UniswapV3MainnetFee - a fork test that uses Uniswap V3 on mainnet to get the fee +``` + + +### What to test + +Foundry unit tests should cover at least the following + +- The happy path +- All emitted events. + - Use `vm.expectEmit()`. + - Since all state updates should emit an event, this implicitly means we test all state updates. +- All revert reasons. + - Use `vm.expectRevert(...)`. + +Consider if a fuzz test makes sense. +It often doesn't, but when it does, it can be very powerful. +Fork tests can be considered when the code relies on existing contracts or their state. +Focus on unit tests before exploring more advanced testing. + +## Best practices + +Check out the official [Foundry best practices section](https://book.getfoundry.sh/tutorials/best-practices). + +- There should be no code between `vm.expectEmit`/`vm.expectRevert` and the function call. + - Test setup should be done before the `vm.expect` call. +- Set the block number and timestamp in `foundry.toml`. + - It is preferred to set these values to some reasonable value close to reality. + - There are already globally applied values in the `foundry.toml` file in this repo. +- Reference errors and events from the original contracts, do not duplicate them. +- Prefer `makeAddr("string describing the contract");` over `address(12345);`. +- Pin the fork test block number to cache the results of the RPC. +- If you see something being done in existing code, that doesn't mean it is automatically correct. + - This document will evolve over time, and often it won't make sense to go back and refactor an entire codebase when our preferences change. + + +## Tips and tricks + +- Use `make snapshot` to generate the correct snapshot for the selected Foundry profile. + - Use `make snapshot-diff` to see the diff between the local snapshot and your latest changes. +- use `make wrappers` to generate the gethwrappers for the selected Foundry profile. +- Use `vm.recordLogs();` to record all logs emitted + - Use `vm.getRecordedLogs()` to get the logs emitted. + - This way you can assert that a log was *not* emitted. +- Run `forge coverage --report lcov` to output code coverage + - This can be rendered as inline coverage using e.g. Coverage Gutters for VSCode +- You can provide inline config for fuzz/invariant tests +- You can find the function selectors for a given function or error using `cast sig <FUNC_SIG>` + - Run `forge selectors list` to see the entire list of selectors split by the contract name. + diff --git a/contracts/GNUmakefile b/contracts/GNUmakefile index 5fae1cdf927..a12e7d2075c 100644 --- a/contracts/GNUmakefile +++ b/contracts/GNUmakefile @@ -1,6 +1,6 @@ # ALL_FOUNDRY_PRODUCTS contains a list of all products that have a foundry # profile defined and use the Foundry snapshots. -ALL_FOUNDRY_PRODUCTS = ccip functions keystone l2ep liquiditymanager llo-feeds operatorforwarder shared transmission +ALL_FOUNDRY_PRODUCTS = ccip functions keystone l2ep liquiditymanager llo-feeds operatorforwarder shared transmission workflow # To make a snapshot for a specific product, either set the `FOUNDRY_PROFILE` env var # or call the target with `FOUNDRY_PROFILE=product` diff --git a/contracts/STYLE_GUIDE.md b/contracts/STYLE_GUIDE.md index 89fe0dd5efa..f1faab09644 100644 --- a/contracts/STYLE_GUIDE.md +++ b/contracts/STYLE_GUIDE.md @@ -1,16 +1,23 @@ # Structure This guide is split into two sections: [Guidelines](#guidelines) and [Rules](#rules). -Guidelines are recommendations that should be followed but are hard to enforce in an automated way. +Guidelines are recommendations that should be followed, but are hard to enforce in an automated way. Rules are all enforced through CI, this can be through Solhint rules or other tools. ## Background -Our starting point is the [official Solidity Style Guide](https://docs.soliditylang.org/en/v0.8.21/style-guide.html) and [ConsenSys's Secure Development practices](https://consensys.github.io/smart-contract-best-practices/), but we deviate in some ways. We lean heavily on [Prettier](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/.prettierrc) for formatting, and if you have to set up a new Solidity project we recommend starting with [our prettier config](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/.prettierrc). We are trying to automate as much of this style guide with Solhint as possible. +Our starting point is the [official Solidity Style Guide](https://docs.soliditylang.org/en/v0.8.21/style-guide.html) and +[ConsenSys's Secure Development practices](https://consensys.github.io/smart-contract-best-practices/), +but we deviate in some ways. +We are trying to automate as much of this style guide with Solhint as possible. -This guide is not meant to be applied retroactively. There is no need to rewrite existing code to adhere to this guide, and when making (small) changes in existing files, it is not required to adhere to this guide if it conflicts with other practices in that existing file. Consistency is preferred. +This guide is not meant to be applied retroactively. +There is no need to rewrite existing code to adhere to this guide. +When making (small) changes in existing files, +it is not required to adhere to this guide if it conflicts with other practices in that existing file. +Consistency is preferred. -We will be looking into `forge fmt`, but for now, we still use `prettier`. +We use `forge fmt` for all new projects, but some older ones still rely on `prettier`. # <a name="guidelines"></a>Guidelines @@ -113,7 +120,7 @@ struct FeeTokenConfigArgs { - Events should only be triggered on state changes. If the value is set but not changed, we prefer avoiding a log emission indicating a change. (e.g. Either do not emit a log, or name the event `ConfigSet` instead of `ConfigUpdated`.) - Events should be emitted for all state changes, not emitting should be an exception -- When possible event names should correspond to the method they are in or the action that is being taken. Events preferably follow the format <subject><actionPerformed>, where the action performed is the past tense of the imperative verb in the method name. e.g. calling `setConfig` should emit an event called `ConfigSet`, not `ConfigUpdated` in a method named `setConfig`. +- When possible, event names should correspond to the method they are in or the action that is being taken. Events preferably follow the format <subject><actionPerformed>, where the action performed is the past tense of the imperative verb in the method name. e.g. calling `setConfig` should emit an event called `ConfigSet`, not `ConfigUpdated` in a method named `setConfig`. ### Expose Errors @@ -125,7 +132,7 @@ It is common to call a contract and then check the call succeeded: require(success, "Contract call failed"); ``` -While this may look descriptive it swallows the error. Instead, bubble up the error: +While this may look descriptive, it swallows the error. Instead, bubble up the error: ```solidity bool success; @@ -160,7 +167,7 @@ The original error will not be human-readable in an off-chain explorer because i ## Dependencies - Prefer not reinventing the wheel, especially if there is an Openzeppelin wheel. -- The `shared` folder can be treated as a first-party dependency and it is recommended to check if some functionality might already be in there before either writing it yourself or adding a third party dependency. +- The `shared` folder can be treated as a first-party dependency, and it is recommended to check if some functionality might already be in there before either writing it yourself or adding a third party dependency. - When we have reinvented the wheel already (like with ownership), it is OK to keep using these contracts. If there are clear benefits of using another standard like OZ, we can deprecate the custom implementation and start using the new standard in all new projects. Migration will not be required unless there are serious issues with the old implementation. - When the decision is made to use a new standard, it is no longer allowed to use the old standard for new projects. @@ -191,28 +198,19 @@ The original error will not be human-readable in an off-chain explorer because i - Golf your code. Make it cheap, within reason. - Focus on the hot path - Most of the cost of executing Solidity is related to reading/writing storage + - Pack your structs and top level contract storage - Calling other contracts will also be costly - Common types to safely use are - uint40 for timestamps (or uint32 if you really need the space) - uint96 for LINK, as there are only 1b LINK tokens - prefer `++i` over `i++` +- Avoid `unchecked` +- Only use `assembly` when there is no option to do something in Solidity or when it saves a significant amount of gas over the alternative implementation. - If you’re unsure about golfing, ask in the #tech-solidity channel ## Testing -- Test using Foundry. -- Aim for at least 90% *useful* coverage as a baseline, but (near) 100% is achievable in Solidity. Always 100% test the critical path. - - Make sure to test for each event emitted - - Test each reverting path -- Consider fuzzing, start with stateless (very easy in Foundry) and if that works, try stateful fuzzing. -- Consider fork testing if applicable - -### Foundry - -- Create a Foundry profile for each project folder in `foundry.toml` -- Foundry tests live in the project folder in `src`, not in the `contracts/test/` folder -- Set the block number and timestamp. It is preferred to set these values to some reasonable value close to reality. -- There should be no code between `vm.expectEmit`/`vm.expectRevert` and the function call +Please read the [Foundry Guide](FOUNDRY_GUIDE.md). No new tests should be written in Hardhat. ## Picking a Pragma @@ -284,7 +282,7 @@ All rules have a `rule` tag which indicates how the rule is enforced. ## Comments -- Comments should be in the `//` (default) or `///` (Natspec) format, not the `/* */` format. +- Comments should be in the `//` (default) or `///` (for Natspec) format, not the `/* */` or `/** **/` format. - rule: `tbd` - Comments should follow [NatSpec](https://docs.soliditylang.org/en/latest/natspec-format.html) - rule: `tbd` @@ -304,7 +302,7 @@ import {AnythingElse} from "../code/AnythingElse.sol"; import {ThirdPartyCode} from "../../vendor/ThirdPartyCode.sol"; ``` -- An example would be +- An example would be the following. Note that third party interfaces go with the third party imports. ```solidity import {ITypeAndVersion} from "../../shared/interfaces/ITypeAndVersion.sol"; diff --git a/contracts/foundry.toml b/contracts/foundry.toml index cf0ab18e8a6..45272ad3f17 100644 --- a/contracts/foundry.toml +++ b/contracts/foundry.toml @@ -91,11 +91,18 @@ solc_version = '0.8.19' src = 'src/v0.8/transmission' test = 'src/v0.8/transmission/test' +[profile.workflow] +optimizer_runs = 1_000_000 +solc_version = '0.8.24' +src = 'src/v0.8/workflow' +test = 'src/v0.8/workflow/test' +via_ir = true # reconsider using the --via-ir flag if compilation takes too long +evm_version = 'paris' + [profile.shared] optimizer_runs = 1_000_000 src = 'src/v0.8/shared' test = 'src/v0.8/shared/test' solc_version = '0.8.24' - # See more config options https://github.com/foundry-rs/foundry/tree/master/config diff --git a/contracts/hardhat.config.ts b/contracts/hardhat.config.ts index 73e70081e9a..4a3935475c5 100644 --- a/contracts/hardhat.config.ts +++ b/contracts/hardhat.config.ts @@ -132,6 +132,19 @@ let config = { version: '0.8.19', settings: COMPILER_SETTINGS, }, + 'src/v0.8/workflow/dev/WorkflowRegistry.sol': { + version: '0.8.24', + settings: { + optimizer: { + enabled: true, + runs: 1000000, // see native_solc_compile_all_workflow + }, + viaIR: true, + metadata: { + bytecodeHash: 'none', + }, + }, + }, }, }, mocha: { diff --git a/contracts/package.json b/contracts/package.json index 731b695f636..1e4da89843a 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -3,7 +3,7 @@ "version": "1.3.0", "description": "Chainlink smart contracts", "author": "Chainlink devs", - "license": "MIT", + "license": "BUSL-1.1", "private": false, "scripts": { "test": "hardhat test --parallel", diff --git a/contracts/scripts/native_solc_compile_all b/contracts/scripts/native_solc_compile_all index 6e9f17561dd..090d8c8a07b 100755 --- a/contracts/scripts/native_solc_compile_all +++ b/contracts/scripts/native_solc_compile_all @@ -12,7 +12,7 @@ python3 -m pip install --require-hashes -r $SCRIPTPATH/requirements.txt # 6 and 7 are legacy contracts, for each other product we have a native_solc_compile_all_$product script # These scripts can be run individually, or all together with this script. # To add new CL products, simply write a native_solc_compile_all_$product script and add it to the list below. -for product in automation events_mock feeds functions keystone llo-feeds logpoller operatorforwarder shared transmission vrf ccip liquiditymanager +for product in automation events_mock feeds functions keystone llo-feeds logpoller operatorforwarder shared transmission vrf ccip liquiditymanager workflow do $SCRIPTPATH/native_solc_compile_all_$product done diff --git a/contracts/scripts/native_solc_compile_all_workflow b/contracts/scripts/native_solc_compile_all_workflow new file mode 100755 index 00000000000..5354eb29212 --- /dev/null +++ b/contracts/scripts/native_solc_compile_all_workflow @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +set -e + +echo " ┌──────────────────────────────────────────────┐" +echo " │ Compiling Workflow contracts... │" +echo " └──────────────────────────────────────────────┘" + +SOLC_VERSION="0.8.24" +OPTIMIZE_RUNS=1000000 + +SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" +python3 -m pip install --require-hashes -r "$SCRIPTPATH"/requirements.txt +solc-select install $SOLC_VERSION +solc-select use $SOLC_VERSION +export SOLC_VERSION=$SOLC_VERSION + +ROOT="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; cd ../../ && pwd -P )" + +compileContract () { + local contract + contract=$(basename "$1" ".sol") + + # TODO reconsider using the --via-ir flag if compilation takes too long + solc --overwrite --via-ir --optimize --optimize-runs $OPTIMIZE_RUNS --metadata-hash none \ + -o "$ROOT"/contracts/solc/v$SOLC_VERSION/"$contract" \ + --abi --bin --allow-paths "$ROOT"/contracts/src/v0.8\ + --evm-version paris \ + "$ROOT"/contracts/src/v0.8/"$1" +} + +compileContract workflow/dev/WorkflowRegistry.sol diff --git a/contracts/src/v0.8/ccip/LICENSE.md b/contracts/src/v0.8/ccip/LICENSE.md index b2e82483e93..76ec227fba6 100644 --- a/contracts/src/v0.8/ccip/LICENSE.md +++ b/contracts/src/v0.8/ccip/LICENSE.md @@ -9,13 +9,12 @@ Parameters Licensor: SmartContract Chainlink Limited SEZC -Licensed Work: Cross-Chain Interoperability Protocol v1.5 +Licensed Work: Cross-Chain Interoperability Protocol v1.6 The Licensed Work is (c) 2023 SmartContract Chainlink Limited SEZC -Additional Use Grant: Any uses listed and defined at [v1.5-CCIP-License-grants]( -./v1.5-CCIP-License-grants.md) +Additional Use Grant: Any uses listed and defined at [v1.6-CCIP-License-grants](./v1.6-CCIP-License-grants.md) -Change Date: Aug 16, 2028 +Change Date: Nov 1, 2028 Change License: MIT diff --git a/contracts/src/v0.8/ccip/v1.5-CCIP-License-grants.md b/contracts/src/v0.8/ccip/v1.6-CCIP-License-grants.md similarity index 81% rename from contracts/src/v0.8/ccip/v1.5-CCIP-License-grants.md rename to contracts/src/v0.8/ccip/v1.6-CCIP-License-grants.md index ef0f55ea924..716f2abb903 100644 --- a/contracts/src/v0.8/ccip/v1.5-CCIP-License-grants.md +++ b/contracts/src/v0.8/ccip/v1.6-CCIP-License-grants.md @@ -1,8 +1,8 @@ -v1.5-CCIP-License-grants +v1.6-CCIP-License-grants Additional Use Grant(s): -You may make use of the Cross-Chain Interoperability Protocol v1.5 (which is available subject to the license here, the “Licensed Work ”) solely for purposes of +You may make use of the Cross-Chain Interoperability Protocol v1.6 (which is available subject to the license here, the “Licensed Work ”) solely for purposes of 1. importing client-side libraries or example clients to facilitate the integration of the Licensed Work into your application. 2. Developing, deploying and operating [the token pool contracts](./pools) solely for purposes of the integration and use of CCIP. \ No newline at end of file diff --git a/contracts/src/v0.8/workflow/dev/WorkflowRegistry.sol b/contracts/src/v0.8/workflow/dev/WorkflowRegistry.sol new file mode 100644 index 00000000000..b0b6a120f86 --- /dev/null +++ b/contracts/src/v0.8/workflow/dev/WorkflowRegistry.sol @@ -0,0 +1,712 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {ITypeAndVersion} from "../../shared/interfaces/ITypeAndVersion.sol"; + +import {Ownable2StepMsgSender} from "../../shared/access/Ownable2StepMsgSender.sol"; + +import {Strings} from "../../vendor/openzeppelin-solidity/v5.0.2/contracts/utils/Strings.sol"; +import {EnumerableSet} from "../../vendor/openzeppelin-solidity/v5.0.2/contracts/utils/structs/EnumerableSet.sol"; + +contract WorkflowRegistry is Ownable2StepMsgSender, ITypeAndVersion { + using EnumerableSet for EnumerableSet.Bytes32Set; + using EnumerableSet for EnumerableSet.AddressSet; + using EnumerableSet for EnumerableSet.UintSet; + + string public constant override typeAndVersion = "WorkflowRegistry 1.0.0-dev"; + uint8 private constant MAX_WORKFLOW_NAME_LENGTH = 64; + uint8 private constant MAX_URL_LENGTH = 200; + uint8 private constant MAX_PAGINATION_LIMIT = 100; + + enum WorkflowStatus { + ACTIVE, + PAUSED + } + + struct WorkflowMetadata { + bytes32 workflowID; // Unique identifier from hash of owner address, WASM binary content, config content and secrets URL. + address owner; // ─────────╮ Workflow owner. + uint32 donID; // │ Unique identifier for the Workflow DON. + WorkflowStatus status; // ─╯ Current status of the workflow (active, paused). + string workflowName; // Human readable string capped at 64 characters length. + string binaryURL; // URL to the WASM binary. + string configURL; // URL to the config. + string secretsURL; // URL to the encrypted secrets. Workflow DON applies a default refresh period (e.g. daily). + } + + /// @dev Maps an owner address to a set of their workflow (name + owner) hashess. + mapping(address owner => EnumerableSet.Bytes32Set workflowKeys) private s_ownerWorkflowKeys; + /// @dev Maps a DON ID to a set of workflow IDs. + mapping(uint32 donID => EnumerableSet.Bytes32Set workflowKeys) private s_donWorkflowKeys; + /// @dev Maps a workflow (name + owner) hash to its corresponding workflow metadata. + mapping(bytes32 workflowKey => WorkflowMetadata workflowMetadata) private s_workflows; + /// @dev Mapping to track workflows by secretsURL hash (owner + secretsURL). + /// This is used to find all workflows that have the same secretsURL when a force secrets update event is requested. + mapping(bytes32 secretsURLHash => EnumerableSet.Bytes32Set workflowKeys) private s_secretsHashToWorkflows; + + /// @dev List of all authorized EOAs/contracts allowed to access this contract's state functions. All view functions are open access. + EnumerableSet.AddressSet private s_authorizedAddresses; + /// @dev List of all authorized DON IDs. + EnumerableSet.UintSet private s_allowedDONs; + + bool private s_registryLocked = false; + + event AllowedDONsUpdatedV1(uint32[] donIDs, bool allowed); + event AuthorizedAddressesUpdatedV1(address[] addresses, bool allowed); + event WorkflowRegisteredV1( + bytes32 indexed workflowID, + address indexed workflowOwner, + uint32 indexed donID, + WorkflowStatus status, + string workflowName, + string binaryURL, + string configURL, + string secretsURL + ); + event WorkflowUpdatedV1( + bytes32 indexed oldWorkflowID, + address indexed workflowOwner, + uint32 indexed donID, + bytes32 newWorkflowID, + string workflowName, + string binaryURL, + string configURL, + string secretsURL + ); + event WorkflowPausedV1( + bytes32 indexed workflowID, address indexed workflowOwner, uint32 indexed donID, string workflowName + ); + event WorkflowActivatedV1( + bytes32 indexed workflowID, address indexed workflowOwner, uint32 indexed donID, string workflowName + ); + event WorkflowDeletedV1( + bytes32 indexed workflowID, address indexed workflowOwner, uint32 indexed donID, string workflowName + ); + event WorkflowForceUpdateSecretsRequestedV1(address indexed owner, bytes32 secretsURLHash, string workflowName); + event RegistryLockedV1(address indexed lockedBy); + event RegistryUnlockedV1(address indexed unlockedBy); + + error AddressNotAuthorized(address caller); + error CallerIsNotWorkflowOwner(address caller); + error DONNotAllowed(uint32 donID); + error InvalidWorkflowID(); + error RegistryLocked(); + error URLTooLong(uint256 providedLength, uint8 maxAllowedLength); + error WorkflowAlreadyInDesiredStatus(); + error WorkflowAlreadyRegistered(); + error WorkflowContentNotUpdated(); + error WorkflowDoesNotExist(); + error WorkflowIDAlreadyExists(); + error WorkflowIDNotUpdated(); + error WorkflowNameTooLong(uint256 providedLength, uint8 maxAllowedLength); + + modifier registryNotLocked() { + if (s_registryLocked) revert RegistryLocked(); + _; + } + + // ================================================================ + // | Admin | + // ================================================================ + + /// @notice Updates the list of allowed DON IDs. + /// @dev If a DON ID with associated workflows is removed from the allowed DONs list, the only allowed actions on + /// workflows for that DON are to pause or delete them. It will no longer be possible to update, activate, or register + /// new workflows for a removed DON. + /// @param donIDs The list of unique identifiers for Workflow DONs. + /// @param allowed True if they should be added to the allowlist, false to remove them. + function updateAllowedDONs(uint32[] calldata donIDs, bool allowed) external onlyOwner registryNotLocked { + uint256 length = donIDs.length; + for (uint256 i = 0; i < length; ++i) { + if (allowed) { + s_allowedDONs.add(donIDs[i]); + } else { + s_allowedDONs.remove(donIDs[i]); + } + } + + emit AllowedDONsUpdatedV1(donIDs, allowed); + } + + /// @notice Updates a list of authorized addresses that can register workflows. + /// @dev We don't check if an existing authorized address will be set to false, please take extra caution. + /// @param addresses The list of addresses. + /// @param allowed True if they should be added to whitelist, false to remove them. + function updateAuthorizedAddresses(address[] calldata addresses, bool allowed) external onlyOwner registryNotLocked { + uint256 length = addresses.length; + for (uint256 i = 0; i < length; ++i) { + if (allowed) { + s_authorizedAddresses.add(addresses[i]); + } else { + s_authorizedAddresses.remove(addresses[i]); + } + } + + emit AuthorizedAddressesUpdatedV1(addresses, allowed); + } + + /// @notice Locks the registry, preventing any further modifications. + /// @dev This function can only be called by the owner of the contract. Once locked, the registry cannot be modified + /// until it is unlocked by calling `unlockRegistry`. Emits a `RegistryLockedV1` event. + function lockRegistry() external onlyOwner { + s_registryLocked = true; + emit RegistryLockedV1(msg.sender); + } + + /// @notice Unlocks the registry, allowing modifications to be made. + /// @dev This function can only be called by the owner of the contract. Once unlocked, the registry can be modified + /// again. Emits a `RegistryUnlockedV1` event. + function unlockRegistry() external onlyOwner { + s_registryLocked = false; + emit RegistryUnlockedV1(msg.sender); + } + + // ================================================================ + // | Workflow Management | + // ================================================================ + + /// @notice Registers a new workflow. + /// @dev Registers a new workflow after validating the caller, DON ID, workflow name, and workflow metadata. + /// This function performs the following steps: + /// - Validates the caller is authorized and the DON ID is allowed. + /// - Validates the workflow metadata (workflowID, binaryURL, configURL, secretsURL) lengths. + /// - Checks if the workflow with the given name already exists for the owner. + /// - Stores the workflow metadata in the appropriate mappings for the owner and DON. + /// - Adds the secretsURL to the hash mapping if present. + /// + /// Requirements: + /// - Caller must be an authorized address. + /// - The provided DON ID must be allowed. + /// - The workflow name must not exceed `MAX_WORKFLOW_NAME_LENGTH`. + /// - Workflow metadata must be valid and adhere to set requirements. + /// - Workflow with the given name must not already exist for the owner. + /// + /// Emits: + /// - `WorkflowRegisteredV1` event upon successful registration. + /// + /// @param workflowName The human-readable name for the workflow. Must not exceed 64 characters. + /// @param workflowID The unique identifier for the workflow based on the WASM binary content, config content and + /// secrets URL. + /// @param donID The unique identifier of the Workflow DON that this workflow is associated with. + /// @param status Initial status for this workflow after registration (e.g., Active or Paused). + /// @param binaryURL The URL pointing to the WASM binary for the workflow. + /// @param configURL The URL pointing to the configuration file for the workflow. + /// @param secretsURL The URL pointing to the secrets file for the workflow. Can be empty if there are no secrets. + function registerWorkflow( + string calldata workflowName, + bytes32 workflowID, + uint32 donID, + WorkflowStatus status, + string calldata binaryURL, + string calldata configURL, + string calldata secretsURL + ) external registryNotLocked { + _validatePermissions(donID, msg.sender); + _validateWorkflowName(bytes(workflowName).length); + _validateWorkflowMetadata(workflowID, bytes(binaryURL).length, bytes(configURL).length, bytes(secretsURL).length); + + bytes32 workflowKey = computeHashKey(msg.sender, workflowName); + if (s_workflows[workflowKey].owner != address(0)) { + revert WorkflowAlreadyRegistered(); + } + + // Create new workflow entry + s_workflows[workflowKey] = WorkflowMetadata({ + workflowID: workflowID, + owner: msg.sender, + donID: donID, + status: status, + workflowName: workflowName, + binaryURL: binaryURL, + configURL: configURL, + secretsURL: secretsURL + }); + + s_ownerWorkflowKeys[msg.sender].add(workflowKey); + s_donWorkflowKeys[donID].add(workflowKey); + + // Hash the secretsURL and add the workflow to the secrets hash mapping + if (bytes(secretsURL).length > 0) { + bytes32 secretsHash = computeHashKey(msg.sender, secretsURL); + s_secretsHashToWorkflows[secretsHash].add(workflowKey); + } + + emit WorkflowRegisteredV1(workflowID, msg.sender, donID, status, workflowName, binaryURL, configURL, secretsURL); + } + + /// @notice Updates the workflow metadata for a given workflow. + /// @dev Updates the workflow metadata based on the provided parameters. + /// - If a field needs to be updated, the new value should be provided. + /// - If the value should remain unchanged, provide the same value as before. + /// - To remove an optional field (such as `configURL` or `secretsURL`), pass an empty string (""). + /// - To get the workflowKey, use `computeHashKey` with the workflow owner's address and the workflow name, or + /// perform an offchain equivalent of keccak256(abi.encodePacked(owner, workflowName)). + /// + /// This function performs the following steps: + /// - Validates the provided workflow metadata. + /// - Retrieves the workflow by the caller's address and `workflowName`. + /// - Updates only the fields that have changed. + /// - Ensures that the workflow ID (`newWorkflowID`) must change and at least one of the URLs must also change. + /// - Updates the `secretsURL` hash mappings if the `secretsURL` changes. + /// + /// Requirements: + /// - `binaryURL` must always be provided, as it is required. + /// - If only one field is being updated, the other fields must be provided with their current values to keep them unchanged, otherwise + /// they will be treated as empty strings. + /// - The DON ID must be in the allowed list to perform updates. + /// - The caller must be an authorized address. This means that even if the caller is the owner of the workflow, if they were later + /// removed from the authorized addresses list, they will not be able to perform updates. + /// + /// Emits: + /// - `WorkflowUpdatedV1` event indicating the workflow has been successfully updated. + /// + /// @param workflowKey The unique identifier for the workflow. + /// @param newWorkflowID The rehashed unique identifier for the workflow. + /// @param binaryURL The URL pointing to the WASM binary. Must always be provided. + /// @param configURL The URL pointing to the configuration file. Provide an empty string ("") to remove it. + /// @param secretsURL The URL pointing to the secrets file. Provide an empty string ("") to remove it. + function updateWorkflow( + bytes32 workflowKey, + bytes32 newWorkflowID, + string calldata binaryURL, + string calldata configURL, + string calldata secretsURL + ) external registryNotLocked { + _validateWorkflowMetadata(newWorkflowID, bytes(binaryURL).length, bytes(configURL).length, bytes(secretsURL).length); + + WorkflowMetadata storage workflow = _getWorkflowFromStorage(msg.sender, workflowKey); + + uint32 donID = workflow.donID; + _validatePermissions(donID, msg.sender); + + // Store the old workflowID for event emission. + bytes32 currentWorkflowID = workflow.workflowID; + + // Condition to revert: WorkflowID must change, and at least one URL must change + if (currentWorkflowID == newWorkflowID) { + revert WorkflowIDNotUpdated(); + } + + // Determine which URLs have changed + bool sameBinaryURL = Strings.equal(workflow.binaryURL, binaryURL); + bool sameConfigURL = Strings.equal(workflow.configURL, configURL); + bool sameSecretsURL = Strings.equal(workflow.secretsURL, secretsURL); + if (sameBinaryURL && sameConfigURL && sameSecretsURL) { + revert WorkflowContentNotUpdated(); + } + + // Update all fields that have changed and the relevant sets + workflow.workflowID = newWorkflowID; + if (!sameBinaryURL) { + workflow.binaryURL = binaryURL; + } + if (!sameConfigURL) { + workflow.configURL = configURL; + } + if (!sameSecretsURL) { + // Remove the old secrets hash if secretsURL is not empty + if (bytes(workflow.secretsURL).length > 0) { + // Using keccak256 instead of _computeOwnerAndStringFieldHashKey as currentSecretsURL is memory + bytes32 oldSecretsHash = keccak256(abi.encodePacked(msg.sender, workflow.secretsURL)); + s_secretsHashToWorkflows[oldSecretsHash].remove(workflowKey); + } + + workflow.secretsURL = secretsURL; + + // Add the new secrets hash if secretsURL is not empty + if (bytes(secretsURL).length > 0) { + bytes32 newSecretsHash = computeHashKey(msg.sender, secretsURL); + s_secretsHashToWorkflows[newSecretsHash].add(workflowKey); + } + } + + // Emit an event after updating the workflow + emit WorkflowUpdatedV1( + currentWorkflowID, msg.sender, donID, newWorkflowID, workflow.workflowName, binaryURL, configURL, secretsURL + ); + } + + /// @notice Pauses an existing workflow. + /// @dev Workflows with any DON ID can be paused. If a caller was later removed from the authorized addresses list, + /// they will still be able to pause the workflow. + /// + /// To get the workflowKey, use `computeHashKey` with the workflow owner's address and the workflow name, or perform + /// an offchain equivalent of `keccak256(abi.encodePacked(owner, workflowName))`. + /// @param workflowKey The unique identifier for the workflow. + function pauseWorkflow( + bytes32 workflowKey + ) external registryNotLocked { + _updateWorkflowStatus(workflowKey, WorkflowStatus.PAUSED); + } + + /// @notice Activates an existing workflow. + /// @dev The DON ID for the workflow must be in the allowed list to perform this action. The caller must also be an + /// authorized address. This means that even if the caller is the owner of the workflow, if they were later removed + /// from the authorized addresses list, they will not be able to activate the workflow. + /// + /// To get the workflowKey, use `computeHashKey` with the workflow owner's address and the workflow name, or perform + /// an offchain equivalent of `keccak256(abi.encodePacked(owner, workflowName))`. + /// @param workflowKey The unique identifier for the workflow. + function activateWorkflow( + bytes32 workflowKey + ) external registryNotLocked { + _updateWorkflowStatus(workflowKey, WorkflowStatus.ACTIVE); + } + + /// @notice Deletes an existing workflow, removing it from the contract storage. + /// @dev This function permanently removes a workflow associated with the caller's address. + /// - Workflows with any DON ID can be deleted. + /// - The caller must also be an authorized address. This means that even if the caller is the owner of the workflow, + /// if they were later removed from the authorized addresses list, they will not be able to delete the workflow. + /// - To get the workflowKey, use `computeHashKey` with the workflow owner's address and the workflow name, or + /// perform an offchain equivalent of `keccak256(abi.encodePacked(owner, workflowName))`. + /// + /// The function performs the following operations: + /// - Retrieves the workflow metadata using the workflow name and owner address. + /// - Ensures that only the owner of the workflow can perform this operation. + /// - Deletes the workflow from the `s_workflows` mapping. + /// - Removes the workflow from associated sets (`s_ownerWorkflowKeys`, `s_donWorkflowKeys`, and + /// `s_secretsHashToWorkflows`). + /// + /// Requirements: + /// - The caller must be the owner of the workflow and an authorized address. + /// + /// Emits: + /// - `WorkflowDeletedV1` event indicating that the workflow has been deleted successfully. + /// + /// @param workflowKey The unique identifier for the workflow. + function deleteWorkflow( + bytes32 workflowKey + ) external registryNotLocked { + address sender = msg.sender; + + // Retrieve workflow metadata from storage + WorkflowMetadata storage workflow = _getWorkflowFromStorage(sender, workflowKey); + uint32 donID = workflow.donID; + + // Only checking access for the caller instead of using _validatePermissions so that even if the DON was removed from the + // allowed list, the workflow can still be deleted. + if (!s_authorizedAddresses.contains(sender)) { + revert AddressNotAuthorized(sender); + } + + // Remove the workflow from the owner and DON mappings + s_ownerWorkflowKeys[sender].remove(workflowKey); + s_donWorkflowKeys[donID].remove(workflowKey); + + // Remove the workflow from the secrets hash set if secretsURL is not empty + if (bytes(workflow.secretsURL).length > 0) { + // Using keccak256 instead of _computeOwnerAndStringFieldHashKey as secretsURL is storage ref + bytes32 secretsHash = keccak256(abi.encodePacked(sender, workflow.secretsURL)); + s_secretsHashToWorkflows[secretsHash].remove(workflowKey); + } + + // Delete the workflow metadata from storage + delete s_workflows[workflowKey]; + + // Emit an event indicating the workflow has been deleted + emit WorkflowDeletedV1(workflow.workflowID, sender, donID, workflow.workflowName); + } + + /// @notice Requests a force update for workflows that share the same secrets URL. + /// @dev This function allows an owner to request a force update for all workflows that share a given `secretsURL`. + /// The `secretsURL` can be shared between multiple workflows, but they must all belong to the same owner. This + /// function ensures that the caller owns all workflows associated with the given `secretsURL`. + /// If you need to compare the `secretsHash` outside the contract, use `computeHashKey` with the owner's address and + /// the `secretsURL` string passed into this function. + /// + /// The function performs the following steps: + /// - Hashes the provided `secretsURL` and `msg.sender` to generate a unique mapping key. + /// - Retrieves all workflows associated with the given secrets hash. + /// - Collects the names of all matching workflows and emits an event indicating a force update request. + /// + /// Requirements: + /// - The caller must be the owner of all workflows that share the given `secretsURL`. + /// + /// Emits: + /// - `WorkflowForceUpdateSecretsRequestedV1` event indicating that a force update for workflows using this + /// `secretsURL` has been requested. + /// @param secretsURL The URL pointing to the updated secrets file. This can be shared among multiple workflows. + function requestForceUpdateSecrets( + string calldata secretsURL + ) external registryNotLocked { + address sender = msg.sender; + + // Use secretsURL and sender hash key to get the mapping key + bytes32 secretsHash = computeHashKey(sender, secretsURL); + + // Retrieve all workflow keys associated with the given secrets hash + EnumerableSet.Bytes32Set storage workflowKeys = s_secretsHashToWorkflows[secretsHash]; + uint256 matchCount = workflowKeys.length(); + + // No workflows found with the provided secretsURL + if (matchCount == 0) { + revert WorkflowDoesNotExist(); + } + + // Iterate through matched workflows and emit events for accessible ones + for (uint256 i = 0; i < matchCount; ++i) { + bytes32 workflowKey = workflowKeys.at(i); + WorkflowMetadata storage workflow = s_workflows[workflowKey]; + + if (s_allowedDONs.contains(workflow.donID) && s_authorizedAddresses.contains(sender)) { + emit WorkflowForceUpdateSecretsRequestedV1(sender, secretsHash, workflow.workflowName); + } + } + } + + /// @dev Internal function to update the workflow status. + /// + /// This function is used to change the status of an existing workflow, either to "Paused" or "Active". + /// + /// The function performs the following operations: + /// - Retrieves the workflow metadata from storage based on the workflow name. + /// - Only the owner of the workflow can update the status. + /// - Checks if the workflow is already in the desired status, and reverts if no change is necessary to avoid + /// unnecessary storage writes. + /// - Updates the status of the workflow and emits the appropriate event (`WorkflowPausedV1` or + /// `WorkflowActivatedV1`). + /// + /// Emits: + /// - `WorkflowPausedV1` or `WorkflowActivatedV1` event indicating that the relevant workflow status has been updated. + /// @param workflowKey The unique identifier for the workflow. + /// @param newStatus The new status to set for the workflow (either `Paused` or `Active`). + function _updateWorkflowStatus(bytes32 workflowKey, WorkflowStatus newStatus) internal { + address sender = msg.sender; + + // Retrieve workflow metadata once + WorkflowMetadata storage workflow = _getWorkflowFromStorage(sender, workflowKey); + uint32 donID = workflow.donID; + + // Avoid unnecessary storage writes if already in the desired status + if (workflow.status == newStatus) { + revert WorkflowAlreadyInDesiredStatus(); + } + + // Check if the DON ID is allowed when activating a workflow + if (newStatus == WorkflowStatus.ACTIVE) { + _validatePermissions(donID, sender); + } + + // Update the workflow status + workflow.status = newStatus; + + // Emit the appropriate event based on newStatus + if (newStatus == WorkflowStatus.PAUSED) { + emit WorkflowPausedV1(workflow.workflowID, sender, donID, workflow.workflowName); + } else if (newStatus == WorkflowStatus.ACTIVE) { + emit WorkflowActivatedV1(workflow.workflowID, sender, donID, workflow.workflowName); + } + } + + /// @dev Internal function to retrieve a workflow from storage. + /// @param sender The address of the caller. Must be the owner of the workflow. + /// @param workflowKey The unique identifier for the workflow. + /// @return workflow The workflow metadata. + function _getWorkflowFromStorage( + address sender, + bytes32 workflowKey + ) internal view returns (WorkflowMetadata storage workflow) { + workflow = s_workflows[workflowKey]; + + if (workflow.owner == address(0)) revert WorkflowDoesNotExist(); + if (workflow.owner != sender) revert CallerIsNotWorkflowOwner(sender); + + return workflow; + } + + // ================================================================ + // | Workflow Queries | + // ================================================================ + + /// @notice Returns workflow metadata. + /// @param workflowOwner Address that owns this workflow. + /// @param workflowName The human-readable name for the workflow. + /// @return WorkflowMetadata The metadata of the workflow. + function getWorkflowMetadata( + address workflowOwner, + string calldata workflowName + ) external view returns (WorkflowMetadata memory) { + bytes32 workflowKey = computeHashKey(workflowOwner, workflowName); + WorkflowMetadata storage workflow = s_workflows[workflowKey]; + + if (workflow.owner == address(0)) revert WorkflowDoesNotExist(); + + return workflow; + } + + /// @notice Retrieves a list of workflow metadata for a specific owner. + /// @dev This function allows paginated retrieval of workflows owned by a particular address. If the `limit` is set + /// to 0 or exceeds the `MAX_PAGINATION_LIMIT`, the `MAX_PAGINATION_LIMIT` will be used instead in both cases. + /// @param workflowOwner The address of the workflow owner for whom the workflow metadata is being retrieved. + /// @param start The index at which to start retrieving workflows (zero-based index). If the start index is greater + /// than or equal to the total number of workflows, an empty array is returned. + /// @param limit The maximum number of workflow metadata entries to retrieve. If the limit exceeds the available + /// number of workflows from the start index, only the available entries are returned. + /// @return workflowMetadataList An array of `WorkflowMetadata` structs containing metadata of workflows owned by + /// the specified owner. + function getWorkflowMetadataListByOwner( + address workflowOwner, + uint256 start, + uint256 limit + ) external view returns (WorkflowMetadata[] memory workflowMetadataList) { + uint256 totalWorkflows = s_ownerWorkflowKeys[workflowOwner].length(); + if (start >= totalWorkflows) { + return new WorkflowMetadata[](0); + } + + if (limit > MAX_PAGINATION_LIMIT || limit == 0) { + limit = MAX_PAGINATION_LIMIT; + } + + uint256 end = (start + limit > totalWorkflows) ? totalWorkflows : start + limit; + + uint256 resultLength = end - start; + workflowMetadataList = new WorkflowMetadata[](resultLength); + + for (uint256 i = 0; i < resultLength; ++i) { + bytes32 workflowKey = s_ownerWorkflowKeys[workflowOwner].at(start + i); + workflowMetadataList[i] = s_workflows[workflowKey]; + } + + return workflowMetadataList; + } + + /// @notice Retrieves a list of workflow metadata for a specific DON ID. + /// @dev This function allows paginated retrieval of workflows associated with a particular DON. If the `limit` is + /// set to 0 or exceeds the `MAX_PAGINATION_LIMIT`, the `MAX_PAGINATION_LIMIT` will be used instead in both cases. + /// @param donID The unique identifier of the DON whose associated workflows are being retrieved. + /// @param start The index at which to start retrieving workflows (zero-based index). If the start index is greater + /// than or equal to the total number of workflows, an empty array is returned. + /// @param limit The maximum number of workflow metadata entries to retrieve. If the limit exceeds the available + /// number of workflows from the start index, only the available entries are returned. + /// @return workflowMetadataList An array of `WorkflowMetadata` structs containing metadata of workflows associated + /// with the specified DON ID. + function getWorkflowMetadataListByDON( + uint32 donID, + uint256 start, + uint256 limit + ) external view returns (WorkflowMetadata[] memory workflowMetadataList) { + uint256 totalWorkflows = s_donWorkflowKeys[donID].length(); + if (start >= totalWorkflows) { + return new WorkflowMetadata[](0); + } + + if (limit > MAX_PAGINATION_LIMIT || limit == 0) { + limit = MAX_PAGINATION_LIMIT; + } + + uint256 end = (start + limit > totalWorkflows) ? totalWorkflows : start + limit; + + uint256 resultLength = end - start; + workflowMetadataList = new WorkflowMetadata[](resultLength); + + for (uint256 i = 0; i < resultLength; ++i) { + bytes32 workflowKey = s_donWorkflowKeys[donID].at(start + i); + workflowMetadataList[i] = s_workflows[workflowKey]; + } + + return workflowMetadataList; + } + + /// @notice Fetch all allowed DON IDs + /// @return allowedDONs List of all allowed DON IDs + function getAllAllowedDONs() external view returns (uint32[] memory allowedDONs) { + uint256 len = s_allowedDONs.length(); + allowedDONs = new uint32[](len); + for (uint256 i = 0; i < len; ++i) { + allowedDONs[i] = uint32(s_allowedDONs.at(i)); + } + + return allowedDONs; + } + + /// @notice Fetch all authorized addresses + /// @return authorizedAddresses List of all authorized addresses + function getAllAuthorizedAddresses() external view returns (address[] memory authorizedAddresses) { + uint256 len = s_authorizedAddresses.length(); + authorizedAddresses = new address[](len); + for (uint256 i = 0; i < len; ++i) { + authorizedAddresses[i] = s_authorizedAddresses.at(i); + } + + return authorizedAddresses; + } + + /// @notice Returns whether the registry is currently locked + /// @return True if the registry is locked, false otherwise + function isRegistryLocked() external view returns (bool) { + return s_registryLocked; + } + + // ================================================================ + // | Validation | + // ================================================================ + + /// @dev Internal function to validate the metadata for a workflow. + /// @param workflowID The unique identifier for the workflow. + function _validateWorkflowMetadata( + bytes32 workflowID, + uint256 binaryURLLength, + uint256 configURLLength, + uint256 secretsURLLength + ) internal pure { + if (workflowID == bytes32(0)) revert InvalidWorkflowID(); + + if (binaryURLLength > MAX_URL_LENGTH) { + revert URLTooLong(binaryURLLength, MAX_URL_LENGTH); + } + + if (configURLLength > MAX_URL_LENGTH) { + revert URLTooLong(configURLLength, MAX_URL_LENGTH); + } + + if (secretsURLLength > MAX_URL_LENGTH) { + revert URLTooLong(secretsURLLength, MAX_URL_LENGTH); + } + } + + /// @dev Internal function to validate the length of a workflow name. + /// @param workflowNameLength The workflow name to validate. + /// @custom:throws WorkflowNameTooLong if the workflow name exceeds MAX_WORKFLOW_NAME_LENGTH (64 characters). + function _validateWorkflowName( + uint256 workflowNameLength + ) internal pure { + if (workflowNameLength > MAX_WORKFLOW_NAME_LENGTH) { + revert WorkflowNameTooLong(workflowNameLength, MAX_WORKFLOW_NAME_LENGTH); + } + } + + /// @notice Validates access permissions for a given DON and caller. + /// @dev Reverts with DONNotAllowed if the DON is not allowed or AddressNotAuthorized if the caller is not authorized. + /// @param donID The ID of the DON to check. + /// @param caller The address attempting to access the DON + function _validatePermissions(uint32 donID, address caller) internal view { + if (!s_allowedDONs.contains(donID)) { + // First, ensure the DON is in the allowed list. This is separate from the permission check below because a DON + // can be removed from the allowed list without removing the permissioned addresses associated with the DON. + revert DONNotAllowed(donID); + } + + // Then, ensure the specific address is also authorized. + if (!s_authorizedAddresses.contains(caller)) revert AddressNotAuthorized(caller); + } + + /// @notice Generates a unique `workflowKey` by combining the owner's address with a specific field. + /// This is essential for managing workflows within the registry. The following functions use this as an input: + /// - updateRegistry + /// - pauseWorkflow + /// - activateWorkflow + /// - deleteWorkflow + /// If you do not have the `workflowKey` for these functions, you can compute it using this function + /// with the owner's address and the workflow name. + /// @dev This function ensures uniqueness for operations like workflow management or secrets + /// handling by hashing the owner's address together with a distinguishing field such as + /// the workflow name or secrets URL. + /// @param owner The address of the owner. Typically used to uniquely associate the field with the owner. + /// @param field A string field, such as the workflow name or secrets URL, that is used to generate the unique hash. + /// @return A unique `bytes32` hash computed from the combination of the owner's address and the given field. + function computeHashKey(address owner, string calldata field) public pure returns (bytes32) { + return keccak256(abi.encodePacked(owner, field)); + } +} diff --git a/contracts/src/v0.8/workflow/dev/WorkflowRegistryManager.sol b/contracts/src/v0.8/workflow/dev/WorkflowRegistryManager.sol new file mode 100644 index 00000000000..8c760707ee2 --- /dev/null +++ b/contracts/src/v0.8/workflow/dev/WorkflowRegistryManager.sol @@ -0,0 +1,256 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {ITypeAndVersion} from "../../shared/interfaces/ITypeAndVersion.sol"; + +import {Ownable2StepMsgSender} from "../../shared/access/Ownable2StepMsgSender.sol"; + +/// @title WorkflowRegistryManager +/// @notice This contract manages the versions of WorkflowRegistry contracts deployed over time. +/// @dev This contract allows the owner to add, activate, and manage versions of WorkflowRegistry contracts. It tracks +/// deployment information for each version, including deployment timestamp, chain ID, and active status. Only one +/// version can be active at any given time. +contract WorkflowRegistryManager is Ownable2StepMsgSender, ITypeAndVersion { + string public constant override typeAndVersion = "WorkflowRegistryManager 1.0.0-dev"; + uint8 private constant MAX_PAGINATION_LIMIT = 100; + + struct Version { + address contractAddress; // ─╮ Address of the WorkflowRegistry contract + uint64 chainID; // │ Chain ID of the EVM chain where the WorkflowRegistry is deployed. + uint32 deployedAt; // ───────╯ Block timestamp of deployment (sufficient until year 2106). + string contractTypeAndVersion; // WorkflowRegistry's typeAndVersion. + } + + /// @notice Maps version numbers to their corresponding `Version` details. + /// @dev This mapping is 1-based, meaning version numbers start from 1. Ensure that all operations account for this + /// indexing strategy to avoid off-by-one errors. + mapping(uint32 versionNumber => Version versionInfo) private s_versions; + + /// @notice The version number of the currently active WorkflowRegistry. + /// @dev Initialized to 0 to indicate no active version. Updated when a version is activated. + uint32 private s_activeVersionNumber = 0; + + /// @notice The latest version number registered in the contract. + /// @dev Incremented each time a new version is added. Useful for iterating over all registered versions. + uint32 private s_latestVersionNumber = 0; + + /// @notice Maps a combination of address and chain ID to the version number. + /// @dev This mapping allows for lookup of the version number for a given address and chain ID. + mapping(bytes32 => uint32) private s_versionNumberByAddressAndChainID; + + // Errors + error InvalidContractAddress(address invalidAddress); + error InvalidContractType(address invalidAddress); + error NoActiveVersionAvailable(); + error NoVersionsRegistered(); + error VersionNotRegistered(uint32 versionNumber); + // Events + + event VersionAdded(address indexed contractAddress, uint64 chainID, uint32 deployedAt, uint32 version); + event VersionActivated(address indexed contractAddress, uint64 chainID, uint32 indexed version); + event VersionDeactivated(address indexed contractAddress, uint64 chainID, uint32 indexed version); + + // ================================================================ + // | Manage Versions | + // ================================================================ + + /// @notice Adds a new WorkflowRegistry version to the version history and optionally activates it. + /// @dev This function records the deployment details of a new registry version. It deactivates the currently active + /// version (if any) and activates the newly added version if `autoActivate` is true. + /// @param contractAddress The address of the deployed WorkflowRegistry contract. Must be a valid contract address. + /// @param chainID The chain ID of the EVM chain where the WorkflowRegistry is deployed. + /// @param autoActivate A boolean indicating whether the new version should be activated immediately. + /// @custom:throws InvalidContractType if the provided contract address is zero or not a WorkflowRegistry. + function addVersion(address contractAddress, uint64 chainID, uint32 deployedAt, bool autoActivate) external onlyOwner { + string memory typeVer = _getTypeAndVersionForContract(contractAddress); + uint32 latestVersionNumber = ++s_latestVersionNumber; + + s_versions[latestVersionNumber] = Version({ + contractAddress: contractAddress, + chainID: chainID, + deployedAt: deployedAt, + contractTypeAndVersion: typeVer + }); + + // Store the version number associated with the hash of contract address and chainID + bytes32 key = keccak256(abi.encodePacked(contractAddress, chainID)); + s_versionNumberByAddressAndChainID[key] = latestVersionNumber; + + if (autoActivate) { + _activateVersion(latestVersionNumber); + } + + emit VersionAdded(contractAddress, chainID, deployedAt, latestVersionNumber); + } + + /// @notice Activates a specific WorkflowRegistry version by its version number. + /// @dev This contract uses a 1-based index, meaning the `versionNumber` parameter must start at 1, with 1 representing the + /// first version. Setting `versionNumber` to 0 will revert, as 0 is not a valid index in this context. Only one version + /// can be active at a time; activating a new version automatically deactivates the currently active one (if any). + /// @param versionNumber The 1-based version number to activate (minimum value is 1). + /// @custom:throws VersionNotRegistered if the `versionNumber` is not valid or not registered. + function activateVersion( + uint32 versionNumber + ) external onlyOwner { + _activateVersion(versionNumber); + } + + /// @dev This private function deactivates the currently active version (if any) before activating the specified version. It + /// emits events for both deactivation and activation. + /// @param versionNumber The version number of the version to activate. + /// @custom:throws IndexOutOfBounds if the version number does not exist. + function _activateVersion( + uint32 versionNumber + ) private { + // Check that the provided version number is within a valid range + if (versionNumber == 0 || versionNumber > s_latestVersionNumber) { + revert VersionNotRegistered(versionNumber); + } + + // Cache the current active version number to reduce storage reads + uint32 currentActiveVersionNumber = s_activeVersionNumber; + + // Emit deactivation event if there is an active version + if (currentActiveVersionNumber != 0) { + Version memory currentActive = s_versions[currentActiveVersionNumber]; + emit VersionDeactivated(currentActive.contractAddress, currentActive.chainID, currentActiveVersionNumber); + } + + // Set the new active version (which deactivates the previous one) + s_activeVersionNumber = versionNumber; + Version memory newActive = s_versions[versionNumber]; + emit VersionActivated(newActive.contractAddress, newActive.chainID, versionNumber); + } + + // ================================================================ + // | Query Versions | + // ================================================================ + + /// @notice Returns a paginated list of all WorkflowRegistry versions. + /// @dev This function retrieves a range of versions based on the provided `start` and `limit` parameters. The contract uses + /// a 1-based index, so the `start` parameter must be at least 1, representing the first version. If `limit` is set to + /// 0 or exceeds `MAX_PAGINATION_LIMIT`, it defaults to `MAX_PAGINATION_LIMIT`. If `start` exceeds the total number of + /// versions, an empty array is returned. + /// @param start The index at which to start retrieving versions (1-based index, minimum value is 1). + /// @param limit The maximum number of versions to retrieve (maximum is `MAX_PAGINATION_LIMIT`). + /// @return versions An array of `Version` structs containing version details, starting from the `start` index up to the + /// specified `limit`. + function getAllVersions(uint32 start, uint32 limit) external view returns (Version[] memory versions) { + uint32 totalVersions = s_latestVersionNumber; + + // Adjust for 1-based index + if (start == 0 || start > totalVersions) { + return new Version[](0); + } + + if (limit > MAX_PAGINATION_LIMIT || limit == 0) { + limit = MAX_PAGINATION_LIMIT; + } + + uint32 end = (start + limit - 1 > totalVersions) ? totalVersions : start + limit - 1; + uint32 resultLength = end - start + 1; + + versions = new Version[](resultLength); + for (uint32 i = 0; i < resultLength; ++i) { + versions[i] = s_versions[start + i]; + } + + return versions; + } + + /// @notice Retrieves the details of a specific WorkflowRegistry version by its version number. + /// @dev This contract uses a 1-based index, so `versionNumber` must be at least 1. This means the first version is + /// represented by `versionNumber` of 1, not 0. Attempting to retrieve a version with a `versionNumber` of 0 or exceeding + /// `s_latestVersionNumber` will revert. + /// @param versionNumber The 1-based version number of the version to retrieve (minimum value is 1). + /// @return A `Version` struct containing the details of the specified version. + /// @custom:throws VersionNotRegistered if the `versionNumber` is not valid or not registered. + function getVersion( + uint32 versionNumber + ) external view returns (Version memory) { + if (versionNumber == 0 || versionNumber > s_latestVersionNumber) { + revert VersionNotRegistered(versionNumber); + } + return s_versions[versionNumber]; + } + + /// @notice Retrieves the version number for a specific WorkflowRegistry by its contract address and chain ID. + /// @param contractAddress The address of the WorkflowRegistry contract. + /// @param chainID The chain ID of the network where the WorkflowRegistry is deployed. + /// @return versionNumber The version number associated with the given contract address and chain ID. + function getVersionNumber(address contractAddress, uint64 chainID) external view returns (uint32 versionNumber) { + _validateContractAddress(contractAddress); + + bytes32 key = keccak256(abi.encodePacked(contractAddress, chainID)); + versionNumber = s_versionNumberByAddressAndChainID[key]; + if (versionNumber == 0) { + revert NoVersionsRegistered(); + } + return versionNumber; + } + + /// @notice Retrieves the details of the currently active WorkflowRegistry version. + /// @dev Assumes there is only one active version. Throws if no version is currently active. + /// @return A `Version` struct containing the details of the active version. + /// @custom:throws NoActiveVersionAvailable if no version is currently active. + function getActiveVersion() external view returns (Version memory) { + uint32 activeVersionNumber = s_activeVersionNumber; + if (activeVersionNumber == 0) revert NoActiveVersionAvailable(); + return s_versions[activeVersionNumber]; + } + + /// @notice Retrieves the details of the latest registered WorkflowRegistry version. + /// @return A `Version` struct containing the details of the latest version. + /// @custom:throws NoActiveVersionAvailable if no versions have been registered. + function getLatestVersion() external view returns (Version memory) { + uint32 latestVersionNumber = s_latestVersionNumber; + if (latestVersionNumber == 0) revert NoActiveVersionAvailable(); + return s_versions[latestVersionNumber]; + } + + /// @notice Retrieves the version number of the currently active WorkflowRegistry version. + /// @return activeVersionNumber The version number of the active version. + /// @custom:throws NoActiveVersionAvailable if s_activeVersionNumber is `type(uint32).max`. + function getActiveVersionNumber() external view returns (uint32 activeVersionNumber) { + activeVersionNumber = s_activeVersionNumber; + if (activeVersionNumber == 0) revert NoActiveVersionAvailable(); + return activeVersionNumber; + } + + /// @notice Retrieves the version number of the latest registered WorkflowRegistry version. + /// @return latestVersionNumber The version number of the latest version. + /// @custom:throws NoVersionsRegistered if s_latestVersionNumber is 0. + function getLatestVersionNumber() external view returns (uint32 latestVersionNumber) { + latestVersionNumber = s_latestVersionNumber; + if (latestVersionNumber == 0) revert NoVersionsRegistered(); + return latestVersionNumber; + } + + // ================================================================ + // | Validation | + // ================================================================ + + /// @dev Validates that a given contract address is non-zero, contains code, and implements typeAndVersion(). + /// @param contractAddress The address of the contract to validate. + /// @custom:throws InvalidContractAddress if the address is zero or contains no code. + /// @custom:throws InvalidContractType if the contract does not implement typeAndVersion(). + function _getTypeAndVersionForContract( + address contractAddress + ) internal view returns (string memory) { + _validateContractAddress(contractAddress); + + try ITypeAndVersion(contractAddress).typeAndVersion() returns (string memory retrievedVersion) { + return retrievedVersion; + } catch { + revert InvalidContractType(contractAddress); + } + } + + function _validateContractAddress( + address _addr + ) internal view { + if (_addr == address(0) || _addr.code.length == 0) { + revert InvalidContractAddress(_addr); + } + } +} diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.activateWorkflow.t.sol b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.activateWorkflow.t.sol new file mode 100644 index 00000000000..47858774e0d --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.activateWorkflow.t.sol @@ -0,0 +1,116 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {WorkflowRegistry} from "../../dev/WorkflowRegistry.sol"; +import {WorkflowRegistrySetup} from "./WorkflowRegistrySetup.t.sol"; + +contract WorkflowRegistry_activateWorkflow is WorkflowRegistrySetup { + function test_RevertWhen_TheRegistryIsLocked() external { + // Register a workflow first. + _registerValidWorkflow(); + + // Lock the registry as the owner. + vm.prank(s_owner); + s_registry.lockRegistry(); + + // Attempt to activate the workflow now after the registry is locked. + vm.prank(s_authorizedAddress); + vm.expectRevert(WorkflowRegistry.RegistryLocked.selector); + s_registry.activateWorkflow(s_validWorkflowKey); + } + + // whenTheRegistryIsNotLocked + function test_RevertWhen_TheCallerIsNotTheWorkflowOwner() external { + // Register a workflow first. + _registerValidWorkflow(); + + // Add the previously unauthorized address to the authorized addresses list. + _addAddressToAuthorizedAddresses(s_unauthorizedAddress); + + // Update the workflow now as the new authorized user. + vm.prank(s_unauthorizedAddress); + vm.expectRevert(abi.encodeWithSelector(WorkflowRegistry.CallerIsNotWorkflowOwner.selector, s_unauthorizedAddress)); + s_registry.activateWorkflow(s_validWorkflowKey); + } + + // whenTheRegistryIsNotLocked whenTheCallerIsTheWorkflowOwner + function test_RevertWhen_TheWorkflowIsAlreadyActive() external { + // Register a workflow first. + _registerValidWorkflow(); + + // Attempt to activate the workflow. + vm.prank(s_authorizedAddress); + vm.expectRevert(WorkflowRegistry.WorkflowAlreadyInDesiredStatus.selector); + s_registry.activateWorkflow(s_validWorkflowKey); + } + + // whenTheRegistryIsNotLocked whenTheCallerIsTheWorkflowOwner whenTheWorkflowIsPaused + function test_RevertWhen_TheDonIDIsNotAllowed() external { + // Register a paused workflow first. + vm.prank(s_authorizedAddress); + s_registry.registerWorkflow( + s_validWorkflowName, + s_validWorkflowID, + s_allowedDonID, + WorkflowRegistry.WorkflowStatus.PAUSED, + s_validBinaryURL, + s_validConfigURL, + s_validSecretsURL + ); + + // Remove the DON from the allowed DONs list. + _removeDONFromAllowedDONs(s_allowedDonID); + + // Attempt to activate the workflow. + vm.prank(s_authorizedAddress); + vm.expectRevert(abi.encodeWithSelector(WorkflowRegistry.DONNotAllowed.selector, s_allowedDonID)); + s_registry.activateWorkflow(s_validWorkflowKey); + } + + // whenTheRegistryIsNotLocked whenTheCallerIsTheWorkflowOwner whenTheWorkflowIsPaused whenTheDonIDIsAllowed + function test_RevertWhen_TheCallerIsNotAnAuthorizedAddress() external { + // Register a paused workflow first. + vm.prank(s_authorizedAddress); + s_registry.registerWorkflow( + s_validWorkflowName, + s_validWorkflowID, + s_allowedDonID, + WorkflowRegistry.WorkflowStatus.PAUSED, + s_validBinaryURL, + s_validConfigURL, + s_validSecretsURL + ); + + // Remove the address from the authorized addresses list. + _removeAddressFromAuthorizedAddresses(s_authorizedAddress); + + // Attempt to activate the workflow. + vm.prank(s_authorizedAddress); + vm.expectRevert(abi.encodeWithSelector(WorkflowRegistry.AddressNotAuthorized.selector, s_authorizedAddress)); + s_registry.activateWorkflow(s_validWorkflowKey); + } + + // whenTheRegistryIsNotLocked whenTheCallerIsTheWorkflowOwner whenTheWorkflowIsPaused whenTheDonIDIsAllowed + function test_WhenTheCallerIsAnAuthorizedAddress() external { + // Register a paused workflow first. + vm.prank(s_authorizedAddress); + s_registry.registerWorkflow( + s_validWorkflowName, + s_validWorkflowID, + s_allowedDonID, + WorkflowRegistry.WorkflowStatus.PAUSED, + s_validBinaryURL, + s_validConfigURL, + s_validSecretsURL + ); + + // Activate the workflow. + vm.prank(s_authorizedAddress); + s_registry.activateWorkflow(s_validWorkflowKey); + + // Check that the workflow is active. + WorkflowRegistry.WorkflowMetadata memory workflow = + s_registry.getWorkflowMetadata(s_authorizedAddress, s_validWorkflowName); + assertTrue(workflow.status == WorkflowRegistry.WorkflowStatus.ACTIVE); + } +} diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.activateWorkflow.tree b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.activateWorkflow.tree new file mode 100644 index 00000000000..3d71d5844db --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.activateWorkflow.tree @@ -0,0 +1,17 @@ +WorkflowRegistry.activateWorkflow +├── when the registry is locked +│ └── it should revert +└── when the registry is not locked + ├── when the caller is not the workflow owner + │ └── it should revert + └── when the caller is the workflow owner + ├── when the workflow is already paused + │ └── it should revert + └── when the workflow is paused + ├── when the donID is not allowed + │ └── it should revert + └── when the donID is allowed + └── when the caller is not an authorized address + │ └── it should revert + └── when the caller is an authorized address + └── it should activate the workflow diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.deleteWorkflow.t.sol b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.deleteWorkflow.t.sol new file mode 100644 index 00000000000..bbc4c7bb33a --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.deleteWorkflow.t.sol @@ -0,0 +1,90 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {WorkflowRegistry} from "../../dev/WorkflowRegistry.sol"; +import {WorkflowRegistrySetup} from "./WorkflowRegistrySetup.t.sol"; + +contract WorkflowRegistry_deleteWorkflow is WorkflowRegistrySetup { + function test_RevertWhen_TheRegistryIsLocked() external { + // Register a workflow first. + _registerValidWorkflow(); + + // Lock the registry as the owner. + vm.prank(s_owner); + s_registry.lockRegistry(); + + // Attempt to delete the workflow now after the registry is locked. + vm.prank(s_authorizedAddress); + vm.expectRevert(WorkflowRegistry.RegistryLocked.selector); + s_registry.deleteWorkflow(s_validWorkflowKey); + } + + // whenTheRegistryIsNotLocked + function test_RevertWhen_TheCallerIsNotTheWorkflowOwner() external { + // Register a workflow first. + _registerValidWorkflow(); + + // Add the previously unauthorized address to the authorized addresses list. + _addAddressToAuthorizedAddresses(s_unauthorizedAddress); + + // Update the workflow now as the new authorized user. + vm.prank(s_unauthorizedAddress); + vm.expectRevert(abi.encodeWithSelector(WorkflowRegistry.CallerIsNotWorkflowOwner.selector, s_unauthorizedAddress)); + s_registry.deleteWorkflow(s_validWorkflowKey); + } + + // whenTheRegistryIsNotLocked whenTheCallerIsTheWorkflowOwner + function test_RevertWhen_TheCallerIsNotAnAuthorizedAddress() external { + // Register the workflow first as an authorized address. + _registerValidWorkflow(); + + // Remove the address from the authorized addresses list. + _removeAddressFromAuthorizedAddresses(s_authorizedAddress); + + // Delete the workflow now after the workflow owner is no longer an authorized address. + vm.prank(s_authorizedAddress); + vm.expectRevert(abi.encodeWithSelector(WorkflowRegistry.AddressNotAuthorized.selector, s_authorizedAddress)); + s_registry.deleteWorkflow(s_validWorkflowKey); + } + + // whenTheRegistryIsNotLocked whenTheCallerIsTheWorkflowOwner + function test_WhenTheCallerIsAnAuthorizedAddress_AndTheDonIDIsAllowed() external { + // Register the workflow. + _registerValidWorkflow(); + + // Check that the workflow exists. + WorkflowRegistry.WorkflowMetadata memory workflow = + s_registry.getWorkflowMetadata(s_authorizedAddress, s_validWorkflowName); + assertEq(workflow.workflowName, s_validWorkflowName); + + // Delete the workflow. + vm.prank(s_authorizedAddress); + s_registry.deleteWorkflow(s_validWorkflowKey); + + // Check that the workflow was deleted. + vm.expectRevert(WorkflowRegistry.WorkflowDoesNotExist.selector); + s_registry.getWorkflowMetadata(s_authorizedAddress, s_validWorkflowName); + } + + // whenTheRegistryIsNotLocked whenTheCallerIsTheWorkflowOwner + function test_WhenTheCallerIsAnAuthorizedAddress_AndTheDonIDIsNotAllowed() external { + // Register the workflow. + _registerValidWorkflow(); + + // Check that the workflow exists. + WorkflowRegistry.WorkflowMetadata memory workflow = + s_registry.getWorkflowMetadata(s_authorizedAddress, s_validWorkflowName); + assertEq(workflow.workflowName, s_validWorkflowName); + + // Remove the DON from the allowed DONs list. + _removeDONFromAllowedDONs(s_allowedDonID); + + // Delete the workflow. + vm.prank(s_authorizedAddress); + s_registry.deleteWorkflow(s_validWorkflowKey); + + // Check that the workflow was deleted. + vm.expectRevert(WorkflowRegistry.WorkflowDoesNotExist.selector); + s_registry.getWorkflowMetadata(s_authorizedAddress, s_validWorkflowName); + } +} diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.deleteWorkflow.tree b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.deleteWorkflow.tree new file mode 100644 index 00000000000..510906137b9 --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.deleteWorkflow.tree @@ -0,0 +1,12 @@ +WorkflowRegistry.deleteWorkflow +├── when the registry is locked +│ └── it should revert +└── when the registry is not locked + ├── when the caller is not the workflow owner + │ └── it should revert + └── when the caller is the workflow owner + ├── when the caller is not an authorized address + │ └── it should revert + └── when the caller is an authorized address + ├── it should delete the workflow if the donID is not allowed + └── it should delete the workflow if the donID is allowed diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.getAllAllowedDONs.t.sol b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.getAllAllowedDONs.t.sol new file mode 100644 index 00000000000..d6c76d369c0 --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.getAllAllowedDONs.t.sol @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {WorkflowRegistrySetup} from "./WorkflowRegistrySetup.t.sol"; + +contract WorkflowRegistry_getAllAllowedDONs is WorkflowRegistrySetup { + function test_WhenTheSetOfAllowedDONsIsEmpty() external { + // Remove the allowed DON added in the setup + _removeDONFromAllowedDONs(s_allowedDonID); + uint32[] memory allowedDONs = s_registry.getAllAllowedDONs(); + assertEq(allowedDONs.length, 0); + } + + function test_WhenThereIsASingleAllowedDON() external view { + uint32[] memory allowedDONs = s_registry.getAllAllowedDONs(); + assertEq(allowedDONs.length, 1); + assertEq(allowedDONs[0], s_allowedDonID); + } + + function test_WhenThereAreMultipleAllowedDONs() external { + // Add a second DON to the allowed DONs list + uint32 allowedDonID2 = 2; + uint32[] memory donIDsToAdd = new uint32[](1); + donIDsToAdd[0] = allowedDonID2; + + vm.prank(s_owner); + s_registry.updateAllowedDONs(donIDsToAdd, true); + + uint32[] memory allowedDONs = s_registry.getAllAllowedDONs(); + assertEq(allowedDONs.length, 2); + assertEq(allowedDONs[0], s_allowedDonID); + assertEq(allowedDONs[1], allowedDonID2); + } +} diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.getAllAllowedDONs.tree b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.getAllAllowedDONs.tree new file mode 100644 index 00000000000..5e0d4e8d550 --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.getAllAllowedDONs.tree @@ -0,0 +1,7 @@ +WorkflowRegistry.getAllAllowedDONs +├── when the set of allowed DONs is empty +│ └── it should return an empty array +├── when there is a single allowed DON +│ └── it should return an array with one element +└── when there are multiple allowed DONs + └── it should return an array with all the allowed DONs diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.getAllAuthorizedAddresses.t.sol b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.getAllAuthorizedAddresses.t.sol new file mode 100644 index 00000000000..0b47da3938c --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.getAllAuthorizedAddresses.t.sol @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {WorkflowRegistrySetup} from "./WorkflowRegistrySetup.t.sol"; + +contract WorkflowRegistrygetAllAuthorizedAddresses is WorkflowRegistrySetup { + function test_WhenTheSetOfAuthorizedAddressesIsEmpty() external { + // Remove the authorized address added in the setup + _removeAddressFromAuthorizedAddresses(s_authorizedAddress); + address[] memory authorizedAddresses = s_registry.getAllAuthorizedAddresses(); + assertEq(authorizedAddresses.length, 0); + } + + function test_WhenThereIsASingleAuthorizedAddress() external view { + // it should return an array with one element + address[] memory authorizedAddresses = s_registry.getAllAuthorizedAddresses(); + assertEq(authorizedAddresses.length, 1); + assertEq(authorizedAddresses[0], s_authorizedAddress); + } + + function test_WhenThereAreMultipleAuthorizedAddresses() external { + // Add a second authorized address + _addAddressToAuthorizedAddresses(s_unauthorizedAddress); + + // it should return an array with all the authorized addresses + address[] memory authorizedAddresses = s_registry.getAllAuthorizedAddresses(); + assertEq(authorizedAddresses.length, 2); + assertEq(authorizedAddresses[0], s_authorizedAddress); + assertEq(authorizedAddresses[1], s_unauthorizedAddress); + } +} diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.getAllAuthorizedAddresses.tree b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.getAllAuthorizedAddresses.tree new file mode 100644 index 00000000000..86821d2f83e --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.getAllAuthorizedAddresses.tree @@ -0,0 +1,7 @@ +WorkflowRegistry.getAllAuthorizedAddresses +├── when the set of authorized addresses is empty +│ └── it should return an empty array +├── when there is a single authorized address +│ └── it should return an array with one element +└── when there are multiple authorized addresses + └── it should return an array with all the authorized addresses diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.getWorkflowMetadata.t.sol b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.getWorkflowMetadata.t.sol new file mode 100644 index 00000000000..3cd092676be --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.getWorkflowMetadata.t.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {WorkflowRegistry} from "../../dev/WorkflowRegistry.sol"; +import {WorkflowRegistrySetup} from "./WorkflowRegistrySetup.t.sol"; + +contract WorkflowRegistry_getWorkflowMetadata is WorkflowRegistrySetup { + function test_WhenTheWorkflowExistsWithTheOwnerAndName() external { + _registerValidWorkflow(); + + WorkflowRegistry.WorkflowMetadata memory metadata = + s_registry.getWorkflowMetadata(s_authorizedAddress, s_validWorkflowName); + + assertEq(metadata.workflowName, s_validWorkflowName); + assertEq(metadata.workflowID, s_validWorkflowID); + assertEq(metadata.binaryURL, s_validBinaryURL); + assertEq(metadata.configURL, s_validConfigURL); + assertEq(metadata.secretsURL, s_validSecretsURL); + } + + function test_WhenTheWorkflowDoesNotExist() external { + vm.expectRevert(WorkflowRegistry.WorkflowDoesNotExist.selector); + s_registry.getWorkflowMetadata(s_authorizedAddress, "RandomWorkflowName"); + } +} diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.getWorkflowMetadata.tree b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.getWorkflowMetadata.tree new file mode 100644 index 00000000000..f723f720528 --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.getWorkflowMetadata.tree @@ -0,0 +1,5 @@ +WorkflowRegistry.getWorkflowMetadata +├── when the workflow exists with the owner and name +│ └── it returns the correct metadata +└── when the workflow does not exist + └── it reverts with WorkflowDoesNotExist diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.getWorkflowMetadataListByDON.t.sol b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.getWorkflowMetadataListByDON.t.sol new file mode 100644 index 00000000000..14b3c96a07d --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.getWorkflowMetadataListByDON.t.sol @@ -0,0 +1,126 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {WorkflowRegistry} from "../../dev/WorkflowRegistry.sol"; +import {WorkflowRegistryWithFixture} from "./WorkflowRegistryWithFixture.t.sol"; + +contract WorkflowRegistry_getWorkflowMetadataListByDON is WorkflowRegistryWithFixture { + function test_WhenStartIs0() external view { + WorkflowRegistry.WorkflowMetadata[] memory workflows = + s_registry.getWorkflowMetadataListByDON(s_allowedDonID, 0, 10); + + assertEq(workflows.length, 3); + assertEq(workflows[0].workflowName, s_workflowName1); + assertEq(workflows[0].workflowID, s_workflowID1); + assertEq(workflows[0].binaryURL, s_binaryURL1); + assertEq(workflows[0].configURL, s_configURL1); + assertEq(workflows[0].secretsURL, s_secretsURL1); + + assertEq(workflows[1].workflowName, s_workflowName2); + assertEq(workflows[1].workflowID, s_workflowID2); + assertEq(workflows[1].binaryURL, s_binaryURL2); + assertEq(workflows[1].configURL, s_configURL2); + assertEq(workflows[1].secretsURL, s_secretsURL2); + + assertEq(workflows[2].workflowName, s_workflowName3); + assertEq(workflows[2].workflowID, s_workflowID3); + assertEq(workflows[2].binaryURL, s_binaryURL3); + assertEq(workflows[2].configURL, s_configURL3); + assertEq(workflows[2].secretsURL, s_secretsURL3); + } + + function test_WhenStartIsGreaterThan0() external view { + WorkflowRegistry.WorkflowMetadata[] memory workflows = s_registry.getWorkflowMetadataListByDON(s_allowedDonID, 1, 3); + + assertEq(workflows.length, 2); + assertEq(workflows[0].workflowName, s_workflowName2); + assertEq(workflows[0].workflowID, s_workflowID2); + assertEq(workflows[0].binaryURL, s_binaryURL2); + assertEq(workflows[0].configURL, s_configURL2); + assertEq(workflows[0].secretsURL, s_secretsURL2); + + assertEq(workflows[1].workflowName, s_workflowName3); + assertEq(workflows[1].workflowID, s_workflowID3); + assertEq(workflows[1].binaryURL, s_binaryURL3); + assertEq(workflows[1].configURL, s_configURL3); + assertEq(workflows[1].secretsURL, s_secretsURL3); + } + + function test_WhenLimitIsLessThanTotalWorkflows() external view { + WorkflowRegistry.WorkflowMetadata[] memory workflows = s_registry.getWorkflowMetadataListByDON(s_allowedDonID, 0, 2); + + assertEq(workflows.length, 2); + assertEq(workflows[0].workflowName, s_workflowName1); + assertEq(workflows[0].workflowID, s_workflowID1); + assertEq(workflows[0].binaryURL, s_binaryURL1); + assertEq(workflows[0].configURL, s_configURL1); + assertEq(workflows[0].secretsURL, s_secretsURL1); + + assertEq(workflows[1].workflowName, s_workflowName2); + assertEq(workflows[1].workflowID, s_workflowID2); + assertEq(workflows[1].binaryURL, s_binaryURL2); + assertEq(workflows[1].configURL, s_configURL2); + assertEq(workflows[1].secretsURL, s_secretsURL2); + } + + function test_WhenLimitIsEqualToTotalWorkflows() external view { + WorkflowRegistry.WorkflowMetadata[] memory workflows = s_registry.getWorkflowMetadataListByDON(s_allowedDonID, 0, 3); + + assertEq(workflows.length, 3); + assertEq(workflows[0].workflowName, s_workflowName1); + assertEq(workflows[0].workflowID, s_workflowID1); + assertEq(workflows[0].binaryURL, s_binaryURL1); + assertEq(workflows[0].configURL, s_configURL1); + assertEq(workflows[0].secretsURL, s_secretsURL1); + + assertEq(workflows[1].workflowName, s_workflowName2); + assertEq(workflows[1].workflowID, s_workflowID2); + assertEq(workflows[1].binaryURL, s_binaryURL2); + assertEq(workflows[1].configURL, s_configURL2); + assertEq(workflows[1].secretsURL, s_secretsURL2); + + assertEq(workflows[2].workflowName, s_workflowName3); + assertEq(workflows[2].workflowID, s_workflowID3); + assertEq(workflows[2].binaryURL, s_binaryURL3); + assertEq(workflows[2].configURL, s_configURL3); + assertEq(workflows[2].secretsURL, s_secretsURL3); + } + + function test_WhenLimitExceedsTotalWorkflows() external view { + WorkflowRegistry.WorkflowMetadata[] memory workflows = + s_registry.getWorkflowMetadataListByDON(s_allowedDonID, 0, 10); + + assertEq(workflows.length, 3); + assertEq(workflows[0].workflowName, s_workflowName1); + assertEq(workflows[0].workflowID, s_workflowID1); + assertEq(workflows[0].binaryURL, s_binaryURL1); + assertEq(workflows[0].configURL, s_configURL1); + assertEq(workflows[0].secretsURL, s_secretsURL1); + + assertEq(workflows[1].workflowName, s_workflowName2); + assertEq(workflows[1].workflowID, s_workflowID2); + assertEq(workflows[1].binaryURL, s_binaryURL2); + assertEq(workflows[1].configURL, s_configURL2); + assertEq(workflows[1].secretsURL, s_secretsURL2); + + assertEq(workflows[2].workflowName, s_workflowName3); + assertEq(workflows[2].workflowID, s_workflowID3); + assertEq(workflows[2].binaryURL, s_binaryURL3); + assertEq(workflows[2].configURL, s_configURL3); + assertEq(workflows[2].secretsURL, s_secretsURL3); + } + + function test_WhenTheDONHasNoWorkflows() external view { + WorkflowRegistry.WorkflowMetadata[] memory workflows = + s_registry.getWorkflowMetadataListByDON(s_disallowedDonID, 0, 10); + + assertEq(workflows.length, 0); + } + + function test_WhenStartIsGreaterThanOrEqualToTotalWorkflows() external view { + WorkflowRegistry.WorkflowMetadata[] memory workflows = + s_registry.getWorkflowMetadataListByDON(s_allowedDonID, 10, 1); + + assertEq(workflows.length, 0); + } +} diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.getWorkflowMetadataListByDON.tree b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.getWorkflowMetadataListByDON.tree new file mode 100644 index 00000000000..1fd6b160b51 --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.getWorkflowMetadataListByDON.tree @@ -0,0 +1,16 @@ +WorkflowRegistry.getWorkflowMetadataListByDON +├── when the DON has workflows +│ ├── when start is 0 +│ │ └── it returns the correct metadata list +│ ├── when start is greater than 0 +│ │ └── it returns the correct metadata list +│ ├── when limit is less than total workflows +│ │ └── it returns the correct metadata list +│ ├── when limit is equal to total workflows +│ │ └── it returns the correct metadata list +│ └── when limit exceeds total workflows +│ └── it returns the correct metadata list +├── when the DON has no workflows +│ └── it returns an empty list +└── when start is greater than or equal to total workflows + └── it returns an empty list diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.getWorkflowMetadataListByOwner.t.sol b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.getWorkflowMetadataListByOwner.t.sol new file mode 100644 index 00000000000..7eea75d0a02 --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.getWorkflowMetadataListByOwner.t.sol @@ -0,0 +1,129 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {WorkflowRegistry} from "../../dev/WorkflowRegistry.sol"; +import {WorkflowRegistryWithFixture} from "./WorkflowRegistryWithFixture.t.sol"; + +contract WorkflowRegistry_getWorkflowMetadataListByOwner is WorkflowRegistryWithFixture { + function test_WhenStartIs0_AndLimitIs0() external view { + WorkflowRegistry.WorkflowMetadata[] memory workflows = + s_registry.getWorkflowMetadataListByOwner(s_authorizedAddress, 0, 0); + + assertEq(workflows.length, 3); + assertEq(workflows[0].workflowName, s_workflowName1); + assertEq(workflows[0].workflowID, s_workflowID1); + assertEq(workflows[0].binaryURL, s_binaryURL1); + assertEq(workflows[0].configURL, s_configURL1); + assertEq(workflows[0].secretsURL, s_secretsURL1); + + assertEq(workflows[1].workflowName, s_workflowName2); + assertEq(workflows[1].workflowID, s_workflowID2); + assertEq(workflows[1].binaryURL, s_binaryURL2); + assertEq(workflows[1].configURL, s_configURL2); + assertEq(workflows[1].secretsURL, s_secretsURL2); + + assertEq(workflows[2].workflowName, s_workflowName3); + assertEq(workflows[2].workflowID, s_workflowID3); + assertEq(workflows[2].binaryURL, s_binaryURL3); + assertEq(workflows[2].configURL, s_configURL3); + assertEq(workflows[2].secretsURL, s_secretsURL3); + } + + function test_WhenStartIsGreaterThan0() external view { + WorkflowRegistry.WorkflowMetadata[] memory workflows = + s_registry.getWorkflowMetadataListByOwner(s_authorizedAddress, 1, 3); + + assertEq(workflows.length, 2); + assertEq(workflows[0].workflowName, s_workflowName2); + assertEq(workflows[0].workflowID, s_workflowID2); + assertEq(workflows[0].binaryURL, s_binaryURL2); + assertEq(workflows[0].configURL, s_configURL2); + assertEq(workflows[0].secretsURL, s_secretsURL2); + + assertEq(workflows[1].workflowName, s_workflowName3); + assertEq(workflows[1].workflowID, s_workflowID3); + assertEq(workflows[1].binaryURL, s_binaryURL3); + assertEq(workflows[1].configURL, s_configURL3); + assertEq(workflows[1].secretsURL, s_secretsURL3); + } + + function test_WhenLimitIsLessThanTotalWorkflows() external view { + WorkflowRegistry.WorkflowMetadata[] memory workflows = + s_registry.getWorkflowMetadataListByOwner(s_authorizedAddress, 0, 2); + + assertEq(workflows.length, 2); + assertEq(workflows[0].workflowName, s_workflowName1); + assertEq(workflows[0].workflowID, s_workflowID1); + assertEq(workflows[0].binaryURL, s_binaryURL1); + assertEq(workflows[0].configURL, s_configURL1); + assertEq(workflows[0].secretsURL, s_secretsURL1); + + assertEq(workflows[1].workflowName, s_workflowName2); + assertEq(workflows[1].workflowID, s_workflowID2); + assertEq(workflows[1].binaryURL, s_binaryURL2); + assertEq(workflows[1].configURL, s_configURL2); + assertEq(workflows[1].secretsURL, s_secretsURL2); + } + + function test_WhenLimitIsEqualToTotalWorkflows() external view { + WorkflowRegistry.WorkflowMetadata[] memory workflows = + s_registry.getWorkflowMetadataListByOwner(s_authorizedAddress, 0, 3); + + assertEq(workflows.length, 3); + assertEq(workflows[0].workflowName, s_workflowName1); + assertEq(workflows[0].workflowID, s_workflowID1); + assertEq(workflows[0].binaryURL, s_binaryURL1); + assertEq(workflows[0].configURL, s_configURL1); + assertEq(workflows[0].secretsURL, s_secretsURL1); + + assertEq(workflows[1].workflowName, s_workflowName2); + assertEq(workflows[1].workflowID, s_workflowID2); + assertEq(workflows[1].binaryURL, s_binaryURL2); + assertEq(workflows[1].configURL, s_configURL2); + assertEq(workflows[1].secretsURL, s_secretsURL2); + + assertEq(workflows[2].workflowName, s_workflowName3); + assertEq(workflows[2].workflowID, s_workflowID3); + assertEq(workflows[2].binaryURL, s_binaryURL3); + assertEq(workflows[2].configURL, s_configURL3); + assertEq(workflows[2].secretsURL, s_secretsURL3); + } + + function test_WhenLimitExceedsTotalWorkflows() external view { + WorkflowRegistry.WorkflowMetadata[] memory workflows = + s_registry.getWorkflowMetadataListByOwner(s_authorizedAddress, 0, 10); + + assertEq(workflows.length, 3); + assertEq(workflows[0].workflowName, s_workflowName1); + assertEq(workflows[0].workflowID, s_workflowID1); + assertEq(workflows[0].binaryURL, s_binaryURL1); + assertEq(workflows[0].configURL, s_configURL1); + assertEq(workflows[0].secretsURL, s_secretsURL1); + + assertEq(workflows[1].workflowName, s_workflowName2); + assertEq(workflows[1].workflowID, s_workflowID2); + assertEq(workflows[1].binaryURL, s_binaryURL2); + assertEq(workflows[1].configURL, s_configURL2); + assertEq(workflows[1].secretsURL, s_secretsURL2); + + assertEq(workflows[2].workflowName, s_workflowName3); + assertEq(workflows[2].workflowID, s_workflowID3); + assertEq(workflows[2].binaryURL, s_binaryURL3); + assertEq(workflows[2].configURL, s_configURL3); + assertEq(workflows[2].secretsURL, s_secretsURL3); + } + + function test_WhenTheOwnerHasNoWorkflows() external view { + WorkflowRegistry.WorkflowMetadata[] memory workflows = + s_registry.getWorkflowMetadataListByOwner(s_unauthorizedAddress, 0, 10); + + assertEq(workflows.length, 0); + } + + function test_WhenStartIsGreaterThanOrEqualToTotalWorkflows() external view { + WorkflowRegistry.WorkflowMetadata[] memory workflows = + s_registry.getWorkflowMetadataListByOwner(s_authorizedAddress, 10, 1); + + assertEq(workflows.length, 0); + } +} diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.getWorkflowMetadataListByOwner.tree b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.getWorkflowMetadataListByOwner.tree new file mode 100644 index 00000000000..c2333473f39 --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.getWorkflowMetadataListByOwner.tree @@ -0,0 +1,16 @@ +WorkflowRegistry.getWorkflowMetadataListByOwner +├── when the owner has workflows +│ ├── when start is 0 +│ │ └── it returns the correct metadata list +│ ├── when start is greater than 0 and limit exceeds total +│ │ └── it returns the correct metadata list +│ ├── when limit is less than total workflows +│ │ └── it returns the correct metadata list +│ ├── when limit is equal to total workflows +│ │ └── it returns the correct metadata list +│ └── when limit exceeds total workflows +│ └── it returns the correct metadata list +├── when the owner has no workflows +│ └── it returns an empty list +└── when start is greater than or equal to total workflows + └── it returns an empty list diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.pauseWorkflow.t.sol b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.pauseWorkflow.t.sol new file mode 100644 index 00000000000..a6ef679998a --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.pauseWorkflow.t.sol @@ -0,0 +1,120 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {WorkflowRegistry} from "../../dev/WorkflowRegistry.sol"; +import {WorkflowRegistrySetup} from "./WorkflowRegistrySetup.t.sol"; + +contract WorkflowRegistry_pauseWorkflow is WorkflowRegistrySetup { + function test_RevertWhen_TheRegistryIsLocked() external { + // Register a workflow first. + _registerValidWorkflow(); + + // Lock the registry as the owner. + vm.prank(s_owner); + s_registry.lockRegistry(); + + // Attempt to pause the workflow now after the registry is locked. + vm.prank(s_authorizedAddress); + vm.expectRevert(WorkflowRegistry.RegistryLocked.selector); + s_registry.pauseWorkflow(s_validWorkflowKey); + } + + // whenTheRegistryIsNotLocked + function test_RevertWhen_TheCallerIsNotTheWorkflowOwner() external { + // Register a workflow first. + _registerValidWorkflow(); + + // Attempt to pause the workflow from a different address. + vm.prank(s_unauthorizedAddress); + vm.expectRevert(abi.encodeWithSelector(WorkflowRegistry.CallerIsNotWorkflowOwner.selector, s_unauthorizedAddress)); + s_registry.pauseWorkflow(s_validWorkflowKey); + } + + // whenTheRegistryIsNotLocked whenTheCallerIsTheWorkflowOwner + function test_RevertWhen_TheWorkflowIsAlreadyPaused() external { + // Register a paused workflow. + vm.prank(s_authorizedAddress); + s_registry.registerWorkflow( + s_validWorkflowName, + s_validWorkflowID, + s_allowedDonID, + WorkflowRegistry.WorkflowStatus.PAUSED, + s_validBinaryURL, + s_validConfigURL, + s_validSecretsURL + ); + + // Attempt to pause the workflow. + vm.prank(s_authorizedAddress); + vm.expectRevert(WorkflowRegistry.WorkflowAlreadyInDesiredStatus.selector); + s_registry.pauseWorkflow(s_validWorkflowKey); + } + + // whenTheRegistryIsNotLocked whenTheCallerIsTheWorkflowOwner whenTheWorkflowIsActive + function test_WhenTheDonIDIsNotAllowed_AndTheCallerIsAnAuthorizedAddress() external { + // Register a workflow first. + _registerValidWorkflow(); + + _removeDONFromAllowedDONs(s_allowedDonID); + + // Pause the workflow. + vm.prank(s_authorizedAddress); + s_registry.pauseWorkflow(s_validWorkflowKey); + + // Check that the workflow is paused. + WorkflowRegistry.WorkflowMetadata memory workflow = + s_registry.getWorkflowMetadata(s_authorizedAddress, s_validWorkflowName); + assertTrue(workflow.status == WorkflowRegistry.WorkflowStatus.PAUSED); + } + + // whenTheRegistryIsNotLocked whenTheCallerIsTheWorkflowOwner whenTheWorkflowIsActive + function test_WhenTheDonIDIsNotAllowed_AndTheCallerIsAnUnauthorizedAddress() external { + // Register a workflow first. + _registerValidWorkflow(); + + // Remove the allowed DON ID and the authorized address. + _removeAddressFromAuthorizedAddresses(s_authorizedAddress); + _removeDONFromAllowedDONs(s_allowedDonID); + + // Pause the workflow. + vm.prank(s_authorizedAddress); + s_registry.pauseWorkflow(s_validWorkflowKey); + + // Check that the workflow is paused. + WorkflowRegistry.WorkflowMetadata memory workflow = + s_registry.getWorkflowMetadata(s_authorizedAddress, s_validWorkflowName); + assertTrue(workflow.status == WorkflowRegistry.WorkflowStatus.PAUSED); + } + + // whenTheRegistryIsNotLocked whenTheCallerIsTheWorkflowOwner whenTheWorkflowIsActive + function test_WhenTheDonIDIsAllowed_AndTheCallerIsAnUnauthorizedAddress() external { + // Register a workflow first. + _registerValidWorkflow(); + + _removeAddressFromAuthorizedAddresses(s_authorizedAddress); + + // Pause the workflow. + vm.prank(s_authorizedAddress); + s_registry.pauseWorkflow(s_validWorkflowKey); + + // Check that the workflow is paused. + WorkflowRegistry.WorkflowMetadata memory workflow = + s_registry.getWorkflowMetadata(s_authorizedAddress, s_validWorkflowName); + assertTrue(workflow.status == WorkflowRegistry.WorkflowStatus.PAUSED); + } + + // whenTheRegistryIsNotLocked whenTheCallerIsTheWorkflowOwner whenTheWorkflowIsActive + function test_WhenTheDonIDIsAllowed_AndTheCallerIsAnAuthorizedAddress() external { + // Register a workflow first. + _registerValidWorkflow(); + + // Pause the workflow. + vm.prank(s_authorizedAddress); + s_registry.pauseWorkflow(s_validWorkflowKey); + + // Check that the workflow is paused. + WorkflowRegistry.WorkflowMetadata memory workflow = + s_registry.getWorkflowMetadata(s_authorizedAddress, s_validWorkflowName); + assertTrue(workflow.status == WorkflowRegistry.WorkflowStatus.PAUSED); + } +} diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.pauseWorkflow.tree b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.pauseWorkflow.tree new file mode 100644 index 00000000000..2cd2361b702 --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.pauseWorkflow.tree @@ -0,0 +1,16 @@ +WorkflowRegistry.pauseWorkflow +├── when the registry is locked +│ └── it should revert +└── when the registry is not locked + ├── when the caller is not the workflow owner + │ └── it should revert + └── when the caller is the workflow owner + ├── when the workflow is already paused + │ └── it should revert + └── when the workflow is active + ├── when the donID is not allowed + │ ├── it should pause the workflow for an authorized address + │ └── it should pause the workflow for an unauthorized address + └── when the donID is allowed + ├── it should pause the workflow for an authorized address + └── it should pause the workflow for an unauthorized address diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.registerWorkflow.t.sol b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.registerWorkflow.t.sol new file mode 100644 index 00000000000..a6852b868dc --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.registerWorkflow.t.sol @@ -0,0 +1,244 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {WorkflowRegistry} from "../../dev/WorkflowRegistry.sol"; +import {WorkflowRegistrySetup} from "./WorkflowRegistrySetup.t.sol"; + +contract WorkflowRegistry_registerWorkflow is WorkflowRegistrySetup { + function test_RevertWhen_TheCallerIsNotAnAuthorizedAddress() external { + vm.prank(s_unauthorizedAddress); + + vm.expectRevert(abi.encodeWithSelector(WorkflowRegistry.AddressNotAuthorized.selector, s_unauthorizedAddress)); + s_registry.registerWorkflow( + s_validWorkflowName, + s_validWorkflowID, + s_allowedDonID, + WorkflowRegistry.WorkflowStatus.ACTIVE, + s_validBinaryURL, + s_validConfigURL, + s_validSecretsURL + ); + } + + // whenTheCallerIsAnAuthorizedAddress + function test_RevertWhen_TheRegistryIsLocked() external { + // Lock the registry as the owner + vm.startPrank(s_owner); + s_registry.lockRegistry(); + + vm.expectRevert(WorkflowRegistry.RegistryLocked.selector); + s_registry.registerWorkflow( + s_validWorkflowName, + s_validWorkflowID, + s_allowedDonID, + WorkflowRegistry.WorkflowStatus.ACTIVE, + s_validBinaryURL, + s_validConfigURL, + s_validSecretsURL + ); + vm.stopPrank(); + } + + // whenTheCallerIsAnAuthorizedAddress whenTheRegistryIsNotLocked + function test_RevertWhen_TheDonIDIsNotAllowed() external { + vm.prank(s_authorizedAddress); + + vm.expectRevert(abi.encodeWithSelector(WorkflowRegistry.DONNotAllowed.selector, s_disallowedDonID)); + s_registry.registerWorkflow( + s_validWorkflowName, + s_validWorkflowID, + s_disallowedDonID, + WorkflowRegistry.WorkflowStatus.ACTIVE, + s_validBinaryURL, + s_validConfigURL, + s_validSecretsURL + ); + } + + // whenTheCallerIsAnAuthorizedAddress whenTheRegistryIsNotLocked whenTheDonIDIsAllowed + function test_RevertWhen_TheWorkflowNameIsTooLong() external { + vm.prank(s_authorizedAddress); + + // Ensure the expected error encoding matches the actual error + vm.expectRevert( + abi.encodeWithSelector(WorkflowRegistry.WorkflowNameTooLong.selector, bytes(s_invalidWorkflowName).length, 64) + ); + s_registry.registerWorkflow( + s_invalidWorkflowName, + s_validWorkflowID, + s_allowedDonID, + WorkflowRegistry.WorkflowStatus.ACTIVE, + s_validBinaryURL, + s_validConfigURL, + s_validSecretsURL + ); + } + + // whenTheCallerIsAnAuthorizedAddress whenTheRegistryIsNotLocked whenTheDonIDIsAllowed + function test_RevertWhen_TheBinaryURLIsTooLong() external { + vm.prank(s_authorizedAddress); + + vm.expectRevert(abi.encodeWithSelector(WorkflowRegistry.URLTooLong.selector, bytes(s_invalidURL).length, 200)); + s_registry.registerWorkflow( + s_validWorkflowName, + s_validWorkflowID, + s_allowedDonID, + WorkflowRegistry.WorkflowStatus.ACTIVE, + s_invalidURL, + s_validConfigURL, + s_validSecretsURL + ); + } + + // whenTheCallerIsAnAuthorizedAddress whenTheRegistryIsNotLocked whenTheDonIDIsAllowed + function test_RevertWhen_TheConfigURLIsTooLong() external { + vm.prank(s_authorizedAddress); + + vm.expectRevert(abi.encodeWithSelector(WorkflowRegistry.URLTooLong.selector, bytes(s_invalidURL).length, 200)); + s_registry.registerWorkflow( + s_validWorkflowName, + s_validWorkflowID, + s_allowedDonID, + WorkflowRegistry.WorkflowStatus.ACTIVE, + s_validBinaryURL, + s_invalidURL, + s_validSecretsURL + ); + } + + // whenTheCallerIsAnAuthorizedAddress whenTheRegistryIsNotLocked whenTheDonIDIsAllowed + function test_RevertWhen_TheSecretsURLIsTooLong() external { + vm.prank(s_authorizedAddress); + + vm.expectRevert(abi.encodeWithSelector(WorkflowRegistry.URLTooLong.selector, bytes(s_invalidURL).length, 200)); + s_registry.registerWorkflow( + s_validWorkflowName, + s_validWorkflowID, + s_allowedDonID, + WorkflowRegistry.WorkflowStatus.ACTIVE, + s_validBinaryURL, + s_validConfigURL, + s_invalidURL + ); + } + + // whenTheCallerIsAnAuthorizedAddress whenTheRegistryIsNotLocked whenTheDonIDIsAllowed + function test_RevertWhen_TheWorkflowIDIsInvalid() external { + vm.prank(s_authorizedAddress); + + vm.expectRevert(WorkflowRegistry.InvalidWorkflowID.selector); + s_registry.registerWorkflow( + s_validWorkflowName, + bytes32(0), + s_allowedDonID, + WorkflowRegistry.WorkflowStatus.ACTIVE, + s_validBinaryURL, + s_validConfigURL, + s_validSecretsURL + ); + } + + // whenTheCallerIsAnAuthorizedAddress whenTheRegistryIsNotLocked whenTheDonIDIsAllowed + function test_RevertWhen_TheWorkflowNameIsAlreadyUsedByTheOwner() external { + vm.startPrank(s_authorizedAddress); + + // Register a valid workflow first + s_registry.registerWorkflow( + s_validWorkflowName, + s_validWorkflowID, + s_allowedDonID, + WorkflowRegistry.WorkflowStatus.ACTIVE, + s_validBinaryURL, + s_validConfigURL, + s_validSecretsURL + ); + + // Register the same workflow again + vm.expectRevert(WorkflowRegistry.WorkflowAlreadyRegistered.selector); + s_registry.registerWorkflow( + s_validWorkflowName, + s_validWorkflowID, + s_allowedDonID, + WorkflowRegistry.WorkflowStatus.ACTIVE, + s_validBinaryURL, + s_validConfigURL, + s_validSecretsURL + ); + + vm.stopPrank(); + } + + // whenTheCallerIsAnAuthorizedAddress whenTheRegistryIsNotLocked whenTheDonIDIsAllowed + function test_WhenTheWorkflowInputsAreAllValid() external { + vm.startPrank(s_authorizedAddress); + + // it should emit {WorkflowRegisteredV1} + vm.expectEmit(true, true, true, true); + emit WorkflowRegistry.WorkflowRegisteredV1( + s_validWorkflowID, + s_authorizedAddress, + s_allowedDonID, + WorkflowRegistry.WorkflowStatus.ACTIVE, + s_validWorkflowName, + s_validBinaryURL, + s_validConfigURL, + s_validSecretsURL + ); + + s_registry.registerWorkflow( + s_validWorkflowName, + s_validWorkflowID, + s_allowedDonID, + WorkflowRegistry.WorkflowStatus.ACTIVE, + s_validBinaryURL, + s_validConfigURL, + s_validSecretsURL + ); + + // it should store the new workflow in s_workflows + WorkflowRegistry.WorkflowMetadata memory workflow = + s_registry.getWorkflowMetadata(s_authorizedAddress, s_validWorkflowName); + assertEq(workflow.owner, s_authorizedAddress); + assertEq(workflow.donID, s_allowedDonID); + assertEq(workflow.workflowName, s_validWorkflowName); + assertEq(workflow.workflowID, s_validWorkflowID); + assertEq(workflow.binaryURL, s_validBinaryURL); + assertEq(workflow.configURL, s_validConfigURL); + assertEq(workflow.secretsURL, s_validSecretsURL); + assertTrue(workflow.status == WorkflowRegistry.WorkflowStatus.ACTIVE); + + // it should add the workflow key to s_ownerWorkflowKeys + WorkflowRegistry.WorkflowMetadata[] memory workflows = + s_registry.getWorkflowMetadataListByOwner(s_authorizedAddress, 0, 1); + assertEq(workflows[0].owner, s_authorizedAddress); + assertEq(workflows[0].donID, s_allowedDonID); + assertEq(workflows[0].workflowName, s_validWorkflowName); + assertEq(workflows[0].workflowID, s_validWorkflowID); + assertEq(workflows[0].binaryURL, s_validBinaryURL); + assertEq(workflows[0].configURL, s_validConfigURL); + assertEq(workflows[0].secretsURL, s_validSecretsURL); + assertTrue(workflows[0].status == WorkflowRegistry.WorkflowStatus.ACTIVE); + + // it should add the workflow key to s_donWorkflowKeys + workflows = s_registry.getWorkflowMetadataListByDON(s_allowedDonID, 0, 1); + assertEq(workflows[0].owner, s_authorizedAddress); + assertEq(workflows[0].donID, s_allowedDonID); + assertEq(workflows[0].workflowName, s_validWorkflowName); + assertEq(workflows[0].workflowID, s_validWorkflowID); + assertEq(workflows[0].binaryURL, s_validBinaryURL); + assertEq(workflows[0].configURL, s_validConfigURL); + assertEq(workflows[0].secretsURL, s_validSecretsURL); + assertTrue(workflows[0].status == WorkflowRegistry.WorkflowStatus.ACTIVE); + + // it should add the url + key to s_secretsHashToWorkflows when the secretsURL is not empty + vm.expectEmit(true, true, false, true); + emit WorkflowRegistry.WorkflowForceUpdateSecretsRequestedV1( + s_authorizedAddress, keccak256(abi.encodePacked(s_authorizedAddress, s_validSecretsURL)), s_validWorkflowName + ); + + // Call the function that should emit the event + s_registry.requestForceUpdateSecrets(s_validSecretsURL); + + vm.stopPrank(); + } +} diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.registerWorkflow.tree b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.registerWorkflow.tree new file mode 100644 index 00000000000..75cdf940575 --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.registerWorkflow.tree @@ -0,0 +1,29 @@ +WorkflowRegistry.registerWorkflow +├── when the caller is not an authorized address +│ └── it should revert +└── when the caller is an authorized address + └── when the registry is locked + │ └── it should revert + └── when the registry is not locked + └── when the donID is not allowed + │ └── it should revert + └── when the donID is allowed + ├── when the workflow name is too long + │ └── it should revert + ├── when the binaryURL is too long + │ └── it should revert + ├── when the configURL is too long + │ └── it should revert + ├── when the secretsURL is too long + │ └── it should revert + ├── when the workflowID is invalid + │ └── it should revert + ├── when the workflow name is already used by the owner + │ └── it should revert + └── when the workflow inputs are all valid + ├── it should store the new workflow in s_workflows + ├── it should add the workflow key to s_ownerWorkflowKeys + ├── it should add the workflow key to s_donWorkflowKeys + ├── it should emit {WorkflowRegisteredV1} + └── when the secretsURL is not empty + └── it should add the url + key to s_secretsHashToWorkflows diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.requestForceUpdateSecrets.t.sol b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.requestForceUpdateSecrets.t.sol new file mode 100644 index 00000000000..d42368f22cc --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.requestForceUpdateSecrets.t.sol @@ -0,0 +1,150 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity 0.8.24; + +import {WorkflowRegistry} from "../../dev/WorkflowRegistry.sol"; +import {WorkflowRegistrySetup} from "./WorkflowRegistrySetup.t.sol"; +import {Vm} from "forge-std/Vm.sol"; + +contract WorkflowRegistry_requestForceUpdateSecrets is WorkflowRegistrySetup { + function test_RevertWhen_TheRegistryIsLocked() external { + // Register a workflow first. + _registerValidWorkflow(); + + // Lock the registry as the owner. + vm.prank(s_owner); + s_registry.lockRegistry(); + + // Attempt to request force update secrets now after the registry is locked. + vm.prank(s_authorizedAddress); + vm.expectRevert(WorkflowRegistry.RegistryLocked.selector); + s_registry.requestForceUpdateSecrets(s_validSecretsURL); + } + + // whenTheRegistryIsNotLocked + function test_RevertWhen_TheCallerDoesNotOwnAnyWorkflowsWithTheSecretsURL() external { + // Register a workflow first. + _registerValidWorkflow(); + + // Call the requestForceUpdateSecrets function now on a random URL + vm.prank(s_authorizedAddress); + vm.expectRevert(WorkflowRegistry.WorkflowDoesNotExist.selector); + s_registry.requestForceUpdateSecrets(s_validBinaryURL); + } + + // whenTheRegistryIsNotLocked whenTheCallerOwnsWorkflowsWithTheSecretsURL + function test_WhenTheCallerIsNotAnAuthorizedAddress() external { + // Register a workflow first. + _registerValidWorkflow(); + + _removeAddressFromAuthorizedAddresses(s_authorizedAddress); + + // Start recording logs + vm.recordLogs(); + + vm.prank(s_authorizedAddress); + s_registry.requestForceUpdateSecrets(s_validSecretsURL); + + // Retrieve the recorded logs. + Vm.Log[] memory entries = vm.getRecordedLogs(); + + // Event signature hash for WorkflowForceUpdateSecretsRequestedV1. + bytes32 eventSignature = keccak256("WorkflowForceUpdateSecretsRequestedV1(string,address,string)"); + + // Iterate through the logs to ensure WorkflowForceUpdateSecretsRequestedV1 was not emitted. + bool eventEmitted = false; + for (uint256 i = 0; i < entries.length; ++i) { + if (entries[i].topics[0] == eventSignature) { + eventEmitted = true; + break; + } + } + // Assert that the event was not emitted + assertFalse(eventEmitted); + } + + // whenTheRegistryIsNotLocked whenTheCallerOwnsWorkflowsWithTheSecretsURL + function test_WhenTheCallerIsAnAuthorizedAddress_AndTheWorkflowIsNotInAnAllowedDON() external { + // Register a workflow first. + _registerValidWorkflow(); + + // Start recording logs + vm.recordLogs(); + + _removeDONFromAllowedDONs(s_allowedDonID); + + // Call the requestForceUpdateSecrets function now after the don is removed. + vm.prank(s_authorizedAddress); + s_registry.requestForceUpdateSecrets(s_validSecretsURL); + + // Retrieve the recorded logs + Vm.Log[] memory entries = vm.getRecordedLogs(); + + // Event signature hash for WorkflowForceUpdateSecretsRequestedV1 + bytes32 eventSignature = keccak256("WorkflowForceUpdateSecretsRequestedV1(string,address,string)"); + + // Iterate through the logs to ensure WorkflowForceUpdateSecretsRequestedV1 was not emitted + bool eventEmitted = false; + for (uint256 i = 0; i < entries.length; ++i) { + if (entries[i].topics[0] == eventSignature) { + eventEmitted = true; + break; + } + } + // Assert that the event was not emitted + assertFalse(eventEmitted); + } + + // whenTheRegistryIsNotLocked whenTheCallerOwnsWorkflowsWithTheSecretsURL + function test_WhenTheCallerIsAnAuthorizedAddress_AndTheWorkflowIsInAnAllowedDON() external { + // Register a workflow first. + _registerValidWorkflow(); + + // Register another workflow with the same owner but different secrets URL. + vm.prank(s_authorizedAddress); + s_registry.registerWorkflow( + "ValidWorkflow2", + keccak256("validWorkflow2"), + s_allowedDonID, + WorkflowRegistry.WorkflowStatus.ACTIVE, + "https://example.com/valid-binary2", + s_validConfigURL, + s_validSecretsURL + ); + + // Start recording logs + vm.recordLogs(); + + vm.prank(s_authorizedAddress); + s_registry.requestForceUpdateSecrets(s_validSecretsURL); + // Verify the event emitted with correct details + Vm.Log[] memory entries = vm.getRecordedLogs(); + assertEq(entries.length, 2); + + bytes32 eventSignature = keccak256("WorkflowForceUpdateSecretsRequestedV1(address,bytes32,string)"); + + // Check the first event + assertEq(entries[0].topics[0], eventSignature); + // Verify owner (indexed) + address decodedAddress = abi.decode(abi.encodePacked(entries[0].topics[1]), (address)); + assertEq(decodedAddress, s_authorizedAddress); + // Decode non-indexed parameters (secretsURLHash and workflowName) + (bytes32 decodedSecretsURLHash, string memory decodedWorkflowName) = abi.decode(entries[0].data, (bytes32, string)); + // Verify the decoded values + bytes32 expectedSecretsURLHash = keccak256(abi.encodePacked(s_authorizedAddress, s_validSecretsURL)); + assertEq(decodedSecretsURLHash, expectedSecretsURLHash); + assertEq(decodedWorkflowName, s_validWorkflowName); + + // // Check the second event + assertEq(entries[1].topics[0], eventSignature); + // Verify owner (indexed) + address decodedAddress2 = abi.decode(abi.encodePacked(entries[1].topics[1]), (address)); + assertEq(decodedAddress2, s_authorizedAddress); + // Decode non-indexed parameters (secretsURLHash and workflowName) + (bytes32 decodedSecretsURLHash2, string memory decodedWorkflowName2) = + abi.decode(entries[1].data, (bytes32, string)); + // Verify the decoded values + bytes32 expectedSecretsURLHash2 = keccak256(abi.encodePacked(s_authorizedAddress, s_validSecretsURL)); + assertEq(decodedSecretsURLHash2, expectedSecretsURLHash2); + assertEq(decodedWorkflowName2, "ValidWorkflow2"); + } +} diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.requestForceUpdateSecrets.tree b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.requestForceUpdateSecrets.tree new file mode 100644 index 00000000000..2fa927e32a6 --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.requestForceUpdateSecrets.tree @@ -0,0 +1,12 @@ +WorkflowRegistry.requestForceUpdateSecrets +├── when the registry is locked +│ └── it should revert +└── when the registry is not locked + ├── when the caller does not own any workflows with the secretsURL + │ └── it should revert + └── when the caller owns workflows with the secretsURL + ├── when the caller is not an authorized address + │ └── it should not emit any events + └── when the caller is an authorized address + ├── it should not emit any events for workflows in non-allowed DONs + └── it should emit a WorkflowForceUpdateSecretsRequestedV1 event for each workflow in the allowed DONs diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.updateAllowedDONs.t.sol b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.updateAllowedDONs.t.sol new file mode 100644 index 00000000000..63204fb8f96 --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.updateAllowedDONs.t.sol @@ -0,0 +1,72 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {Ownable2Step} from "../../../shared/access/Ownable2Step.sol"; +import {WorkflowRegistry} from "../../dev/WorkflowRegistry.sol"; +import {WorkflowRegistrySetup} from "./WorkflowRegistrySetup.t.sol"; + +contract WorkflowRegistry_updateAllowedDONs is WorkflowRegistrySetup { + function test_RevertWhen_TheCallerIsNotTheOwner() external { + vm.prank(s_nonOwner); + + vm.expectRevert(Ownable2Step.OnlyCallableByOwner.selector); + s_registry.updateAllowedDONs(new uint32[](0), true); + } + + // whenTheCallerIsTheOwner + function test_RevertWhen_TheRegistryIsLocked() external { + // Lock the registry as the owner + vm.startPrank(s_owner); + s_registry.lockRegistry(); + + vm.expectRevert(WorkflowRegistry.RegistryLocked.selector); + s_registry.updateAllowedDONs(new uint32[](0), true); + vm.stopPrank(); + } + + // whenTheCallerIsTheOwner whenTheRegistryIsNotLocked + function test_WhenTheBoolInputIsTrue() external { + uint32[] memory donIDsToAdd = new uint32[](3); + donIDsToAdd[0] = 2; + donIDsToAdd[1] = 3; + donIDsToAdd[2] = 4; + + // Check that there is one DON ID when fetching all allowed DONs to start + uint32[] memory allowedDONs = s_registry.getAllAllowedDONs(); + assertEq(allowedDONs.length, 1); + + // Expect the event to be emitted + vm.expectEmit(true, true, true, true); + emit WorkflowRegistry.AllowedDONsUpdatedV1(donIDsToAdd, true); + + // Call the function as the owner + vm.prank(s_owner); + s_registry.updateAllowedDONs(donIDsToAdd, true); + + // Verify that the DON IDs have been added + allowedDONs = s_registry.getAllAllowedDONs(); + assertEq(allowedDONs.length, 4); + } + + // whenTheCallerIsTheOwner whenTheRegistryIsNotLocked + function test_WhenTheBoolInputIsFalse() external { + uint32[] memory donIDsToRemove = new uint32[](1); + donIDsToRemove[0] = s_allowedDonID; + + // Check that there is one DON ID when fetching all allowed DONs to start + uint32[] memory allowedDONs = s_registry.getAllAllowedDONs(); + assertEq(allowedDONs.length, 1); + + // Expect the event to be emitted + vm.expectEmit(true, true, true, true); + emit WorkflowRegistry.AllowedDONsUpdatedV1(donIDsToRemove, false); + + // Call the function as the owner + vm.prank(s_owner); + s_registry.updateAllowedDONs(donIDsToRemove, false); + + // Verify that the DON IDs have been removed + allowedDONs = s_registry.getAllAllowedDONs(); + assertEq(allowedDONs.length, 0); + } +} diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.updateAllowedDONs.tree b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.updateAllowedDONs.tree new file mode 100644 index 00000000000..e0aa7052d64 --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.updateAllowedDONs.tree @@ -0,0 +1,13 @@ +WorkflowRegistry.updateAllowedDONs +├── when the caller is not the owner +│ └── it should revert +└── when the caller is the owner + ├── when the registry is locked + │ └── it should revert + └── when the registry is not locked + ├── when the bool input is true + │ ├── it should add the DON IDs to s_allowedDONs + │ └── it should emit {AllowedDONsUpdatedV1} + └── when the bool input is false + ├── it should remove the DON IDs from s_allowedDONs + └── it should emit {AllowedDONsUpdatedV1} diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.updateAuthorizedAddresses.t.sol b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.updateAuthorizedAddresses.t.sol new file mode 100644 index 00000000000..ac9e9b94bea --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.updateAuthorizedAddresses.t.sol @@ -0,0 +1,72 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {Ownable2Step} from "../../../shared/access/Ownable2Step.sol"; +import {WorkflowRegistry} from "../../dev/WorkflowRegistry.sol"; +import {WorkflowRegistrySetup} from "./WorkflowRegistrySetup.t.sol"; + +contract WorkflowRegistry_updateAuthorizedAddresses is WorkflowRegistrySetup { + function test_RevertWhen_TheCallerIsNotTheOwner() external { + vm.prank(s_nonOwner); + + vm.expectRevert(Ownable2Step.OnlyCallableByOwner.selector); + s_registry.updateAuthorizedAddresses(new address[](0), true); + } + + // whenTheCallerIsTheOwner + function test_RevertWhen_TheRegistryIsLocked() external { + // Lock the registry as the owner + vm.startPrank(s_owner); + s_registry.lockRegistry(); + + vm.expectRevert(WorkflowRegistry.RegistryLocked.selector); + s_registry.updateAuthorizedAddresses(new address[](0), true); + vm.stopPrank(); + } + + // whenTheCallerIsTheOwner whenTheRegistryIsNotLocked + function test_WhenTheBoolInputIsTrue() external { + address[] memory addressesToAdd = new address[](3); + addressesToAdd[0] = makeAddr("1"); + addressesToAdd[1] = makeAddr("2"); + addressesToAdd[2] = makeAddr("3"); + + // Check that there is one authorized address when fetching all authorized addresses to start + address[] memory authorizedAddresses = s_registry.getAllAuthorizedAddresses(); + assertEq(authorizedAddresses.length, 1); + + // Expect the event to be emitted + vm.expectEmit(true, true, true, true); + emit WorkflowRegistry.AuthorizedAddressesUpdatedV1(addressesToAdd, true); + + // Call the function as the owner + vm.prank(s_owner); + s_registry.updateAuthorizedAddresses(addressesToAdd, true); + + // Verify that the addresses have been added + authorizedAddresses = s_registry.getAllAuthorizedAddresses(); + assertEq(authorizedAddresses.length, 4); + } + + // whenTheCallerIsTheOwner whenTheRegistryIsNotLocked + function test_WhenTheBoolInputIsFalse() external { + address[] memory addressesToRemove = new address[](1); + addressesToRemove[0] = s_authorizedAddress; + + // Check that there is one authorized address when fetching all authorized addresses to start + address[] memory authorizedAddresses = s_registry.getAllAuthorizedAddresses(); + assertEq(authorizedAddresses.length, 1); + + // Expect the event to be emitted + vm.expectEmit(true, true, true, true); + emit WorkflowRegistry.AuthorizedAddressesUpdatedV1(addressesToRemove, false); + + // Call the function as the owner + vm.prank(s_owner); + s_registry.updateAuthorizedAddresses(addressesToRemove, false); + + // Verify that the addresses have been removed + authorizedAddresses = s_registry.getAllAuthorizedAddresses(); + assertEq(authorizedAddresses.length, 0); + } +} diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.updateAuthorizedAddresses.tree b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.updateAuthorizedAddresses.tree new file mode 100644 index 00000000000..83988304d33 --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.updateAuthorizedAddresses.tree @@ -0,0 +1,13 @@ +WorkflowRegistry.updateAuthorizedAddresses +├── when the caller is not the owner +│ └── it should revert +└── when the caller is the owner + ├── when the registry is locked + │ └── it should revert + └── when the registry is not locked + ├── when the bool input is true + │ ├── it should add the addresses s_authorizedAddresses + │ └── it should emit {AuthorizedAddressesUpdatedV1} + └── when the bool input is false + ├── it should remove the addresses from s_authorizedAddresses + └── it should emit {AuthorizedAddressesUpdatedV1} diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.updateWorkflow.t.sol b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.updateWorkflow.t.sol new file mode 100644 index 00000000000..ff59989fe93 --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.updateWorkflow.t.sol @@ -0,0 +1,205 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {WorkflowRegistry} from "../../dev/WorkflowRegistry.sol"; +import {WorkflowRegistrySetup} from "./WorkflowRegistrySetup.t.sol"; + +contract WorkflowRegistry_updateWorkflow is WorkflowRegistrySetup { + bytes32 private s_newValidWorkflowID = keccak256("newValidWorkflowID"); + string private s_newValidSecretsURL = "https://example.com/new-secrets"; + + function test_RevertWhen_TheCallerIsNotAnAuthorizedAddress() external { + // Register the workflow first as an authorized address. + _registerValidWorkflow(); + + _removeAddressFromAuthorizedAddresses(s_authorizedAddress); + + // Update the workflow now after the workflow owner is no longer an authorized address. + vm.prank(s_authorizedAddress); + vm.expectRevert(abi.encodeWithSelector(WorkflowRegistry.AddressNotAuthorized.selector, s_authorizedAddress)); + s_registry.updateWorkflow( + s_validWorkflowKey, s_newValidWorkflowID, s_validBinaryURL, s_validConfigURL, s_newValidSecretsURL + ); + } + + // whenTheCallerIsAnAuthorizedAddress + function test_RevertWhen_TheRegistryIsLocked() external { + // Register a workflow first. + _registerValidWorkflow(); + + // Lock the registry as the owner. + vm.prank(s_owner); + s_registry.lockRegistry(); + + // Update the workflow now after the registry is locked. + vm.prank(s_authorizedAddress); + vm.expectRevert(WorkflowRegistry.RegistryLocked.selector); + s_registry.updateWorkflow( + s_validWorkflowKey, s_newValidWorkflowID, s_validBinaryURL, s_validConfigURL, s_newValidSecretsURL + ); + } + + // whenTheCallerIsAnAuthorizedAddress whenTheRegistryIsNotLocked + function test_RevertWhen_TheDonIDIsNotAllowed() external { + // Register a workflow first. + _registerValidWorkflow(); + + _removeDONFromAllowedDONs(s_allowedDonID); + + // Update the workflow now after the DON is no longer allowed. + vm.prank(s_authorizedAddress); + vm.expectRevert(abi.encodeWithSelector(WorkflowRegistry.DONNotAllowed.selector, s_allowedDonID)); + s_registry.updateWorkflow( + s_validWorkflowKey, s_newValidWorkflowID, s_validBinaryURL, s_validConfigURL, s_newValidSecretsURL + ); + } + + // whenTheCallerIsAnAuthorizedAddress whenTheRegistryIsNotLocked whenTheDonIDIsAllowed + function test_RevertWhen_TheCallerIsNotTheWorkflowOwner() external { + // Register a workflow first. + _registerValidWorkflow(); + + // Add the previously unauthorized address to the authorized addresses list. + _addAddressToAuthorizedAddresses(s_unauthorizedAddress); + + // Update the workflow now as the new authorized user. + vm.prank(s_unauthorizedAddress); + vm.expectRevert(abi.encodeWithSelector(WorkflowRegistry.CallerIsNotWorkflowOwner.selector, s_unauthorizedAddress)); + s_registry.updateWorkflow( + s_validWorkflowKey, s_newValidWorkflowID, s_validBinaryURL, s_validConfigURL, s_newValidSecretsURL + ); + } + + // whenTheCallerIsAnAuthorizedAddress whenTheRegistryIsNotLocked whenTheDonIDIsAllowed whenTheCallerIsTheWorkflowOwner + function test_RevertWhen_AnExistingWorkflowIsNotFoundWithTheGivenWorkflowName() external { + // Update a workflow with a non-existent workflow name + vm.prank(s_authorizedAddress); + vm.expectRevert(WorkflowRegistry.WorkflowDoesNotExist.selector); + s_registry.updateWorkflow( + "nonExistentWorkflow", s_newValidWorkflowID, s_validBinaryURL, s_validConfigURL, s_newValidSecretsURL + ); + } + + // whenTheCallerIsAnAuthorizedAddress whenTheRegistryIsNotLocked whenTheDonIDIsAllowed whenTheCallerIsTheWorkflowOwner + function test_RevertWhen_TheNewWorkflowIDIsTheSameAsTheExistingWorkflowID() external { + // Register a workflow first + _registerValidWorkflow(); + + // Update the workflow now with the same workflow ID + vm.prank(s_authorizedAddress); + vm.expectRevert(WorkflowRegistry.WorkflowIDNotUpdated.selector); + s_registry.updateWorkflow( + s_validWorkflowKey, s_validWorkflowID, s_validBinaryURL, s_validConfigURL, s_newValidSecretsURL + ); + } + + // whenTheCallerIsAnAuthorizedAddress whenTheRegistryIsNotLocked whenTheDonIDIsAllowed whenTheCallerIsTheWorkflowOwner + function test_RevertWhen_NoneOfTheURLsAreUpdated() external { + // Register a workflow first + _registerValidWorkflow(); + + // Update the workflow with no changes to any URLs + vm.prank(s_authorizedAddress); + vm.expectRevert(WorkflowRegistry.WorkflowContentNotUpdated.selector); + s_registry.updateWorkflow( + s_validWorkflowKey, s_newValidWorkflowID, s_validBinaryURL, s_validConfigURL, s_validSecretsURL + ); + } + + // whenTheCallerIsAnAuthorizedAddress whenTheRegistryIsNotLocked whenTheDonIDIsAllowed whenTheCallerIsTheWorkflowOwner + function test_RevertWhen_TheBinaryURLIsTooLong() external { + // Register a workflow first + _registerValidWorkflow(); + + // Update the workflow with a binary URL that is too long + vm.prank(s_authorizedAddress); + vm.expectRevert(abi.encodeWithSelector(WorkflowRegistry.URLTooLong.selector, bytes(s_invalidURL).length, 200)); + s_registry.updateWorkflow( + s_validWorkflowKey, s_newValidWorkflowID, s_invalidURL, s_validConfigURL, s_validSecretsURL + ); + } + + // whenTheCallerIsAnAuthorizedAddress whenTheRegistryIsNotLocked whenTheDonIDIsAllowed whenTheCallerIsTheWorkflowOwner + function test_RevertWhen_TheConfigURLIsTooLong() external { + // Register a workflow first. + _registerValidWorkflow(); + + // Update the workflow with a config URL that is too long. + vm.prank(s_authorizedAddress); + vm.expectRevert(abi.encodeWithSelector(WorkflowRegistry.URLTooLong.selector, bytes(s_invalidURL).length, 200)); + s_registry.updateWorkflow( + s_validWorkflowKey, s_newValidWorkflowID, s_validBinaryURL, s_invalidURL, s_validSecretsURL + ); + } + + // whenTheCallerIsAnAuthorizedAddress whenTheRegistryIsNotLocked whenTheDonIDIsAllowed whenTheCallerIsTheWorkflowOwner + function test_RevertWhen_TheSecretsURLIsTooLong() external { + // Register a workflow first + _registerValidWorkflow(); + + // Update the workflow with a secrets URL that is too long. + vm.prank(s_authorizedAddress); + vm.expectRevert(abi.encodeWithSelector(WorkflowRegistry.URLTooLong.selector, bytes(s_invalidURL).length, 200)); + s_registry.updateWorkflow( + s_validWorkflowKey, s_newValidWorkflowID, s_validBinaryURL, s_validConfigURL, s_invalidURL + ); + } + + // whenTheCallerIsAnAuthorizedAddress whenTheRegistryIsNotLocked whenTheDonIDIsAllowed whenTheCallerIsTheWorkflowOwner + function test_RevertWhen_TheWorkflowIDIsInvalid() external { + // Register a workflow first. + _registerValidWorkflow(); + + // Update the workflow with an invalid workflow ID. + vm.prank(s_authorizedAddress); + vm.expectRevert(WorkflowRegistry.InvalidWorkflowID.selector); + s_registry.updateWorkflow(s_validWorkflowKey, bytes32(0), s_validBinaryURL, s_validConfigURL, s_newValidSecretsURL); + } + + // whenTheCallerIsAnAuthorizedAddress whenTheRegistryIsNotLocked whenTheDonIDIsAllowed whenTheCallerIsTheWorkflowOwner + function test_WhenTheWorkflowInputsAreAllValid() external { + // Register a workflow first. + _registerValidWorkflow(); + + // Update the workflow. + // It should emit {WorkflowUpdatedV1}. + vm.expectEmit(true, true, true, true); + emit WorkflowRegistry.WorkflowUpdatedV1( + s_validWorkflowID, + s_authorizedAddress, + s_allowedDonID, + s_newValidWorkflowID, + s_validWorkflowName, + s_validBinaryURL, + s_validConfigURL, + s_newValidSecretsURL + ); + + vm.startPrank(s_authorizedAddress); + s_registry.updateWorkflow( + s_validWorkflowKey, s_newValidWorkflowID, s_validBinaryURL, s_validConfigURL, s_newValidSecretsURL + ); + + // It should update the workflow in s_workflows with the new values + WorkflowRegistry.WorkflowMetadata memory workflow = + s_registry.getWorkflowMetadata(s_authorizedAddress, s_validWorkflowName); + assertEq(workflow.owner, s_authorizedAddress); + assertEq(workflow.donID, s_allowedDonID); + assertEq(workflow.workflowName, s_validWorkflowName); + assertEq(workflow.workflowID, s_newValidWorkflowID); + assertEq(workflow.binaryURL, s_validBinaryURL); + assertEq(workflow.configURL, s_validConfigURL); + assertEq(workflow.secretsURL, s_newValidSecretsURL); + assertTrue(workflow.status == WorkflowRegistry.WorkflowStatus.ACTIVE); + + // It should add the url + key to s_secretsHashToWorkflows when the secretsURL is not empty + vm.expectEmit(true, true, false, true); + emit WorkflowRegistry.WorkflowForceUpdateSecretsRequestedV1( + s_authorizedAddress, keccak256(abi.encodePacked(s_authorizedAddress, s_newValidSecretsURL)), s_validWorkflowName + ); + + // Call the function that should emit the event. + s_registry.requestForceUpdateSecrets(s_newValidSecretsURL); + vm.stopPrank(); + } +} diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.updateWorkflow.tree b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.updateWorkflow.tree new file mode 100644 index 00000000000..0d4da7cb32e --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.updateWorkflow.tree @@ -0,0 +1,32 @@ +WorkflowRegistry.updateWorkflow +├── when the caller is not an authorized address +│ └── it should revert +└── when the caller is an authorized address + ├── when the registry is locked + │ └── it should revert + └── when the registry is not locked + ├── when the donID is not allowed + │ └── it should revert + └── when the donID is allowed + ├── when the caller is not the workflow owner + │ └── it should revert + └── when the caller is the workflow owner + ├── when an existing workflow is not found with the given workflow name + │ └── it should revert + ├── when the new workflowID is the same as the existing workflowID + │ └── it should revert + ├── when none of the URLs are updated + │ └── it should revert + ├── when the binaryURL is too long + │ └── it should revert + ├── when the configURL is too long + │ └── it should revert + ├── when the secretsURL is too long + │ └── it should revert + ├── when the workflowID is invalid + │ └── it should revert + └── when the workflow inputs are all valid + ├── it should update the existing workflow in s_workflows with the new values + ├── it should emit {WorkflowUpdatedV1} + └── when the secretsURL is not empty + └── it should add the url + key to s_secretsHashToWorkflows diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistrySetup.t.sol b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistrySetup.t.sol new file mode 100644 index 00000000000..c1a44e43c8e --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistrySetup.t.sol @@ -0,0 +1,101 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {WorkflowRegistry} from "../../dev/WorkflowRegistry.sol"; +import {Test} from "forge-std/Test.sol"; + +contract WorkflowRegistrySetup is Test { + WorkflowRegistry internal s_registry; + address internal s_owner; + address internal s_nonOwner; + address internal s_authorizedAddress; + address internal s_unauthorizedAddress; + uint32 internal s_allowedDonID; + uint32 internal s_disallowedDonID; + bytes32 internal s_validWorkflowID; + string internal s_validWorkflowName; + string internal s_validBinaryURL; + string internal s_validConfigURL; + string internal s_validSecretsURL; + string internal s_invalidWorkflowName; + string internal s_invalidURL; + bytes32 internal s_validWorkflowKey; + + function setUp() public virtual { + s_owner = makeAddr("owner"); + s_nonOwner = makeAddr("nonOwner"); + s_authorizedAddress = makeAddr("authorizedAddress"); + s_unauthorizedAddress = makeAddr("unauthorizedAddress"); + s_allowedDonID = 1; + s_disallowedDonID = 99; + s_validWorkflowID = keccak256("validWorkflow"); + s_validWorkflowName = "ValidWorkflow"; + s_validBinaryURL = "https://example.com/valid-binary"; + s_validConfigURL = "https://example.com/valid-config"; + s_validSecretsURL = "https://example.com/valid-secrets"; + s_invalidWorkflowName = + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcd"; + s_invalidURL = + "https://www.example.com/this/is/a/very/long/url/that/keeps/going/on/and/on/to/ensure/that/it/exceeds/two/hundred/and/one/characters/in/length/for/testing/purposes/and/it/should/be/sufficiently/long/to/meet/your/requirements/for/this/test"; + + uint32[] memory allowedDONs = new uint32[](1); + allowedDONs[0] = s_allowedDonID; + address[] memory authorizedAddresses = new address[](1); + authorizedAddresses[0] = s_authorizedAddress; + + // Deploy the WorkflowRegistry contract + vm.startPrank(s_owner); + s_registry = new WorkflowRegistry(); + + s_validWorkflowKey = s_registry.computeHashKey(s_authorizedAddress, s_validWorkflowName); + + // Perform initial setup as the owner + s_registry.updateAllowedDONs(allowedDONs, true); + s_registry.updateAuthorizedAddresses(authorizedAddresses, true); + vm.stopPrank(); + } + + // Helper function to register a valid workflow + function _registerValidWorkflow() internal { + vm.prank(s_authorizedAddress); + s_registry.registerWorkflow( + s_validWorkflowName, + s_validWorkflowID, + s_allowedDonID, + WorkflowRegistry.WorkflowStatus.ACTIVE, + s_validBinaryURL, + s_validConfigURL, + s_validSecretsURL + ); + } + + // Helper function to remove an address from the authorized addresses list + function _removeAddressFromAuthorizedAddresses( + address addressToRemove + ) internal { + address[] memory addressesToRemove = new address[](1); + addressesToRemove[0] = addressToRemove; + vm.prank(s_owner); + s_registry.updateAuthorizedAddresses(addressesToRemove, false); + } + + // Helper function to remove a DON from the allowed DONs list + function _removeDONFromAllowedDONs( + uint32 donIDToRemove + ) internal { + uint32[] memory donIDsToRemove = new uint32[](1); + donIDsToRemove[0] = donIDToRemove; + vm.prank(s_owner); + s_registry.updateAllowedDONs(donIDsToRemove, false); + } + + // Helper function to add an address to the authorized addresses list + function _addAddressToAuthorizedAddresses( + address addressToAdd + ) internal { + address[] memory addressesToAdd = new address[](1); + addressesToAdd[0] = addressToAdd; + vm.prank(s_owner); + s_registry.updateAuthorizedAddresses(addressesToAdd, true); + } +} diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistryWithFixture.t.sol b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistryWithFixture.t.sol new file mode 100644 index 00000000000..6c24a2d8f59 --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistryWithFixture.t.sol @@ -0,0 +1,68 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {WorkflowRegistry} from "../../dev/WorkflowRegistry.sol"; +import {WorkflowRegistrySetup} from "./WorkflowRegistrySetup.t.sol"; + +contract WorkflowRegistryWithFixture is WorkflowRegistrySetup { + string internal s_workflowName1 = "Workflow1"; + bytes32 internal s_workflowID1 = keccak256("workflow1"); + string internal s_binaryURL1 = "https://example.com/binary1"; + string internal s_configURL1 = "https://example.com/config1"; + string internal s_secretsURL1 = "https://example.com/secrets1"; + + string internal s_workflowName2 = "Workflow2"; + bytes32 internal s_workflowID2 = keccak256("workflow2"); + string internal s_binaryURL2 = "https://example.com/binary2"; + string internal s_configURL2 = "https://example.com/config2"; + string internal s_secretsURL2 = "https://example.com/secrets2"; + + string internal s_workflowName3 = "Workflow3"; + bytes32 internal s_workflowID3 = keccak256("workflow3"); + string internal s_binaryURL3 = "https://example.com/binary3"; + string internal s_configURL3 = "https://example.com/config3"; + string internal s_secretsURL3 = "https://example.com/secrets3"; + + function setUp() public override { + super.setUp(); + + // Register some workflows for s_authorizedAddress in s_allowedDonID + string[] memory workflowNames = new string[](3); + bytes32[] memory workflowIDs = new bytes32[](3); + string[] memory binaryURLs = new string[](3); + string[] memory configURLs = new string[](3); + string[] memory secretsURLs = new string[](3); + + workflowNames[0] = s_workflowName1; + workflowIDs[0] = s_workflowID1; + binaryURLs[0] = s_binaryURL1; + configURLs[0] = s_configURL1; + secretsURLs[0] = s_secretsURL1; + + workflowNames[1] = s_workflowName2; + workflowIDs[1] = s_workflowID2; + binaryURLs[1] = s_binaryURL2; + configURLs[1] = s_configURL2; + secretsURLs[1] = s_secretsURL2; + + workflowNames[2] = s_workflowName3; + workflowIDs[2] = s_workflowID3; + binaryURLs[2] = s_binaryURL3; + configURLs[2] = s_configURL3; + secretsURLs[2] = s_secretsURL3; + + vm.startPrank(s_authorizedAddress); + for (uint256 i = 0; i < workflowNames.length; ++i) { + s_registry.registerWorkflow( + workflowNames[i], + workflowIDs[i], + s_allowedDonID, + WorkflowRegistry.WorkflowStatus.ACTIVE, + binaryURLs[i], + configURLs[i], + secretsURLs[i] + ); + } + vm.stopPrank(); + } +} diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.activateVersion.t.sol b/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.activateVersion.t.sol new file mode 100644 index 00000000000..555d26e065f --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.activateVersion.t.sol @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {WorkflowRegistryManagerSetup} from "./WorkflowRegistryManagerSetup.t.sol"; + +import {Ownable2Step} from "../../../shared/access/Ownable2Step.sol"; + +contract WorkflowRegistryManager_activateVersion is WorkflowRegistryManagerSetup { + function test_RevertWhen_TheCallerIsNotTheOwner() external { + // it should revert + vm.prank(s_nonOwner); + vm.expectRevert(Ownable2Step.OnlyCallableByOwner.selector); + s_registryManager.activateVersion(s_versionNumber); + } + + // whenTheCallerIsTheOwner + function test_RevertWhen_TheVersionNumberDoesNotExist() external { + // it should revert + } + + // whenTheCallerIsTheOwner whenTheVersionNumberExists + function test_RevertWhen_TheVersionNumberIsAlreadyActive() external { + // it should revert + } + + function test_WhenTheVersionNumberIsNotActive() external { + // it should deactivate the current active version (if any) + // it should activate the specified version and update s_activeVersionNumber + // it should add the version to s_versionNumberByAddressAndChainID + // it should emit VersionDeactivatedV1 (if a previous version was active) + // it should emit VersionActivatedV1 + } +} diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.activateVersion.tree b/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.activateVersion.tree new file mode 100644 index 00000000000..eb95a4e794c --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.activateVersion.tree @@ -0,0 +1,15 @@ +WorkflowRegistryManager.activateVersion +├── when the caller is not the owner +│ └── it should revert +└── when the caller is the owner + ├── when the versionNumber does not exist + │ └── it should revert + └── when the versionNumber exists + ├── when the versionNumber is already active + │ └── it should revert + └── when the versionNumber is not active + ├── it should deactivate the current active version (if any) + ├── it should activate the specified version and update s_activeVersionNumber + ├── it should add the version to s_versionNumberByAddressAndChainID + ├── it should emit VersionDeactivatedV1 (if a previous version was active) + └── it should emit VersionActivatedV1 diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.addVersion.t.sol b/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.addVersion.t.sol new file mode 100644 index 00000000000..940b15dfd54 --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.addVersion.t.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +contract WorkflowRegistryManageraddVersion { + function test_RevertWhen_TheCallerIsNotTheOwner() external { + // it should revert + } + + modifier whenTheCallerIsTheOwner() { + _; + } + + function test_RevertWhen_TheContractAddressIsInvalid() external whenTheCallerIsTheOwner { + // it should revert + } + + modifier whenTheContractAddressIsValid() { + _; + } + + function test_WhenAutoActivateIsTrue() external whenTheCallerIsTheOwner whenTheContractAddressIsValid { + // it should deactivate any currently active version + // it should activate the new version + // it should emit VersionAddedV1 after adding the version to s_versions + // it should emit VersionActivatedV1 + } + + function test_WhenAutoActivateIsFalse() external whenTheCallerIsTheOwner whenTheContractAddressIsValid { + // it should not activate the new version + // it should emit VersionAddedV1 after adding the version to s_versions + } +} diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.addVersion.tree b/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.addVersion.tree new file mode 100644 index 00000000000..553db81dbe0 --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.addVersion.tree @@ -0,0 +1,15 @@ +WorkflowRegistryManager.addVersion +├── when the caller is not the owner +│ └── it should revert +└── when the caller is the owner + ├── when the contract address is invalid + │ └── it should revert + └── when the contract address is valid + ├── when autoActivate is true + │ ├── it should deactivate any currently active version + │ ├── it should activate the new version + │ ├── it should emit VersionAddedV1 after adding the version to s_versions + │ └── it should emit VersionActivatedV1 + └── when autoActivate is false + ├── it should not activate the new version + └── it should emit VersionAddedV1 after adding the version to s_versions diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.getActiveVersion.t.sol b/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.getActiveVersion.t.sol new file mode 100644 index 00000000000..f20fafd5c95 --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.getActiveVersion.t.sol @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +contract WorkflowRegistryManagergetActiveVersion { + function test_WhenNoActiveVersionIsAvailable() external { + // it should revert with NoActiveVersionAvailable + } + + function test_WhenAnActiveVersionExists() external { + // it should return the active version details + } +} diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.getActiveVersion.tree b/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.getActiveVersion.tree new file mode 100644 index 00000000000..2ba1ad78e36 --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.getActiveVersion.tree @@ -0,0 +1,5 @@ +WorkflowRegistryManager.getActiveVersion +├── when no active version is available +│ └── it should revert with NoActiveVersionAvailable +└── when an active version exists + └── it should return the active version details diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.getAllVersions.t.sol b/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.getAllVersions.t.sol new file mode 100644 index 00000000000..9719d21711a --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.getAllVersions.t.sol @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +contract WorkflowRegistryManagergetAllVersions { + function test_WhenRequestingWithInvalidStartIndex() external { + // it should return an empty array + } + + function test_WhenRequestingWithValidStartIndexAndLimitWithinBounds() external { + // it should return the correct versions based on pagination + } + + function test_WhenLimitExceedsMaximumPaginationLimit() external { + // it should return results up to MAX_PAGINATION_LIMIT + } +} diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.getAllVersions.tree b/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.getAllVersions.tree new file mode 100644 index 00000000000..20b583ee16a --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.getAllVersions.tree @@ -0,0 +1,7 @@ +WorkflowRegistryManager.getAllVersions +├── when requesting with invalid start index +│ └── it should return an empty array +├── when requesting with valid start index and limit within bounds +│ └── it should return the correct versions based on pagination +└── when limit exceeds maximum pagination limit + └── it should return results up to MAX_PAGINATION_LIMIT diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.getLatestVersion.t.sol b/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.getLatestVersion.t.sol new file mode 100644 index 00000000000..7c38eb6f8a7 --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.getLatestVersion.t.sol @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +contract WorkflowRegistryManagergetLatestVersion { + function test_WhenNoVersionsHaveBeenRegistered() external { + // it should revert with NoActiveVersionAvailable + } + + function test_WhenVersionsHaveBeenRegistered() external { + // it should return the latest registered version details + } +} diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.getLatestVersion.tree b/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.getLatestVersion.tree new file mode 100644 index 00000000000..42012a0962f --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.getLatestVersion.tree @@ -0,0 +1,5 @@ +WorkflowRegistryManager.getLatestVersion +├── when no versions have been registered +│ └── it should revert with NoActiveVersionAvailable +└── when versions have been registered + └── it should return the latest registered version details diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.getVersion.t.sol b/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.getVersion.t.sol new file mode 100644 index 00000000000..54b12211ca7 --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.getVersion.t.sol @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +contract WorkflowRegistryManagergetVersion { + function test_WhenVersionNumberIsNotRegistered() external { + // it should revert with VersionNotRegistered + } + + function test_WhenVersionNumberIsRegistered() external { + // it should return the correct version details + } +} diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.getVersion.tree b/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.getVersion.tree new file mode 100644 index 00000000000..6b678dc032b --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.getVersion.tree @@ -0,0 +1,5 @@ +WorkflowRegistryManager.getVersion +├── when versionNumber is not registered +│ └── it should revert with VersionNotRegistered +└── when versionNumber is registered + └── it should return the correct version details diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.getVersionNumber.t.sol b/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.getVersionNumber.t.sol new file mode 100644 index 00000000000..05ed4c43fda --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.getVersionNumber.t.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +contract WorkflowRegistryManagergetVersionNumber { + function test_WhenTheContractAddressIsInvalid() external { + // it should revert with InvalidContractAddress + } + + modifier whenTheContractAddressIsValid() { + _; + } + + function test_WhenNoVersionIsRegisteredForTheContractAddressAndChainIDCombination() + external + whenTheContractAddressIsValid + { + // it should revert with NoVersionsRegistered + } + + function test_WhenAVersionIsRegisteredForTheContractAddressAndChainIDCombination() + external + whenTheContractAddressIsValid + { + // it should return the correct version number + } +} diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.getVersionNumber.tree b/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.getVersionNumber.tree new file mode 100644 index 00000000000..361e6192724 --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManager.getVersionNumber.tree @@ -0,0 +1,8 @@ +WorkflowRegistryManager.getVersionNumber +├── when the contractAddress is invalid +│ └── it should revert with InvalidContractAddress +└── when the contractAddress is valid + ├── when no version is registered for the contractAddress and chainID combination + │ └── it should revert with NoVersionsRegistered + └── when a version is registered for the contractAddress and chainID combination + └── it should return the correct version number diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManagerSetup.t.sol b/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManagerSetup.t.sol new file mode 100644 index 00000000000..c9e4a84da81 --- /dev/null +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistryManager/WorkflowRegistryManagerSetup.t.sol @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {WorkflowRegistryManager} from "../../dev/WorkflowRegistryManager.sol"; +import {Test} from "forge-std/Test.sol"; + +contract WorkflowRegistryManagerSetup is Test { + WorkflowRegistryManager internal s_registryManager; + address internal s_owner; + address internal s_nonOwner; + address internal s_contractAddress; + uint64 internal s_chainID; + uint32 internal s_versionNumber; + uint32 internal s_deployedAt; + + function setUp() public virtual { + s_owner = makeAddr("owner"); + s_nonOwner = makeAddr("nonOwner"); + s_contractAddress = makeAddr("contractAddress"); + s_chainID = 1; + s_versionNumber = 1; + s_deployedAt = uint32(block.timestamp); + + // Deploy the WorkflowRegistryManager contract + vm.prank(s_owner); + s_registryManager = new WorkflowRegistryManager(); + } +} diff --git a/core/capabilities/ccip/ccipevm/gas_helpers.go b/core/capabilities/ccip/ccipevm/gas_helpers.go index 52e3d033d2a..2706650f48e 100644 --- a/core/capabilities/ccip/ccipevm/gas_helpers.go +++ b/core/capabilities/ccip/ccipevm/gas_helpers.go @@ -27,6 +27,8 @@ const ( ExecutionStateProcessingOverheadGas = 2_100 + // COLD_SLOAD_COST for first reading the state 20_000 + // SSTORE_SET_GAS for writing from 0 (untouched) to non-zero (in-progress) 100 //# SLOAD_GAS = WARM_STORAGE_READ_COST for rewriting from non-zero (in-progress) to non-zero (success/failure) + // TODO: investigate the write overhead for v1.6 + DestGasOverhead = 110_000 + 110_000 + 130_000 // 110K for commit, 110K for RMN, 130K for Exec ) func NewGasEstimateProvider() EstimateProvider { @@ -61,8 +63,6 @@ func (gp EstimateProvider) CalculateMessageMaxGas(msg cciptypes.Message) uint64 } // CalculateMessageMaxGasWithError computes the maximum gas overhead for a message. -// TODO: Add destGasOverhead, see: -// https://github.com/smartcontractkit/chainlink/blob/23452266132228234312947660374fb393e96f1a/contracts/src/v0.8/ccip/FeeQuoter.sol#L97 func (gp EstimateProvider) CalculateMessageMaxGasWithError(msg cciptypes.Message) (uint64, error) { numTokens := len(msg.TokenAmounts) var data []byte = msg.Data @@ -98,7 +98,8 @@ func (gp EstimateProvider) CalculateMessageMaxGasWithError(msg cciptypes.Message adminRegistryOverhead = TokenAdminRegistryWarmupCost } - return messageGasLimit.Uint64() + + return DestGasOverhead + + messageGasLimit.Uint64() + messageCallDataGas + ExecutionStateProcessingOverheadGas + SupportsInterfaceCheck + diff --git a/core/capabilities/ccip/ccipevm/gas_helpers_test.go b/core/capabilities/ccip/ccipevm/gas_helpers_test.go index bcc87867407..570e7377d34 100644 --- a/core/capabilities/ccip/ccipevm/gas_helpers_test.go +++ b/core/capabilities/ccip/ccipevm/gas_helpers_test.go @@ -26,17 +26,17 @@ func Test_calculateMessageMaxGas(t *testing.T) { { name: "base", args: args{dataLen: 5, numTokens: 2, extraArgs: makeExtraArgsV1(200_000), tokenGasOverhead: 10}, - want: 1_022_284, + want: 1_372_284, }, { name: "large", args: args{dataLen: 1000, numTokens: 1000, extraArgs: makeExtraArgsV1(200_000), tokenGasOverhead: 1}, - want: 346_678_520, + want: 347_028_520, }, { name: "overheadGas test 1", args: args{dataLen: 0, numTokens: 0, extraArgs: makeExtraArgsV1(200_000), tokenGasOverhead: 100}, - want: 319_920, + want: 669_920, }, { name: "overheadGas test 2", @@ -46,7 +46,7 @@ func Test_calculateMessageMaxGas(t *testing.T) { extraArgs: makeExtraArgsV1(200_000), tokenGasOverhead: 2, }, - want: 675_950, + want: 1_025_950, }, { name: "allowOOO set to true makes no difference to final gas estimate", @@ -56,7 +56,7 @@ func Test_calculateMessageMaxGas(t *testing.T) { extraArgs: makeExtraArgsV2(200_000, true), tokenGasOverhead: 100, }, - want: 1_022_464, + want: 1_372_464, }, { name: "allowOOO set to false makes no difference to final gas estimate", @@ -66,7 +66,7 @@ func Test_calculateMessageMaxGas(t *testing.T) { extraArgs: makeExtraArgsV2(200_000, false), tokenGasOverhead: 100, }, - want: 1_022_464, + want: 1_372_464, }, } @@ -104,7 +104,7 @@ func TestCalculateMaxGas(t *testing.T) { numberOfTokens: 0, extraArgs: makeExtraArgsV1(200_000), tokenGasOverhead: 10, - want: 322_992, + want: 672_992, }, { name: "maxGasOverheadGas 2", @@ -113,7 +113,7 @@ func TestCalculateMaxGas(t *testing.T) { numberOfTokens: 1, extraArgs: makeExtraArgsV1(200_000), tokenGasOverhead: 10, - want: 678_518, + want: 1_028_518, }, { name: "v2 extra args", @@ -122,7 +122,7 @@ func TestCalculateMaxGas(t *testing.T) { numberOfTokens: 1, extraArgs: makeExtraArgsV2(200_000, true), tokenGasOverhead: 10, - want: 678_518, + want: 1_028_518, }, } diff --git a/core/chains/evm/client/rpc_client_test.go b/core/chains/evm/client/rpc_client_test.go index 51ef65c5348..c8edc7c557c 100644 --- a/core/chains/evm/client/rpc_client_test.go +++ b/core/chains/evm/client/rpc_client_test.go @@ -86,7 +86,7 @@ func TestRPCClient_SubscribeToHeads(t *testing.T) { t.Run("WS and HTTP URL cannot be both empty", func(t *testing.T) { // ws is optional when LogBroadcaster is disabled, however SubscribeFilterLogs will return error if ws is missing - observedLggr, _ := logger.TestObserved(t, zap.DebugLevel) + observedLggr := logger.Test(t) rpcClient := client.NewRPCClient(nodePoolCfgHeadPolling, observedLggr, nil, nil, "rpc", 1, chainId, commonclient.Primary, commonclient.QueryTimeout, commonclient.QueryTimeout, "") require.Equal(t, errors.New("cannot dial rpc client when both ws and http info are missing"), rpcClient.Dial(ctx)) }) @@ -339,7 +339,7 @@ func TestRPCClient_SubscribeFilterLogs(t *testing.T) { defer cancel() t.Run("Failed SubscribeFilterLogs when WSURL is empty", func(t *testing.T) { // ws is optional when LogBroadcaster is disabled, however SubscribeFilterLogs will return error if ws is missing - observedLggr, _ := logger.TestObserved(t, zap.DebugLevel) + observedLggr := logger.Test(t) rpcClient := client.NewRPCClient(nodePoolCfg, observedLggr, nil, &url.URL{}, "rpc", 1, chainId, commonclient.Primary, commonclient.QueryTimeout, commonclient.QueryTimeout, "") require.Nil(t, rpcClient.Dial(ctx)) diff --git a/core/chains/evm/gas/block_history_estimator_test.go b/core/chains/evm/gas/block_history_estimator_test.go index bf4c0eb4eef..e3df261f2cf 100644 --- a/core/chains/evm/gas/block_history_estimator_test.go +++ b/core/chains/evm/gas/block_history_estimator_test.go @@ -16,7 +16,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "go.uber.org/zap/zapcore" "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" @@ -2179,7 +2178,7 @@ func TestBlockHistoryEstimator_HaltBumping(t *testing.T) { bhCfg := newBlockHistoryConfig() bhCfg.CheckInclusionBlocksF = uint16(4) bhCfg.CheckInclusionPercentileF = uint16(90) - lggr, _ := logger.TestObserved(t, zapcore.DebugLevel) + lggr := logger.Test(t) geCfg := &gas.MockGasEstimatorConfig{} geCfg.EIP1559DynamicFeesF = false geCfg.PriceMinF = assets.NewWeiI(1) diff --git a/core/chains/evm/logpoller/observability_test.go b/core/chains/evm/logpoller/observability_test.go index b34c16c0a98..6ebc5b0cce0 100644 --- a/core/chains/evm/logpoller/observability_test.go +++ b/core/chains/evm/logpoller/observability_test.go @@ -8,12 +8,10 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/testutil" io_prometheus_client "github.com/prometheus/client_model/go" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.uber.org/zap/zapcore" - - "github.com/prometheus/client_golang/prometheus/testutil" "github.com/smartcontractkit/chainlink-common/pkg/logger" @@ -171,7 +169,7 @@ func generateRandomLogs(chainId, count int) []Log { } func createObservedORM(t *testing.T, chainId int64) *ObservedORM { - lggr, _ := logger.TestObserved(t, zapcore.ErrorLevel) + lggr := logger.Test(t) db := pgtest.NewSqlxDB(t) return NewObservedORM(big.NewInt(chainId), db, lggr) } diff --git a/core/gethwrappers/go_generate.go b/core/gethwrappers/go_generate.go index 32db02f2bf7..25001027a59 100644 --- a/core/gethwrappers/go_generate.go +++ b/core/gethwrappers/go_generate.go @@ -163,6 +163,7 @@ package gethwrappers //go:generate go generate ./transmission //go:generate go generate ./ccip //go:generate go generate ./liquiditymanager +//go:generate go generate ./workflow // Mocks that contain only events and functions to emit them // These contracts are used in testing Atlas flows. The contracts contain no logic, only events, structures, and functions to emit them. diff --git a/core/gethwrappers/workflow/generated/workflow_registry_wrapper/workflow_registry_wrapper.go b/core/gethwrappers/workflow/generated/workflow_registry_wrapper/workflow_registry_wrapper.go new file mode 100644 index 00000000000..008fffab28a --- /dev/null +++ b/core/gethwrappers/workflow/generated/workflow_registry_wrapper/workflow_registry_wrapper.go @@ -0,0 +1,2358 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package workflow_registry_wrapper + +import ( + "errors" + "fmt" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" +) + +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +type WorkflowRegistryWorkflowMetadata struct { + WorkflowID [32]byte + Owner common.Address + DonID uint32 + Status uint8 + WorkflowName string + BinaryURL string + ConfigURL string + SecretsURL string +} + +var WorkflowRegistryMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"AddressNotAuthorized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"CallerIsNotWorkflowOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CannotTransferToSelf\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donID\",\"type\":\"uint32\"}],\"name\":\"DONNotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidWorkflowID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MustBeProposedOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OwnerCannotBeZero\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RegistryLocked\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"providedLength\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"maxAllowedLength\",\"type\":\"uint8\"}],\"name\":\"URLTooLong\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WorkflowAlreadyInDesiredStatus\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WorkflowAlreadyRegistered\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WorkflowContentNotUpdated\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WorkflowDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WorkflowIDAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WorkflowIDNotUpdated\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"providedLength\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"maxAllowedLength\",\"type\":\"uint8\"}],\"name\":\"WorkflowNameTooLong\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32[]\",\"name\":\"donIDs\",\"type\":\"uint32[]\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"AllowedDONsUpdatedV1\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"addresses\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"AuthorizedAddressesUpdatedV1\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"lockedBy\",\"type\":\"address\"}],\"name\":\"RegistryLockedV1\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"unlockedBy\",\"type\":\"address\"}],\"name\":\"RegistryUnlockedV1\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"workflowID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"workflowOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"donID\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"workflowName\",\"type\":\"string\"}],\"name\":\"WorkflowActivatedV1\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"workflowID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"workflowOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"donID\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"workflowName\",\"type\":\"string\"}],\"name\":\"WorkflowDeletedV1\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"secretsURLHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"workflowName\",\"type\":\"string\"}],\"name\":\"WorkflowForceUpdateSecretsRequestedV1\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"workflowID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"workflowOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"donID\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"workflowName\",\"type\":\"string\"}],\"name\":\"WorkflowPausedV1\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"workflowID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"workflowOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"donID\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"enumWorkflowRegistry.WorkflowStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"workflowName\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"binaryURL\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"configURL\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"secretsURL\",\"type\":\"string\"}],\"name\":\"WorkflowRegisteredV1\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"oldWorkflowID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"workflowOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"donID\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"newWorkflowID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"workflowName\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"binaryURL\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"configURL\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"secretsURL\",\"type\":\"string\"}],\"name\":\"WorkflowUpdatedV1\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"workflowKey\",\"type\":\"bytes32\"}],\"name\":\"activateWorkflow\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"field\",\"type\":\"string\"}],\"name\":\"computeHashKey\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"workflowKey\",\"type\":\"bytes32\"}],\"name\":\"deleteWorkflow\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllAllowedDONs\",\"outputs\":[{\"internalType\":\"uint32[]\",\"name\":\"allowedDONs\",\"type\":\"uint32[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllAuthorizedAddresses\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"authorizedAddresses\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"workflowOwner\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"workflowName\",\"type\":\"string\"}],\"name\":\"getWorkflowMetadata\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"workflowID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"donID\",\"type\":\"uint32\"},{\"internalType\":\"enumWorkflowRegistry.WorkflowStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"workflowName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"binaryURL\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"configURL\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"secretsURL\",\"type\":\"string\"}],\"internalType\":\"structWorkflowRegistry.WorkflowMetadata\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donID\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"start\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"limit\",\"type\":\"uint256\"}],\"name\":\"getWorkflowMetadataListByDON\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"workflowID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"donID\",\"type\":\"uint32\"},{\"internalType\":\"enumWorkflowRegistry.WorkflowStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"workflowName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"binaryURL\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"configURL\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"secretsURL\",\"type\":\"string\"}],\"internalType\":\"structWorkflowRegistry.WorkflowMetadata[]\",\"name\":\"workflowMetadataList\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"workflowOwner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"start\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"limit\",\"type\":\"uint256\"}],\"name\":\"getWorkflowMetadataListByOwner\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"workflowID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"donID\",\"type\":\"uint32\"},{\"internalType\":\"enumWorkflowRegistry.WorkflowStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"workflowName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"binaryURL\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"configURL\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"secretsURL\",\"type\":\"string\"}],\"internalType\":\"structWorkflowRegistry.WorkflowMetadata[]\",\"name\":\"workflowMetadataList\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isRegistryLocked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lockRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"workflowKey\",\"type\":\"bytes32\"}],\"name\":\"pauseWorkflow\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"workflowName\",\"type\":\"string\"},{\"internalType\":\"bytes32\",\"name\":\"workflowID\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"donID\",\"type\":\"uint32\"},{\"internalType\":\"enumWorkflowRegistry.WorkflowStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"binaryURL\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"configURL\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"secretsURL\",\"type\":\"string\"}],\"name\":\"registerWorkflow\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"secretsURL\",\"type\":\"string\"}],\"name\":\"requestForceUpdateSecrets\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unlockRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"donIDs\",\"type\":\"uint32[]\"},{\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"updateAllowedDONs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"addresses\",\"type\":\"address[]\"},{\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"updateAuthorizedAddresses\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"workflowKey\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"newWorkflowID\",\"type\":\"bytes32\"},{\"internalType\":\"string\",\"name\":\"binaryURL\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"configURL\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"secretsURL\",\"type\":\"string\"}],\"name\":\"updateWorkflow\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x6080806040523461004a57331561003b57600180546001600160a01b03191633179055600a805460ff191690556040516133df90816100508239f35b639b15e16f60e01b8152600490fd5b600080fdfe6080604052600436101561001257600080fd5b60003560e01c806308e7f63a14612082578063181f5a7714611ff35780632303348a14611eb65780632b596f6d14611e2c5780633ccd14ff146114f2578063695e1340146113565780636f3517711461127d578063724c13dd146111865780637497066b1461106b57806379ba509714610f955780637ec0846d14610f0e5780638da5cb5b14610ebc5780639f4cb53414610e9b578063b87a019414610e45578063d4b89c7414610698578063db800092146105fd578063e3dce080146104d6578063e690f33214610362578063f2fde38b14610284578063f794bdeb146101495763f99ecb6b1461010357600080fd5b346101445760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014457602060ff600a54166040519015158152f35b600080fd5b346101445760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101445760068054610185816123fc565b6101926040519182612283565b81815261019e826123fc565b916020937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe060208401940136853760005b82811061023257505050906040519283926020840190602085525180915260408401929160005b82811061020557505050500390f35b835173ffffffffffffffffffffffffffffffffffffffff16855286955093810193928101926001016101f6565b6001908260005273ffffffffffffffffffffffffffffffffffffffff817ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f01541661027d828761252e565b52016101cf565b346101445760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610144576102bb61236a565b6102c3612bc7565b73ffffffffffffffffffffffffffffffffffffffff8091169033821461033857817fffffffffffffffffffffffff00000000000000000000000000000000000000006000541617600055600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278600080a3005b60046040517fdad89dca000000000000000000000000000000000000000000000000000000008152fd5b346101445760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101445760ff600a54166104ac576103a760043533612dad565b600181019081549160ff8360c01c16600281101561047d576001146104535778010000000000000000000000000000000000000000000000007fffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffff841617905580547f6a0ed88e9cf3cb493ab4028fcb1dc7d18f0130fcdfba096edde0aadbfbf5e99f63ffffffff604051946020865260a01c16938061044e339560026020840191016125d0565b0390a4005b60046040517f6f861db1000000000000000000000000000000000000000000000000000000008152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60046040517f78a4e7d9000000000000000000000000000000000000000000000000000000008152fd5b34610144576104e4366122f2565b916104ed612bc7565b60ff600a54166104ac5760005b828110610589575060405191806040840160408552526060830191906000905b8082106105515785151560208601527f509460cccbb176edde6cac28895a4415a24961b8f3a0bd2617b9bb7b4e166c9b85850386a1005b90919283359073ffffffffffffffffffffffffffffffffffffffff82168092036101445760019181526020809101940192019061051a565b60019084156105cb576105c373ffffffffffffffffffffffffffffffffffffffff6105bd6105b8848888612a67565b612ba6565b16612f88565b505b016104fa565b6105f773ffffffffffffffffffffffffffffffffffffffff6105f16105b8848888612a67565b166131b9565b506105c5565b346101445761061d61060e3661238d565b91610617612414565b50612a88565b6000526004602052604060002073ffffffffffffffffffffffffffffffffffffffff6001820154161561066e5761065661066a91612684565b604051918291602083526020830190612140565b0390f35b60046040517f871e01b2000000000000000000000000000000000000000000000000000000008152fd5b346101445760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101445760443567ffffffffffffffff8111610144576106e79036906004016122c4565b9060643567ffffffffffffffff8111610144576107089036906004016122c4565b9160843567ffffffffffffffff8111610144576107299036906004016122c4565b60ff600a94929454166104ac57610744818688602435612cbc565b61075060043533612dad565b9163ffffffff600184015460a01c169561076a3388612c12565b8354946024358614610e1b576107a56040516107948161078d8160038b016125d0565b0382612283565b61079f368c85612838565b90612e1c565b6107c76040516107bc8161078d8160048c016125d0565b61079f368688612838565b6107e96040516107de8161078d8160058d016125d0565b61079f36898d612838565b918080610e14575b80610e0d575b610de357602435885515610c8e575b15610b3d575b15610890575b926108807f41161473ce2ed633d9f902aab9702d16a5531da27ec84e1939abeffe54ad7353959361044e93610872610864978d604051998a996024358b5260a060208c0152600260a08c0191016125d0565b9189830360408b01526128fb565b9186830360608801526128fb565b90838203608085015233976128fb565b61089d600586015461257d565b610ad6575b67ffffffffffffffff8411610aa7576108cb846108c2600588015461257d565b600588016128b4565b6000601f85116001146109a757928492610872610880938a9b9c61094f876108649b9a61044e9a7f41161473ce2ed633d9f902aab9702d16a5531da27ec84e1939abeffe54ad73539e9f60009261099c575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b60058a01555b8c8780610972575b50509c9b9a9950935050929495509250610812565b61097c9133612a88565b60005260056020526109946004356040600020612fda565b508c8761095d565b013590508f8061091d565b9860058601600052602060002060005b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe087168110610a8f5750926108726108809361044e969388968c7f41161473ce2ed633d9f902aab9702d16a5531da27ec84e1939abeffe54ad73539c9d9e9f897fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06108649e9d1610610a57575b505050600187811b0160058a0155610955565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88b60031b161c199101351690558e8d81610a44565b898c0135825560209b8c019b600190920191016109b7565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516020810190610b1c81610af060058a01338661293a565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282612283565b5190206000526005602052610b376004356040600020613280565b506108a2565b67ffffffffffffffff8311610aa757610b6683610b5d600489015461257d565b600489016128b4565b600083601f8111600114610bc75780610bb292600091610bbc575b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b600487015561080c565b90508601358d610b81565b506004870160005260206000209060005b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe086168110610c765750847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0811610610c3e575b5050600183811b01600487015561080c565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88660031b161c19908601351690558a80610c2c565b9091602060018192858a013581550193019101610bd8565b67ffffffffffffffff8b11610aa757610cb78b610cae60038a015461257d565b60038a016128b4565b60008b601f8111600114610d175780610d0292600091610d0c57507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b6003880155610806565b90508501358e610b81565b506003880160005260206000209060005b8d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081168210610dca578091507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0811610610d91575b905060018092501b016003880155610806565b60f87fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9160031b161c19908501351690558b808c610d7e565b5085820135835560019092019160209182019101610d28565b60046040517f6b4a810d000000000000000000000000000000000000000000000000000000008152fd5b50826107f7565b50816107f1565b60046040517f95406722000000000000000000000000000000000000000000000000000000008152fd5b346101445760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101445761066a610e8f610e8261236a565b6044359060243590612ae3565b604051918291826121e4565b34610144576020610eb4610eae3661238d565b91612a88565b604051908152f35b346101445760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014457602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b346101445760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014457610f45612bc7565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00600a5416600a55337f11a03e25ee25bf1459f9e1cb293ea03707d84917f54a65e32c9a7be2f2edd68a600080a2005b346101445760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101445760005473ffffffffffffffffffffffffffffffffffffffff808216330361104157600154917fffffffffffffffffffffffff0000000000000000000000000000000000000000903382851617600155166000553391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b60046040517f02b543c6000000000000000000000000000000000000000000000000000000008152fd5b346101445760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014457600880546110a7816123fc565b6110b46040519182612283565b8181526110c0826123fc565b916020937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe060208401940136853760005b82811061114457505050906040519283926020840190602085525180915260408401929160005b82811061112757505050500390f35b835163ffffffff1685528695509381019392810192600101611118565b6001908260005263ffffffff817ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee301541661117f828761252e565b52016110f1565b3461014457611194366122f2565b9161119d612bc7565b60ff600a54166104ac5760005b828110611229575060405191806040840160408552526060830191906000905b8082106112015785151560208601527fcab63bf31d1e656baa23cebef64e12033ea0ffbd44b1278c3747beec2d2f618c85850386a1005b90919283359063ffffffff8216809203610144576001918152602080910194019201906111ca565b600190841561125b5761125363ffffffff61124d611248848888612a67565b612a77565b16612ecf565b505b016111aa565b61127763ffffffff611271611248848888612a67565b16613066565b50611255565b346101445760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101445760ff600a54166104ac576112c260043533612dad565b600181019081549163ffffffff8360a01c169260ff8160c01c16600281101561047d5715610453577fffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffff906113163386612c12565b16905580547f17b2d730bb5e064df3fbc6165c8aceb3b0d62c524c196c0bc1012209280bc9a6604051602081528061044e339560026020840191016125d0565b34610144576020807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610144576004359060ff600a54166104ac5761139e8233612dad565b63ffffffff600182015460a01c16926113c4336000526007602052604060002054151590565b156114c25733600052600283526113df816040600020613280565b5083600052600383526113f6816040600020613280565b5060058201611405815461257d565b61148e575b506000526004825261145160056040600020600081556000600182015561143360028201612a1e565b61143f60038201612a1e565b61144b60048201612a1e565b01612a1e565b7f76ee2dfcae10cb8522e62e713e62660e09ecfaab08db15d9404de1914132257161044e82549260405191829186835260023397840191016125d0565b6040516114a381610af087820194338661293a565b519020600052600583526114bb816040600020613280565b508461140a565b60246040517f85982a00000000000000000000000000000000000000000000000000000000008152336004820152fd5b346101445760e07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101445760043567ffffffffffffffff8111610144576115419036906004016122c4565b6044359163ffffffff8316830361014457600260643510156101445760843567ffffffffffffffff81116101445761157d9036906004016122c4565b91909260a43567ffffffffffffffff8111610144576115a09036906004016122c4565b60c43567ffffffffffffffff8111610144576115c09036906004016122c4565b96909560ff600a54166104ac576115d7338a612c12565b60408511611df4576115ed888483602435612cbc565b6115f8858733612a88565b80600052600460205273ffffffffffffffffffffffffffffffffffffffff60016040600020015416611dca576040519061163182612266565b602435825233602083015263ffffffff8b16604083015261165760643560608401612571565b61166236888a612838565b6080830152611672368486612838565b60a0830152611682368688612838565b60c0830152611692368b8b612838565b60e0830152806000526004602052604060002091805183556001830173ffffffffffffffffffffffffffffffffffffffff60208301511681549077ffffffff0000000000000000000000000000000000000000604085015160a01b16906060850151600281101561047d5778ff0000000000000000000000000000000000000000000000007fffffffffffffff000000000000000000000000000000000000000000000000009160c01b1693161717179055608081015180519067ffffffffffffffff8211610aa7576117758261176c600288015461257d565b600288016128b4565b602090601f8311600114611cfe576117c2929160009183611c275750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b60028401555b60a081015180519067ffffffffffffffff8211610aa7576117f9826117f0600388015461257d565b600388016128b4565b602090601f8311600114611c3257611846929160009183611c275750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b60038401555b60c081015180519067ffffffffffffffff8211610aa75761187d82611874600488015461257d565b600488016128b4565b602090601f8311600114611b5a5791806118ce9260e09594600092611a355750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b60048501555b015180519267ffffffffffffffff8411610aa757838d926119068e966118fd600586015461257d565b600586016128b4565b602090601f8311600114611a40579463ffffffff61087295819a957fc4399022965bad9b2b468bbd8c758a7e80cdde36ff3088ddbb7f93bdfb5623cb9f9e9d99946119928761044e9f9b986005936119f69f9a600092611a355750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b9101555b3360005260026020526119ad836040600020612fda565b501660005260036020526119c5816040600020612fda565b508d82611a0c575b5050506108646040519a8b9a6119e58c6064356120d5565b60a060208d015260a08c01916128fb565b97838903608085015216963396602435966128fb565b611a2c92611a1a9133612a88565b60005260056020526040600020612fda565b508c8f8d6119cd565b01519050388061091d565b906005840160005260206000209160005b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe085168110611b3057506108729563ffffffff9a957fc4399022965bad9b2b468bbd8c758a7e80cdde36ff3088ddbb7f93bdfb5623cb9f9e9d999460018761044e9f9b96928f96936119f69f9a94837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06005971610611af9575b505050811b01910155611996565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c19169055388080611aeb565b939550918194969750600160209291839285015181550194019201918f9492918f97969492611a51565b906004860160005260206000209160005b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe085168110611c0f5750918391600193837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe060e098971610611bd8575b505050811b0160048501556118d4565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690558f8080611bc8565b91926020600181928685015181550194019201611b6b565b015190508f8061091d565b9190600386016000526020600020906000935b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084168510611ce35760019450837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0811610611cac575b505050811b01600384015561184c565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690558e8080611c9c565b81810151835560209485019460019093019290910190611c45565b9190600286016000526020600020906000935b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084168510611daf5760019450837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0811610611d78575b505050811b0160028401556117c8565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690558e8080611d68565b81810151835560209485019460019093019290910190611d11565b60046040517fa0677dd0000000000000000000000000000000000000000000000000000000008152fd5b604485604051907f36a7c503000000000000000000000000000000000000000000000000000000008252600482015260406024820152fd5b346101445760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014457611e63612bc7565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00600a541617600a55337f2789711f6fd67d131ad68378617b5d1d21a2c92b34d7c3745d70b3957c08096c600080a2005b34610144576020807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101445760043567ffffffffffffffff811161014457611f069036906004016122c4565b60ff600a54166104ac57611f1a9133612a88565b90816000526005602052604060002091825491821561066e5760005b838110611f3f57005b80611f4c60019287612eb7565b90549060031b1c60005260048352604060002063ffffffff8382015460a01c1660005260098452604060002054151580611fd6575b611f8d575b5001611f36565b7f95d94f817db4971aa99ba35d0fe019bd8cc39866fbe02b6d47b5f0f3727fb67360405186815260408682015280611fcd339460026040840191016125d0565b0390a286611f86565b50611fee336000526007602052604060002054151590565b611f81565b346101445760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014457604051604081019080821067ffffffffffffffff831117610aa75761066a91604052601a81527f576f726b666c6f77526567697374727920312e302e302d64657600000000000060208201526040519182916020835260208301906120e2565b346101445760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101445760043563ffffffff8116810361014457610e8f61066a916044359060243590612743565b90600282101561047d5752565b919082519283825260005b84811061212c5750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b6020818301810151848301820152016120ed565b6121e19160e06121d06121be6121ac6101008651865273ffffffffffffffffffffffffffffffffffffffff602088015116602087015263ffffffff6040880151166040870152612198606088015160608801906120d5565b6080870151908060808801528601906120e2565b60a086015185820360a08701526120e2565b60c085015184820360c08601526120e2565b9201519060e08184039101526120e2565b90565b6020808201906020835283518092526040830192602060408460051b8301019501936000915b84831061221a5750505050505090565b9091929394958480612256837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc086600196030187528a51612140565b980193019301919493929061220a565b610100810190811067ffffffffffffffff821117610aa757604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117610aa757604052565b9181601f840112156101445782359167ffffffffffffffff8311610144576020838186019501011161014457565b9060407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8301126101445760043567ffffffffffffffff9283821161014457806023830112156101445781600401359384116101445760248460051b8301011161014457602401919060243580151581036101445790565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361014457565b9060407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8301126101445760043573ffffffffffffffffffffffffffffffffffffffff8116810361014457916024359067ffffffffffffffff8211610144576123f8916004016122c4565b9091565b67ffffffffffffffff8111610aa75760051b60200190565b6040519061242182612266565b606060e0836000815260006020820152600060408201526000838201528260808201528260a08201528260c08201520152565b6040516020810181811067ffffffffffffffff821117610aa7576040526000815290565b90612482826123fc565b61248f6040519182612283565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06124bd82946123fc565b019060005b8281106124ce57505050565b6020906124d9612414565b828285010152016124c2565b919082018092116124f257565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b919082039182116124f257565b80518210156125425760209160051b010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600282101561047d5752565b90600182811c921680156125c6575b602083101461259757565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f169161258c565b8054600093926125df8261257d565b918282526020936001916001811690816000146126475750600114612606575b5050505050565b90939495506000929192528360002092846000945b838610612633575050505001019038808080806125ff565b80548587018301529401938590820161261b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168685015250505090151560051b0101915038808080806125ff565b90600560e060409361273f85519161269b83612266565b6127388397825485526126e560ff600185015473ffffffffffffffffffffffffffffffffffffffff8116602089015263ffffffff8160a01c168489015260c01c1660608701612571565b80516126f88161078d81600288016125d0565b608086015280516127108161078d81600388016125d0565b60a086015280516127288161078d81600488016125d0565b60c08601525180968193016125d0565b0384612283565b0152565b63ffffffff16916000838152600360209060036020526040936040842054908187101561282857612797918160648993118015612820575b612818575b8161278b82856124e5565b11156128085750612521565b946127a186612478565b96845b8781106127b657505050505050505090565b6001908287528486526127d58888206127cf83876124e5565b90612eb7565b905490861b1c8752600486526127ec888820612684565b6127f6828c61252e565b52612801818b61252e565b50016127a4565b6128139150826124e5565b612521565b506064612780565b50801561277b565b50505050505050506121e1612454565b92919267ffffffffffffffff8211610aa7576040519161288060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160184612283565b829481845281830111610144578281602093846000960137010152565b8181106128a8575050565b6000815560010161289d565b9190601f81116128c357505050565b6128ef926000526020600020906020601f840160051c830193106128f1575b601f0160051c019061289d565b565b90915081906128e2565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b91907fffffffffffffffffffffffffffffffffffffffff0000000000000000000000009060601b1682526014906000928154926129768461257d565b926001946001811690816000146129dd5750600114612998575b505050505090565b9091929395945060005260209460206000206000905b8582106129ca5750505050601492935001013880808080612990565b80548583018501529087019082016129ae565b92505050601494507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091935016838301528015150201013880808080612990565b612a28815461257d565b9081612a32575050565b81601f60009311600114612a44575055565b908083918252612a63601f60208420940160051c84016001850161289d565b5555565b91908110156125425760051b0190565b3563ffffffff811681036101445790565b91906034612add91836040519485927fffffffffffffffffffffffffffffffffffffffff000000000000000000000000602085019860601b168852848401378101600083820152036014810184520182612283565b51902090565b73ffffffffffffffffffffffffffffffffffffffff1691600083815260029260209060026020526040936040842054908183101561282857612b3a91816064859311801561282057612818578161278b82856124e5565b94612b4486612478565b96845b878110612b5957505050505050505090565b600190828752838652612b728888206127cf83886124e5565b90549060031b1c875260048652612b8a888820612684565b612b94828c61252e565b52612b9f818b61252e565b5001612b47565b3573ffffffffffffffffffffffffffffffffffffffff811681036101445790565b73ffffffffffffffffffffffffffffffffffffffff600154163303612be857565b60046040517f2b5c74de000000000000000000000000000000000000000000000000000000008152fd5b63ffffffff1680600052600960205260406000205415612c8b575073ffffffffffffffffffffffffffffffffffffffff1680600052600760205260406000205415612c5a5750565b602490604051907f85982a000000000000000000000000000000000000000000000000000000000082526004820152fd5b602490604051907f8fe6d7e10000000000000000000000000000000000000000000000000000000082526004820152fd5b91909115612d835760c891828111612d4d5750818111612d185750808211612ce2575050565b60449250604051917ecd56a800000000000000000000000000000000000000000000000000000000835260048301526024820152fd5b604491604051917ecd56a800000000000000000000000000000000000000000000000000000000835260048301526024820152fd5b60449083604051917ecd56a800000000000000000000000000000000000000000000000000000000835260048301526024820152fd5b60046040517f7dc2f4e1000000000000000000000000000000000000000000000000000000008152fd5b90600052600460205260406000209073ffffffffffffffffffffffffffffffffffffffff8060018401541691821561066e5716809103612deb575090565b602490604051907f31ee6dc70000000000000000000000000000000000000000000000000000000082526004820152fd5b9081518151908181149384612e33575b5050505090565b6020929394508201209201201438808080612e2c565b6008548110156125425760086000527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30190600090565b6006548110156125425760066000527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0190600090565b80548210156125425760005260206000200190600090565b600081815260096020526040812054612f835760085468010000000000000000811015612f56579082612f42612f0d84600160409601600855612e49565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b905560085492815260096020522055600190565b6024827f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b905090565b600081815260076020526040812054612f835760065468010000000000000000811015612f56579082612fc6612f0d84600160409601600655612e80565b905560065492815260076020522055600190565b9190600183016000908282528060205260408220541560001461306057845494680100000000000000008610156130335783613023612f0d886001604098999a01855584612eb7565b9055549382526020522055600190565b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b50925050565b60008181526009602052604081205490919080156131b4577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90818101818111613187576008549083820191821161315a57818103613126575b50505060085480156130f9578101906130d882612e49565b909182549160031b1b19169055600855815260096020526040812055600190565b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526031600452fd5b613144613135612f0d93612e49565b90549060031b1c928392612e49565b90558452600960205260408420553880806130c0565b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b505090565b60008181526007602052604081205490919080156131b4577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90818101818111613187576006549083820191821161315a5781810361324c575b50505060065480156130f95781019061322b82612e80565b909182549160031b1b19169055600655815260076020526040812055600190565b61326a61325b612f0d93612e80565b90549060031b1c928392612e80565b9055845260076020526040842055388080613213565b90600182019060009281845282602052604084205490811515600014612e2c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff918281018181116133a55782549084820191821161337857818103613343575b50505080548015613316578201916132f98383612eb7565b909182549160031b1b191690555582526020526040812055600190565b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526031600452fd5b613363613353612f0d9386612eb7565b90549060031b1c92839286612eb7565b905586528460205260408620553880806132e1565b6024887f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b6024877f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fdfea164736f6c6343000818000a", +} + +var WorkflowRegistryABI = WorkflowRegistryMetaData.ABI + +var WorkflowRegistryBin = WorkflowRegistryMetaData.Bin + +func DeployWorkflowRegistry(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *WorkflowRegistry, error) { + parsed, err := WorkflowRegistryMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(WorkflowRegistryBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &WorkflowRegistry{address: address, abi: *parsed, WorkflowRegistryCaller: WorkflowRegistryCaller{contract: contract}, WorkflowRegistryTransactor: WorkflowRegistryTransactor{contract: contract}, WorkflowRegistryFilterer: WorkflowRegistryFilterer{contract: contract}}, nil +} + +type WorkflowRegistry struct { + address common.Address + abi abi.ABI + WorkflowRegistryCaller + WorkflowRegistryTransactor + WorkflowRegistryFilterer +} + +type WorkflowRegistryCaller struct { + contract *bind.BoundContract +} + +type WorkflowRegistryTransactor struct { + contract *bind.BoundContract +} + +type WorkflowRegistryFilterer struct { + contract *bind.BoundContract +} + +type WorkflowRegistrySession struct { + Contract *WorkflowRegistry + CallOpts bind.CallOpts + TransactOpts bind.TransactOpts +} + +type WorkflowRegistryCallerSession struct { + Contract *WorkflowRegistryCaller + CallOpts bind.CallOpts +} + +type WorkflowRegistryTransactorSession struct { + Contract *WorkflowRegistryTransactor + TransactOpts bind.TransactOpts +} + +type WorkflowRegistryRaw struct { + Contract *WorkflowRegistry +} + +type WorkflowRegistryCallerRaw struct { + Contract *WorkflowRegistryCaller +} + +type WorkflowRegistryTransactorRaw struct { + Contract *WorkflowRegistryTransactor +} + +func NewWorkflowRegistry(address common.Address, backend bind.ContractBackend) (*WorkflowRegistry, error) { + abi, err := abi.JSON(strings.NewReader(WorkflowRegistryABI)) + if err != nil { + return nil, err + } + contract, err := bindWorkflowRegistry(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &WorkflowRegistry{address: address, abi: abi, WorkflowRegistryCaller: WorkflowRegistryCaller{contract: contract}, WorkflowRegistryTransactor: WorkflowRegistryTransactor{contract: contract}, WorkflowRegistryFilterer: WorkflowRegistryFilterer{contract: contract}}, nil +} + +func NewWorkflowRegistryCaller(address common.Address, caller bind.ContractCaller) (*WorkflowRegistryCaller, error) { + contract, err := bindWorkflowRegistry(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &WorkflowRegistryCaller{contract: contract}, nil +} + +func NewWorkflowRegistryTransactor(address common.Address, transactor bind.ContractTransactor) (*WorkflowRegistryTransactor, error) { + contract, err := bindWorkflowRegistry(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &WorkflowRegistryTransactor{contract: contract}, nil +} + +func NewWorkflowRegistryFilterer(address common.Address, filterer bind.ContractFilterer) (*WorkflowRegistryFilterer, error) { + contract, err := bindWorkflowRegistry(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &WorkflowRegistryFilterer{contract: contract}, nil +} + +func bindWorkflowRegistry(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := WorkflowRegistryMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +func (_WorkflowRegistry *WorkflowRegistryRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _WorkflowRegistry.Contract.WorkflowRegistryCaller.contract.Call(opts, result, method, params...) +} + +func (_WorkflowRegistry *WorkflowRegistryRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _WorkflowRegistry.Contract.WorkflowRegistryTransactor.contract.Transfer(opts) +} + +func (_WorkflowRegistry *WorkflowRegistryRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _WorkflowRegistry.Contract.WorkflowRegistryTransactor.contract.Transact(opts, method, params...) +} + +func (_WorkflowRegistry *WorkflowRegistryCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _WorkflowRegistry.Contract.contract.Call(opts, result, method, params...) +} + +func (_WorkflowRegistry *WorkflowRegistryTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _WorkflowRegistry.Contract.contract.Transfer(opts) +} + +func (_WorkflowRegistry *WorkflowRegistryTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _WorkflowRegistry.Contract.contract.Transact(opts, method, params...) +} + +func (_WorkflowRegistry *WorkflowRegistryCaller) ComputeHashKey(opts *bind.CallOpts, owner common.Address, field string) ([32]byte, error) { + var out []interface{} + err := _WorkflowRegistry.contract.Call(opts, &out, "computeHashKey", owner, field) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +func (_WorkflowRegistry *WorkflowRegistrySession) ComputeHashKey(owner common.Address, field string) ([32]byte, error) { + return _WorkflowRegistry.Contract.ComputeHashKey(&_WorkflowRegistry.CallOpts, owner, field) +} + +func (_WorkflowRegistry *WorkflowRegistryCallerSession) ComputeHashKey(owner common.Address, field string) ([32]byte, error) { + return _WorkflowRegistry.Contract.ComputeHashKey(&_WorkflowRegistry.CallOpts, owner, field) +} + +func (_WorkflowRegistry *WorkflowRegistryCaller) GetAllAllowedDONs(opts *bind.CallOpts) ([]uint32, error) { + var out []interface{} + err := _WorkflowRegistry.contract.Call(opts, &out, "getAllAllowedDONs") + + if err != nil { + return *new([]uint32), err + } + + out0 := *abi.ConvertType(out[0], new([]uint32)).(*[]uint32) + + return out0, err + +} + +func (_WorkflowRegistry *WorkflowRegistrySession) GetAllAllowedDONs() ([]uint32, error) { + return _WorkflowRegistry.Contract.GetAllAllowedDONs(&_WorkflowRegistry.CallOpts) +} + +func (_WorkflowRegistry *WorkflowRegistryCallerSession) GetAllAllowedDONs() ([]uint32, error) { + return _WorkflowRegistry.Contract.GetAllAllowedDONs(&_WorkflowRegistry.CallOpts) +} + +func (_WorkflowRegistry *WorkflowRegistryCaller) GetAllAuthorizedAddresses(opts *bind.CallOpts) ([]common.Address, error) { + var out []interface{} + err := _WorkflowRegistry.contract.Call(opts, &out, "getAllAuthorizedAddresses") + + if err != nil { + return *new([]common.Address), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + + return out0, err + +} + +func (_WorkflowRegistry *WorkflowRegistrySession) GetAllAuthorizedAddresses() ([]common.Address, error) { + return _WorkflowRegistry.Contract.GetAllAuthorizedAddresses(&_WorkflowRegistry.CallOpts) +} + +func (_WorkflowRegistry *WorkflowRegistryCallerSession) GetAllAuthorizedAddresses() ([]common.Address, error) { + return _WorkflowRegistry.Contract.GetAllAuthorizedAddresses(&_WorkflowRegistry.CallOpts) +} + +func (_WorkflowRegistry *WorkflowRegistryCaller) GetWorkflowMetadata(opts *bind.CallOpts, workflowOwner common.Address, workflowName string) (WorkflowRegistryWorkflowMetadata, error) { + var out []interface{} + err := _WorkflowRegistry.contract.Call(opts, &out, "getWorkflowMetadata", workflowOwner, workflowName) + + if err != nil { + return *new(WorkflowRegistryWorkflowMetadata), err + } + + out0 := *abi.ConvertType(out[0], new(WorkflowRegistryWorkflowMetadata)).(*WorkflowRegistryWorkflowMetadata) + + return out0, err + +} + +func (_WorkflowRegistry *WorkflowRegistrySession) GetWorkflowMetadata(workflowOwner common.Address, workflowName string) (WorkflowRegistryWorkflowMetadata, error) { + return _WorkflowRegistry.Contract.GetWorkflowMetadata(&_WorkflowRegistry.CallOpts, workflowOwner, workflowName) +} + +func (_WorkflowRegistry *WorkflowRegistryCallerSession) GetWorkflowMetadata(workflowOwner common.Address, workflowName string) (WorkflowRegistryWorkflowMetadata, error) { + return _WorkflowRegistry.Contract.GetWorkflowMetadata(&_WorkflowRegistry.CallOpts, workflowOwner, workflowName) +} + +func (_WorkflowRegistry *WorkflowRegistryCaller) GetWorkflowMetadataListByDON(opts *bind.CallOpts, donID uint32, start *big.Int, limit *big.Int) ([]WorkflowRegistryWorkflowMetadata, error) { + var out []interface{} + err := _WorkflowRegistry.contract.Call(opts, &out, "getWorkflowMetadataListByDON", donID, start, limit) + + if err != nil { + return *new([]WorkflowRegistryWorkflowMetadata), err + } + + out0 := *abi.ConvertType(out[0], new([]WorkflowRegistryWorkflowMetadata)).(*[]WorkflowRegistryWorkflowMetadata) + + return out0, err + +} + +func (_WorkflowRegistry *WorkflowRegistrySession) GetWorkflowMetadataListByDON(donID uint32, start *big.Int, limit *big.Int) ([]WorkflowRegistryWorkflowMetadata, error) { + return _WorkflowRegistry.Contract.GetWorkflowMetadataListByDON(&_WorkflowRegistry.CallOpts, donID, start, limit) +} + +func (_WorkflowRegistry *WorkflowRegistryCallerSession) GetWorkflowMetadataListByDON(donID uint32, start *big.Int, limit *big.Int) ([]WorkflowRegistryWorkflowMetadata, error) { + return _WorkflowRegistry.Contract.GetWorkflowMetadataListByDON(&_WorkflowRegistry.CallOpts, donID, start, limit) +} + +func (_WorkflowRegistry *WorkflowRegistryCaller) GetWorkflowMetadataListByOwner(opts *bind.CallOpts, workflowOwner common.Address, start *big.Int, limit *big.Int) ([]WorkflowRegistryWorkflowMetadata, error) { + var out []interface{} + err := _WorkflowRegistry.contract.Call(opts, &out, "getWorkflowMetadataListByOwner", workflowOwner, start, limit) + + if err != nil { + return *new([]WorkflowRegistryWorkflowMetadata), err + } + + out0 := *abi.ConvertType(out[0], new([]WorkflowRegistryWorkflowMetadata)).(*[]WorkflowRegistryWorkflowMetadata) + + return out0, err + +} + +func (_WorkflowRegistry *WorkflowRegistrySession) GetWorkflowMetadataListByOwner(workflowOwner common.Address, start *big.Int, limit *big.Int) ([]WorkflowRegistryWorkflowMetadata, error) { + return _WorkflowRegistry.Contract.GetWorkflowMetadataListByOwner(&_WorkflowRegistry.CallOpts, workflowOwner, start, limit) +} + +func (_WorkflowRegistry *WorkflowRegistryCallerSession) GetWorkflowMetadataListByOwner(workflowOwner common.Address, start *big.Int, limit *big.Int) ([]WorkflowRegistryWorkflowMetadata, error) { + return _WorkflowRegistry.Contract.GetWorkflowMetadataListByOwner(&_WorkflowRegistry.CallOpts, workflowOwner, start, limit) +} + +func (_WorkflowRegistry *WorkflowRegistryCaller) IsRegistryLocked(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _WorkflowRegistry.contract.Call(opts, &out, "isRegistryLocked") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_WorkflowRegistry *WorkflowRegistrySession) IsRegistryLocked() (bool, error) { + return _WorkflowRegistry.Contract.IsRegistryLocked(&_WorkflowRegistry.CallOpts) +} + +func (_WorkflowRegistry *WorkflowRegistryCallerSession) IsRegistryLocked() (bool, error) { + return _WorkflowRegistry.Contract.IsRegistryLocked(&_WorkflowRegistry.CallOpts) +} + +func (_WorkflowRegistry *WorkflowRegistryCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _WorkflowRegistry.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_WorkflowRegistry *WorkflowRegistrySession) Owner() (common.Address, error) { + return _WorkflowRegistry.Contract.Owner(&_WorkflowRegistry.CallOpts) +} + +func (_WorkflowRegistry *WorkflowRegistryCallerSession) Owner() (common.Address, error) { + return _WorkflowRegistry.Contract.Owner(&_WorkflowRegistry.CallOpts) +} + +func (_WorkflowRegistry *WorkflowRegistryCaller) TypeAndVersion(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _WorkflowRegistry.contract.Call(opts, &out, "typeAndVersion") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +func (_WorkflowRegistry *WorkflowRegistrySession) TypeAndVersion() (string, error) { + return _WorkflowRegistry.Contract.TypeAndVersion(&_WorkflowRegistry.CallOpts) +} + +func (_WorkflowRegistry *WorkflowRegistryCallerSession) TypeAndVersion() (string, error) { + return _WorkflowRegistry.Contract.TypeAndVersion(&_WorkflowRegistry.CallOpts) +} + +func (_WorkflowRegistry *WorkflowRegistryTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _WorkflowRegistry.contract.Transact(opts, "acceptOwnership") +} + +func (_WorkflowRegistry *WorkflowRegistrySession) AcceptOwnership() (*types.Transaction, error) { + return _WorkflowRegistry.Contract.AcceptOwnership(&_WorkflowRegistry.TransactOpts) +} + +func (_WorkflowRegistry *WorkflowRegistryTransactorSession) AcceptOwnership() (*types.Transaction, error) { + return _WorkflowRegistry.Contract.AcceptOwnership(&_WorkflowRegistry.TransactOpts) +} + +func (_WorkflowRegistry *WorkflowRegistryTransactor) ActivateWorkflow(opts *bind.TransactOpts, workflowKey [32]byte) (*types.Transaction, error) { + return _WorkflowRegistry.contract.Transact(opts, "activateWorkflow", workflowKey) +} + +func (_WorkflowRegistry *WorkflowRegistrySession) ActivateWorkflow(workflowKey [32]byte) (*types.Transaction, error) { + return _WorkflowRegistry.Contract.ActivateWorkflow(&_WorkflowRegistry.TransactOpts, workflowKey) +} + +func (_WorkflowRegistry *WorkflowRegistryTransactorSession) ActivateWorkflow(workflowKey [32]byte) (*types.Transaction, error) { + return _WorkflowRegistry.Contract.ActivateWorkflow(&_WorkflowRegistry.TransactOpts, workflowKey) +} + +func (_WorkflowRegistry *WorkflowRegistryTransactor) DeleteWorkflow(opts *bind.TransactOpts, workflowKey [32]byte) (*types.Transaction, error) { + return _WorkflowRegistry.contract.Transact(opts, "deleteWorkflow", workflowKey) +} + +func (_WorkflowRegistry *WorkflowRegistrySession) DeleteWorkflow(workflowKey [32]byte) (*types.Transaction, error) { + return _WorkflowRegistry.Contract.DeleteWorkflow(&_WorkflowRegistry.TransactOpts, workflowKey) +} + +func (_WorkflowRegistry *WorkflowRegistryTransactorSession) DeleteWorkflow(workflowKey [32]byte) (*types.Transaction, error) { + return _WorkflowRegistry.Contract.DeleteWorkflow(&_WorkflowRegistry.TransactOpts, workflowKey) +} + +func (_WorkflowRegistry *WorkflowRegistryTransactor) LockRegistry(opts *bind.TransactOpts) (*types.Transaction, error) { + return _WorkflowRegistry.contract.Transact(opts, "lockRegistry") +} + +func (_WorkflowRegistry *WorkflowRegistrySession) LockRegistry() (*types.Transaction, error) { + return _WorkflowRegistry.Contract.LockRegistry(&_WorkflowRegistry.TransactOpts) +} + +func (_WorkflowRegistry *WorkflowRegistryTransactorSession) LockRegistry() (*types.Transaction, error) { + return _WorkflowRegistry.Contract.LockRegistry(&_WorkflowRegistry.TransactOpts) +} + +func (_WorkflowRegistry *WorkflowRegistryTransactor) PauseWorkflow(opts *bind.TransactOpts, workflowKey [32]byte) (*types.Transaction, error) { + return _WorkflowRegistry.contract.Transact(opts, "pauseWorkflow", workflowKey) +} + +func (_WorkflowRegistry *WorkflowRegistrySession) PauseWorkflow(workflowKey [32]byte) (*types.Transaction, error) { + return _WorkflowRegistry.Contract.PauseWorkflow(&_WorkflowRegistry.TransactOpts, workflowKey) +} + +func (_WorkflowRegistry *WorkflowRegistryTransactorSession) PauseWorkflow(workflowKey [32]byte) (*types.Transaction, error) { + return _WorkflowRegistry.Contract.PauseWorkflow(&_WorkflowRegistry.TransactOpts, workflowKey) +} + +func (_WorkflowRegistry *WorkflowRegistryTransactor) RegisterWorkflow(opts *bind.TransactOpts, workflowName string, workflowID [32]byte, donID uint32, status uint8, binaryURL string, configURL string, secretsURL string) (*types.Transaction, error) { + return _WorkflowRegistry.contract.Transact(opts, "registerWorkflow", workflowName, workflowID, donID, status, binaryURL, configURL, secretsURL) +} + +func (_WorkflowRegistry *WorkflowRegistrySession) RegisterWorkflow(workflowName string, workflowID [32]byte, donID uint32, status uint8, binaryURL string, configURL string, secretsURL string) (*types.Transaction, error) { + return _WorkflowRegistry.Contract.RegisterWorkflow(&_WorkflowRegistry.TransactOpts, workflowName, workflowID, donID, status, binaryURL, configURL, secretsURL) +} + +func (_WorkflowRegistry *WorkflowRegistryTransactorSession) RegisterWorkflow(workflowName string, workflowID [32]byte, donID uint32, status uint8, binaryURL string, configURL string, secretsURL string) (*types.Transaction, error) { + return _WorkflowRegistry.Contract.RegisterWorkflow(&_WorkflowRegistry.TransactOpts, workflowName, workflowID, donID, status, binaryURL, configURL, secretsURL) +} + +func (_WorkflowRegistry *WorkflowRegistryTransactor) RequestForceUpdateSecrets(opts *bind.TransactOpts, secretsURL string) (*types.Transaction, error) { + return _WorkflowRegistry.contract.Transact(opts, "requestForceUpdateSecrets", secretsURL) +} + +func (_WorkflowRegistry *WorkflowRegistrySession) RequestForceUpdateSecrets(secretsURL string) (*types.Transaction, error) { + return _WorkflowRegistry.Contract.RequestForceUpdateSecrets(&_WorkflowRegistry.TransactOpts, secretsURL) +} + +func (_WorkflowRegistry *WorkflowRegistryTransactorSession) RequestForceUpdateSecrets(secretsURL string) (*types.Transaction, error) { + return _WorkflowRegistry.Contract.RequestForceUpdateSecrets(&_WorkflowRegistry.TransactOpts, secretsURL) +} + +func (_WorkflowRegistry *WorkflowRegistryTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _WorkflowRegistry.contract.Transact(opts, "transferOwnership", to) +} + +func (_WorkflowRegistry *WorkflowRegistrySession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _WorkflowRegistry.Contract.TransferOwnership(&_WorkflowRegistry.TransactOpts, to) +} + +func (_WorkflowRegistry *WorkflowRegistryTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _WorkflowRegistry.Contract.TransferOwnership(&_WorkflowRegistry.TransactOpts, to) +} + +func (_WorkflowRegistry *WorkflowRegistryTransactor) UnlockRegistry(opts *bind.TransactOpts) (*types.Transaction, error) { + return _WorkflowRegistry.contract.Transact(opts, "unlockRegistry") +} + +func (_WorkflowRegistry *WorkflowRegistrySession) UnlockRegistry() (*types.Transaction, error) { + return _WorkflowRegistry.Contract.UnlockRegistry(&_WorkflowRegistry.TransactOpts) +} + +func (_WorkflowRegistry *WorkflowRegistryTransactorSession) UnlockRegistry() (*types.Transaction, error) { + return _WorkflowRegistry.Contract.UnlockRegistry(&_WorkflowRegistry.TransactOpts) +} + +func (_WorkflowRegistry *WorkflowRegistryTransactor) UpdateAllowedDONs(opts *bind.TransactOpts, donIDs []uint32, allowed bool) (*types.Transaction, error) { + return _WorkflowRegistry.contract.Transact(opts, "updateAllowedDONs", donIDs, allowed) +} + +func (_WorkflowRegistry *WorkflowRegistrySession) UpdateAllowedDONs(donIDs []uint32, allowed bool) (*types.Transaction, error) { + return _WorkflowRegistry.Contract.UpdateAllowedDONs(&_WorkflowRegistry.TransactOpts, donIDs, allowed) +} + +func (_WorkflowRegistry *WorkflowRegistryTransactorSession) UpdateAllowedDONs(donIDs []uint32, allowed bool) (*types.Transaction, error) { + return _WorkflowRegistry.Contract.UpdateAllowedDONs(&_WorkflowRegistry.TransactOpts, donIDs, allowed) +} + +func (_WorkflowRegistry *WorkflowRegistryTransactor) UpdateAuthorizedAddresses(opts *bind.TransactOpts, addresses []common.Address, allowed bool) (*types.Transaction, error) { + return _WorkflowRegistry.contract.Transact(opts, "updateAuthorizedAddresses", addresses, allowed) +} + +func (_WorkflowRegistry *WorkflowRegistrySession) UpdateAuthorizedAddresses(addresses []common.Address, allowed bool) (*types.Transaction, error) { + return _WorkflowRegistry.Contract.UpdateAuthorizedAddresses(&_WorkflowRegistry.TransactOpts, addresses, allowed) +} + +func (_WorkflowRegistry *WorkflowRegistryTransactorSession) UpdateAuthorizedAddresses(addresses []common.Address, allowed bool) (*types.Transaction, error) { + return _WorkflowRegistry.Contract.UpdateAuthorizedAddresses(&_WorkflowRegistry.TransactOpts, addresses, allowed) +} + +func (_WorkflowRegistry *WorkflowRegistryTransactor) UpdateWorkflow(opts *bind.TransactOpts, workflowKey [32]byte, newWorkflowID [32]byte, binaryURL string, configURL string, secretsURL string) (*types.Transaction, error) { + return _WorkflowRegistry.contract.Transact(opts, "updateWorkflow", workflowKey, newWorkflowID, binaryURL, configURL, secretsURL) +} + +func (_WorkflowRegistry *WorkflowRegistrySession) UpdateWorkflow(workflowKey [32]byte, newWorkflowID [32]byte, binaryURL string, configURL string, secretsURL string) (*types.Transaction, error) { + return _WorkflowRegistry.Contract.UpdateWorkflow(&_WorkflowRegistry.TransactOpts, workflowKey, newWorkflowID, binaryURL, configURL, secretsURL) +} + +func (_WorkflowRegistry *WorkflowRegistryTransactorSession) UpdateWorkflow(workflowKey [32]byte, newWorkflowID [32]byte, binaryURL string, configURL string, secretsURL string) (*types.Transaction, error) { + return _WorkflowRegistry.Contract.UpdateWorkflow(&_WorkflowRegistry.TransactOpts, workflowKey, newWorkflowID, binaryURL, configURL, secretsURL) +} + +type WorkflowRegistryAllowedDONsUpdatedV1Iterator struct { + Event *WorkflowRegistryAllowedDONsUpdatedV1 + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *WorkflowRegistryAllowedDONsUpdatedV1Iterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(WorkflowRegistryAllowedDONsUpdatedV1) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(WorkflowRegistryAllowedDONsUpdatedV1) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *WorkflowRegistryAllowedDONsUpdatedV1Iterator) Error() error { + return it.fail +} + +func (it *WorkflowRegistryAllowedDONsUpdatedV1Iterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type WorkflowRegistryAllowedDONsUpdatedV1 struct { + DonIDs []uint32 + Allowed bool + Raw types.Log +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) FilterAllowedDONsUpdatedV1(opts *bind.FilterOpts) (*WorkflowRegistryAllowedDONsUpdatedV1Iterator, error) { + + logs, sub, err := _WorkflowRegistry.contract.FilterLogs(opts, "AllowedDONsUpdatedV1") + if err != nil { + return nil, err + } + return &WorkflowRegistryAllowedDONsUpdatedV1Iterator{contract: _WorkflowRegistry.contract, event: "AllowedDONsUpdatedV1", logs: logs, sub: sub}, nil +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) WatchAllowedDONsUpdatedV1(opts *bind.WatchOpts, sink chan<- *WorkflowRegistryAllowedDONsUpdatedV1) (event.Subscription, error) { + + logs, sub, err := _WorkflowRegistry.contract.WatchLogs(opts, "AllowedDONsUpdatedV1") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(WorkflowRegistryAllowedDONsUpdatedV1) + if err := _WorkflowRegistry.contract.UnpackLog(event, "AllowedDONsUpdatedV1", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) ParseAllowedDONsUpdatedV1(log types.Log) (*WorkflowRegistryAllowedDONsUpdatedV1, error) { + event := new(WorkflowRegistryAllowedDONsUpdatedV1) + if err := _WorkflowRegistry.contract.UnpackLog(event, "AllowedDONsUpdatedV1", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type WorkflowRegistryAuthorizedAddressesUpdatedV1Iterator struct { + Event *WorkflowRegistryAuthorizedAddressesUpdatedV1 + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *WorkflowRegistryAuthorizedAddressesUpdatedV1Iterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(WorkflowRegistryAuthorizedAddressesUpdatedV1) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(WorkflowRegistryAuthorizedAddressesUpdatedV1) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *WorkflowRegistryAuthorizedAddressesUpdatedV1Iterator) Error() error { + return it.fail +} + +func (it *WorkflowRegistryAuthorizedAddressesUpdatedV1Iterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type WorkflowRegistryAuthorizedAddressesUpdatedV1 struct { + Addresses []common.Address + Allowed bool + Raw types.Log +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) FilterAuthorizedAddressesUpdatedV1(opts *bind.FilterOpts) (*WorkflowRegistryAuthorizedAddressesUpdatedV1Iterator, error) { + + logs, sub, err := _WorkflowRegistry.contract.FilterLogs(opts, "AuthorizedAddressesUpdatedV1") + if err != nil { + return nil, err + } + return &WorkflowRegistryAuthorizedAddressesUpdatedV1Iterator{contract: _WorkflowRegistry.contract, event: "AuthorizedAddressesUpdatedV1", logs: logs, sub: sub}, nil +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) WatchAuthorizedAddressesUpdatedV1(opts *bind.WatchOpts, sink chan<- *WorkflowRegistryAuthorizedAddressesUpdatedV1) (event.Subscription, error) { + + logs, sub, err := _WorkflowRegistry.contract.WatchLogs(opts, "AuthorizedAddressesUpdatedV1") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(WorkflowRegistryAuthorizedAddressesUpdatedV1) + if err := _WorkflowRegistry.contract.UnpackLog(event, "AuthorizedAddressesUpdatedV1", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) ParseAuthorizedAddressesUpdatedV1(log types.Log) (*WorkflowRegistryAuthorizedAddressesUpdatedV1, error) { + event := new(WorkflowRegistryAuthorizedAddressesUpdatedV1) + if err := _WorkflowRegistry.contract.UnpackLog(event, "AuthorizedAddressesUpdatedV1", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type WorkflowRegistryOwnershipTransferRequestedIterator struct { + Event *WorkflowRegistryOwnershipTransferRequested + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *WorkflowRegistryOwnershipTransferRequestedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(WorkflowRegistryOwnershipTransferRequested) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(WorkflowRegistryOwnershipTransferRequested) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *WorkflowRegistryOwnershipTransferRequestedIterator) Error() error { + return it.fail +} + +func (it *WorkflowRegistryOwnershipTransferRequestedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type WorkflowRegistryOwnershipTransferRequested struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*WorkflowRegistryOwnershipTransferRequestedIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _WorkflowRegistry.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + if err != nil { + return nil, err + } + return &WorkflowRegistryOwnershipTransferRequestedIterator{contract: _WorkflowRegistry.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *WorkflowRegistryOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _WorkflowRegistry.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(WorkflowRegistryOwnershipTransferRequested) + if err := _WorkflowRegistry.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) ParseOwnershipTransferRequested(log types.Log) (*WorkflowRegistryOwnershipTransferRequested, error) { + event := new(WorkflowRegistryOwnershipTransferRequested) + if err := _WorkflowRegistry.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type WorkflowRegistryOwnershipTransferredIterator struct { + Event *WorkflowRegistryOwnershipTransferred + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *WorkflowRegistryOwnershipTransferredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(WorkflowRegistryOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(WorkflowRegistryOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *WorkflowRegistryOwnershipTransferredIterator) Error() error { + return it.fail +} + +func (it *WorkflowRegistryOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type WorkflowRegistryOwnershipTransferred struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*WorkflowRegistryOwnershipTransferredIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _WorkflowRegistry.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) + if err != nil { + return nil, err + } + return &WorkflowRegistryOwnershipTransferredIterator{contract: _WorkflowRegistry.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *WorkflowRegistryOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _WorkflowRegistry.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(WorkflowRegistryOwnershipTransferred) + if err := _WorkflowRegistry.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) ParseOwnershipTransferred(log types.Log) (*WorkflowRegistryOwnershipTransferred, error) { + event := new(WorkflowRegistryOwnershipTransferred) + if err := _WorkflowRegistry.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type WorkflowRegistryRegistryLockedV1Iterator struct { + Event *WorkflowRegistryRegistryLockedV1 + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *WorkflowRegistryRegistryLockedV1Iterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(WorkflowRegistryRegistryLockedV1) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(WorkflowRegistryRegistryLockedV1) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *WorkflowRegistryRegistryLockedV1Iterator) Error() error { + return it.fail +} + +func (it *WorkflowRegistryRegistryLockedV1Iterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type WorkflowRegistryRegistryLockedV1 struct { + LockedBy common.Address + Raw types.Log +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) FilterRegistryLockedV1(opts *bind.FilterOpts, lockedBy []common.Address) (*WorkflowRegistryRegistryLockedV1Iterator, error) { + + var lockedByRule []interface{} + for _, lockedByItem := range lockedBy { + lockedByRule = append(lockedByRule, lockedByItem) + } + + logs, sub, err := _WorkflowRegistry.contract.FilterLogs(opts, "RegistryLockedV1", lockedByRule) + if err != nil { + return nil, err + } + return &WorkflowRegistryRegistryLockedV1Iterator{contract: _WorkflowRegistry.contract, event: "RegistryLockedV1", logs: logs, sub: sub}, nil +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) WatchRegistryLockedV1(opts *bind.WatchOpts, sink chan<- *WorkflowRegistryRegistryLockedV1, lockedBy []common.Address) (event.Subscription, error) { + + var lockedByRule []interface{} + for _, lockedByItem := range lockedBy { + lockedByRule = append(lockedByRule, lockedByItem) + } + + logs, sub, err := _WorkflowRegistry.contract.WatchLogs(opts, "RegistryLockedV1", lockedByRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(WorkflowRegistryRegistryLockedV1) + if err := _WorkflowRegistry.contract.UnpackLog(event, "RegistryLockedV1", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) ParseRegistryLockedV1(log types.Log) (*WorkflowRegistryRegistryLockedV1, error) { + event := new(WorkflowRegistryRegistryLockedV1) + if err := _WorkflowRegistry.contract.UnpackLog(event, "RegistryLockedV1", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type WorkflowRegistryRegistryUnlockedV1Iterator struct { + Event *WorkflowRegistryRegistryUnlockedV1 + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *WorkflowRegistryRegistryUnlockedV1Iterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(WorkflowRegistryRegistryUnlockedV1) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(WorkflowRegistryRegistryUnlockedV1) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *WorkflowRegistryRegistryUnlockedV1Iterator) Error() error { + return it.fail +} + +func (it *WorkflowRegistryRegistryUnlockedV1Iterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type WorkflowRegistryRegistryUnlockedV1 struct { + UnlockedBy common.Address + Raw types.Log +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) FilterRegistryUnlockedV1(opts *bind.FilterOpts, unlockedBy []common.Address) (*WorkflowRegistryRegistryUnlockedV1Iterator, error) { + + var unlockedByRule []interface{} + for _, unlockedByItem := range unlockedBy { + unlockedByRule = append(unlockedByRule, unlockedByItem) + } + + logs, sub, err := _WorkflowRegistry.contract.FilterLogs(opts, "RegistryUnlockedV1", unlockedByRule) + if err != nil { + return nil, err + } + return &WorkflowRegistryRegistryUnlockedV1Iterator{contract: _WorkflowRegistry.contract, event: "RegistryUnlockedV1", logs: logs, sub: sub}, nil +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) WatchRegistryUnlockedV1(opts *bind.WatchOpts, sink chan<- *WorkflowRegistryRegistryUnlockedV1, unlockedBy []common.Address) (event.Subscription, error) { + + var unlockedByRule []interface{} + for _, unlockedByItem := range unlockedBy { + unlockedByRule = append(unlockedByRule, unlockedByItem) + } + + logs, sub, err := _WorkflowRegistry.contract.WatchLogs(opts, "RegistryUnlockedV1", unlockedByRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(WorkflowRegistryRegistryUnlockedV1) + if err := _WorkflowRegistry.contract.UnpackLog(event, "RegistryUnlockedV1", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) ParseRegistryUnlockedV1(log types.Log) (*WorkflowRegistryRegistryUnlockedV1, error) { + event := new(WorkflowRegistryRegistryUnlockedV1) + if err := _WorkflowRegistry.contract.UnpackLog(event, "RegistryUnlockedV1", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type WorkflowRegistryWorkflowActivatedV1Iterator struct { + Event *WorkflowRegistryWorkflowActivatedV1 + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *WorkflowRegistryWorkflowActivatedV1Iterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(WorkflowRegistryWorkflowActivatedV1) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(WorkflowRegistryWorkflowActivatedV1) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *WorkflowRegistryWorkflowActivatedV1Iterator) Error() error { + return it.fail +} + +func (it *WorkflowRegistryWorkflowActivatedV1Iterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type WorkflowRegistryWorkflowActivatedV1 struct { + WorkflowID [32]byte + WorkflowOwner common.Address + DonID uint32 + WorkflowName string + Raw types.Log +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) FilterWorkflowActivatedV1(opts *bind.FilterOpts, workflowID [][32]byte, workflowOwner []common.Address, donID []uint32) (*WorkflowRegistryWorkflowActivatedV1Iterator, error) { + + var workflowIDRule []interface{} + for _, workflowIDItem := range workflowID { + workflowIDRule = append(workflowIDRule, workflowIDItem) + } + var workflowOwnerRule []interface{} + for _, workflowOwnerItem := range workflowOwner { + workflowOwnerRule = append(workflowOwnerRule, workflowOwnerItem) + } + var donIDRule []interface{} + for _, donIDItem := range donID { + donIDRule = append(donIDRule, donIDItem) + } + + logs, sub, err := _WorkflowRegistry.contract.FilterLogs(opts, "WorkflowActivatedV1", workflowIDRule, workflowOwnerRule, donIDRule) + if err != nil { + return nil, err + } + return &WorkflowRegistryWorkflowActivatedV1Iterator{contract: _WorkflowRegistry.contract, event: "WorkflowActivatedV1", logs: logs, sub: sub}, nil +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) WatchWorkflowActivatedV1(opts *bind.WatchOpts, sink chan<- *WorkflowRegistryWorkflowActivatedV1, workflowID [][32]byte, workflowOwner []common.Address, donID []uint32) (event.Subscription, error) { + + var workflowIDRule []interface{} + for _, workflowIDItem := range workflowID { + workflowIDRule = append(workflowIDRule, workflowIDItem) + } + var workflowOwnerRule []interface{} + for _, workflowOwnerItem := range workflowOwner { + workflowOwnerRule = append(workflowOwnerRule, workflowOwnerItem) + } + var donIDRule []interface{} + for _, donIDItem := range donID { + donIDRule = append(donIDRule, donIDItem) + } + + logs, sub, err := _WorkflowRegistry.contract.WatchLogs(opts, "WorkflowActivatedV1", workflowIDRule, workflowOwnerRule, donIDRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(WorkflowRegistryWorkflowActivatedV1) + if err := _WorkflowRegistry.contract.UnpackLog(event, "WorkflowActivatedV1", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) ParseWorkflowActivatedV1(log types.Log) (*WorkflowRegistryWorkflowActivatedV1, error) { + event := new(WorkflowRegistryWorkflowActivatedV1) + if err := _WorkflowRegistry.contract.UnpackLog(event, "WorkflowActivatedV1", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type WorkflowRegistryWorkflowDeletedV1Iterator struct { + Event *WorkflowRegistryWorkflowDeletedV1 + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *WorkflowRegistryWorkflowDeletedV1Iterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(WorkflowRegistryWorkflowDeletedV1) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(WorkflowRegistryWorkflowDeletedV1) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *WorkflowRegistryWorkflowDeletedV1Iterator) Error() error { + return it.fail +} + +func (it *WorkflowRegistryWorkflowDeletedV1Iterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type WorkflowRegistryWorkflowDeletedV1 struct { + WorkflowID [32]byte + WorkflowOwner common.Address + DonID uint32 + WorkflowName string + Raw types.Log +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) FilterWorkflowDeletedV1(opts *bind.FilterOpts, workflowID [][32]byte, workflowOwner []common.Address, donID []uint32) (*WorkflowRegistryWorkflowDeletedV1Iterator, error) { + + var workflowIDRule []interface{} + for _, workflowIDItem := range workflowID { + workflowIDRule = append(workflowIDRule, workflowIDItem) + } + var workflowOwnerRule []interface{} + for _, workflowOwnerItem := range workflowOwner { + workflowOwnerRule = append(workflowOwnerRule, workflowOwnerItem) + } + var donIDRule []interface{} + for _, donIDItem := range donID { + donIDRule = append(donIDRule, donIDItem) + } + + logs, sub, err := _WorkflowRegistry.contract.FilterLogs(opts, "WorkflowDeletedV1", workflowIDRule, workflowOwnerRule, donIDRule) + if err != nil { + return nil, err + } + return &WorkflowRegistryWorkflowDeletedV1Iterator{contract: _WorkflowRegistry.contract, event: "WorkflowDeletedV1", logs: logs, sub: sub}, nil +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) WatchWorkflowDeletedV1(opts *bind.WatchOpts, sink chan<- *WorkflowRegistryWorkflowDeletedV1, workflowID [][32]byte, workflowOwner []common.Address, donID []uint32) (event.Subscription, error) { + + var workflowIDRule []interface{} + for _, workflowIDItem := range workflowID { + workflowIDRule = append(workflowIDRule, workflowIDItem) + } + var workflowOwnerRule []interface{} + for _, workflowOwnerItem := range workflowOwner { + workflowOwnerRule = append(workflowOwnerRule, workflowOwnerItem) + } + var donIDRule []interface{} + for _, donIDItem := range donID { + donIDRule = append(donIDRule, donIDItem) + } + + logs, sub, err := _WorkflowRegistry.contract.WatchLogs(opts, "WorkflowDeletedV1", workflowIDRule, workflowOwnerRule, donIDRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(WorkflowRegistryWorkflowDeletedV1) + if err := _WorkflowRegistry.contract.UnpackLog(event, "WorkflowDeletedV1", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) ParseWorkflowDeletedV1(log types.Log) (*WorkflowRegistryWorkflowDeletedV1, error) { + event := new(WorkflowRegistryWorkflowDeletedV1) + if err := _WorkflowRegistry.contract.UnpackLog(event, "WorkflowDeletedV1", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type WorkflowRegistryWorkflowForceUpdateSecretsRequestedV1Iterator struct { + Event *WorkflowRegistryWorkflowForceUpdateSecretsRequestedV1 + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *WorkflowRegistryWorkflowForceUpdateSecretsRequestedV1Iterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(WorkflowRegistryWorkflowForceUpdateSecretsRequestedV1) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(WorkflowRegistryWorkflowForceUpdateSecretsRequestedV1) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *WorkflowRegistryWorkflowForceUpdateSecretsRequestedV1Iterator) Error() error { + return it.fail +} + +func (it *WorkflowRegistryWorkflowForceUpdateSecretsRequestedV1Iterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type WorkflowRegistryWorkflowForceUpdateSecretsRequestedV1 struct { + Owner common.Address + SecretsURLHash [32]byte + WorkflowName string + Raw types.Log +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) FilterWorkflowForceUpdateSecretsRequestedV1(opts *bind.FilterOpts, owner []common.Address) (*WorkflowRegistryWorkflowForceUpdateSecretsRequestedV1Iterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + + logs, sub, err := _WorkflowRegistry.contract.FilterLogs(opts, "WorkflowForceUpdateSecretsRequestedV1", ownerRule) + if err != nil { + return nil, err + } + return &WorkflowRegistryWorkflowForceUpdateSecretsRequestedV1Iterator{contract: _WorkflowRegistry.contract, event: "WorkflowForceUpdateSecretsRequestedV1", logs: logs, sub: sub}, nil +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) WatchWorkflowForceUpdateSecretsRequestedV1(opts *bind.WatchOpts, sink chan<- *WorkflowRegistryWorkflowForceUpdateSecretsRequestedV1, owner []common.Address) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + + logs, sub, err := _WorkflowRegistry.contract.WatchLogs(opts, "WorkflowForceUpdateSecretsRequestedV1", ownerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(WorkflowRegistryWorkflowForceUpdateSecretsRequestedV1) + if err := _WorkflowRegistry.contract.UnpackLog(event, "WorkflowForceUpdateSecretsRequestedV1", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) ParseWorkflowForceUpdateSecretsRequestedV1(log types.Log) (*WorkflowRegistryWorkflowForceUpdateSecretsRequestedV1, error) { + event := new(WorkflowRegistryWorkflowForceUpdateSecretsRequestedV1) + if err := _WorkflowRegistry.contract.UnpackLog(event, "WorkflowForceUpdateSecretsRequestedV1", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type WorkflowRegistryWorkflowPausedV1Iterator struct { + Event *WorkflowRegistryWorkflowPausedV1 + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *WorkflowRegistryWorkflowPausedV1Iterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(WorkflowRegistryWorkflowPausedV1) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(WorkflowRegistryWorkflowPausedV1) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *WorkflowRegistryWorkflowPausedV1Iterator) Error() error { + return it.fail +} + +func (it *WorkflowRegistryWorkflowPausedV1Iterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type WorkflowRegistryWorkflowPausedV1 struct { + WorkflowID [32]byte + WorkflowOwner common.Address + DonID uint32 + WorkflowName string + Raw types.Log +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) FilterWorkflowPausedV1(opts *bind.FilterOpts, workflowID [][32]byte, workflowOwner []common.Address, donID []uint32) (*WorkflowRegistryWorkflowPausedV1Iterator, error) { + + var workflowIDRule []interface{} + for _, workflowIDItem := range workflowID { + workflowIDRule = append(workflowIDRule, workflowIDItem) + } + var workflowOwnerRule []interface{} + for _, workflowOwnerItem := range workflowOwner { + workflowOwnerRule = append(workflowOwnerRule, workflowOwnerItem) + } + var donIDRule []interface{} + for _, donIDItem := range donID { + donIDRule = append(donIDRule, donIDItem) + } + + logs, sub, err := _WorkflowRegistry.contract.FilterLogs(opts, "WorkflowPausedV1", workflowIDRule, workflowOwnerRule, donIDRule) + if err != nil { + return nil, err + } + return &WorkflowRegistryWorkflowPausedV1Iterator{contract: _WorkflowRegistry.contract, event: "WorkflowPausedV1", logs: logs, sub: sub}, nil +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) WatchWorkflowPausedV1(opts *bind.WatchOpts, sink chan<- *WorkflowRegistryWorkflowPausedV1, workflowID [][32]byte, workflowOwner []common.Address, donID []uint32) (event.Subscription, error) { + + var workflowIDRule []interface{} + for _, workflowIDItem := range workflowID { + workflowIDRule = append(workflowIDRule, workflowIDItem) + } + var workflowOwnerRule []interface{} + for _, workflowOwnerItem := range workflowOwner { + workflowOwnerRule = append(workflowOwnerRule, workflowOwnerItem) + } + var donIDRule []interface{} + for _, donIDItem := range donID { + donIDRule = append(donIDRule, donIDItem) + } + + logs, sub, err := _WorkflowRegistry.contract.WatchLogs(opts, "WorkflowPausedV1", workflowIDRule, workflowOwnerRule, donIDRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(WorkflowRegistryWorkflowPausedV1) + if err := _WorkflowRegistry.contract.UnpackLog(event, "WorkflowPausedV1", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) ParseWorkflowPausedV1(log types.Log) (*WorkflowRegistryWorkflowPausedV1, error) { + event := new(WorkflowRegistryWorkflowPausedV1) + if err := _WorkflowRegistry.contract.UnpackLog(event, "WorkflowPausedV1", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type WorkflowRegistryWorkflowRegisteredV1Iterator struct { + Event *WorkflowRegistryWorkflowRegisteredV1 + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *WorkflowRegistryWorkflowRegisteredV1Iterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(WorkflowRegistryWorkflowRegisteredV1) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(WorkflowRegistryWorkflowRegisteredV1) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *WorkflowRegistryWorkflowRegisteredV1Iterator) Error() error { + return it.fail +} + +func (it *WorkflowRegistryWorkflowRegisteredV1Iterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type WorkflowRegistryWorkflowRegisteredV1 struct { + WorkflowID [32]byte + WorkflowOwner common.Address + DonID uint32 + Status uint8 + WorkflowName string + BinaryURL string + ConfigURL string + SecretsURL string + Raw types.Log +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) FilterWorkflowRegisteredV1(opts *bind.FilterOpts, workflowID [][32]byte, workflowOwner []common.Address, donID []uint32) (*WorkflowRegistryWorkflowRegisteredV1Iterator, error) { + + var workflowIDRule []interface{} + for _, workflowIDItem := range workflowID { + workflowIDRule = append(workflowIDRule, workflowIDItem) + } + var workflowOwnerRule []interface{} + for _, workflowOwnerItem := range workflowOwner { + workflowOwnerRule = append(workflowOwnerRule, workflowOwnerItem) + } + var donIDRule []interface{} + for _, donIDItem := range donID { + donIDRule = append(donIDRule, donIDItem) + } + + logs, sub, err := _WorkflowRegistry.contract.FilterLogs(opts, "WorkflowRegisteredV1", workflowIDRule, workflowOwnerRule, donIDRule) + if err != nil { + return nil, err + } + return &WorkflowRegistryWorkflowRegisteredV1Iterator{contract: _WorkflowRegistry.contract, event: "WorkflowRegisteredV1", logs: logs, sub: sub}, nil +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) WatchWorkflowRegisteredV1(opts *bind.WatchOpts, sink chan<- *WorkflowRegistryWorkflowRegisteredV1, workflowID [][32]byte, workflowOwner []common.Address, donID []uint32) (event.Subscription, error) { + + var workflowIDRule []interface{} + for _, workflowIDItem := range workflowID { + workflowIDRule = append(workflowIDRule, workflowIDItem) + } + var workflowOwnerRule []interface{} + for _, workflowOwnerItem := range workflowOwner { + workflowOwnerRule = append(workflowOwnerRule, workflowOwnerItem) + } + var donIDRule []interface{} + for _, donIDItem := range donID { + donIDRule = append(donIDRule, donIDItem) + } + + logs, sub, err := _WorkflowRegistry.contract.WatchLogs(opts, "WorkflowRegisteredV1", workflowIDRule, workflowOwnerRule, donIDRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(WorkflowRegistryWorkflowRegisteredV1) + if err := _WorkflowRegistry.contract.UnpackLog(event, "WorkflowRegisteredV1", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) ParseWorkflowRegisteredV1(log types.Log) (*WorkflowRegistryWorkflowRegisteredV1, error) { + event := new(WorkflowRegistryWorkflowRegisteredV1) + if err := _WorkflowRegistry.contract.UnpackLog(event, "WorkflowRegisteredV1", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type WorkflowRegistryWorkflowUpdatedV1Iterator struct { + Event *WorkflowRegistryWorkflowUpdatedV1 + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *WorkflowRegistryWorkflowUpdatedV1Iterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(WorkflowRegistryWorkflowUpdatedV1) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(WorkflowRegistryWorkflowUpdatedV1) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *WorkflowRegistryWorkflowUpdatedV1Iterator) Error() error { + return it.fail +} + +func (it *WorkflowRegistryWorkflowUpdatedV1Iterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type WorkflowRegistryWorkflowUpdatedV1 struct { + OldWorkflowID [32]byte + WorkflowOwner common.Address + DonID uint32 + NewWorkflowID [32]byte + WorkflowName string + BinaryURL string + ConfigURL string + SecretsURL string + Raw types.Log +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) FilterWorkflowUpdatedV1(opts *bind.FilterOpts, oldWorkflowID [][32]byte, workflowOwner []common.Address, donID []uint32) (*WorkflowRegistryWorkflowUpdatedV1Iterator, error) { + + var oldWorkflowIDRule []interface{} + for _, oldWorkflowIDItem := range oldWorkflowID { + oldWorkflowIDRule = append(oldWorkflowIDRule, oldWorkflowIDItem) + } + var workflowOwnerRule []interface{} + for _, workflowOwnerItem := range workflowOwner { + workflowOwnerRule = append(workflowOwnerRule, workflowOwnerItem) + } + var donIDRule []interface{} + for _, donIDItem := range donID { + donIDRule = append(donIDRule, donIDItem) + } + + logs, sub, err := _WorkflowRegistry.contract.FilterLogs(opts, "WorkflowUpdatedV1", oldWorkflowIDRule, workflowOwnerRule, donIDRule) + if err != nil { + return nil, err + } + return &WorkflowRegistryWorkflowUpdatedV1Iterator{contract: _WorkflowRegistry.contract, event: "WorkflowUpdatedV1", logs: logs, sub: sub}, nil +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) WatchWorkflowUpdatedV1(opts *bind.WatchOpts, sink chan<- *WorkflowRegistryWorkflowUpdatedV1, oldWorkflowID [][32]byte, workflowOwner []common.Address, donID []uint32) (event.Subscription, error) { + + var oldWorkflowIDRule []interface{} + for _, oldWorkflowIDItem := range oldWorkflowID { + oldWorkflowIDRule = append(oldWorkflowIDRule, oldWorkflowIDItem) + } + var workflowOwnerRule []interface{} + for _, workflowOwnerItem := range workflowOwner { + workflowOwnerRule = append(workflowOwnerRule, workflowOwnerItem) + } + var donIDRule []interface{} + for _, donIDItem := range donID { + donIDRule = append(donIDRule, donIDItem) + } + + logs, sub, err := _WorkflowRegistry.contract.WatchLogs(opts, "WorkflowUpdatedV1", oldWorkflowIDRule, workflowOwnerRule, donIDRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(WorkflowRegistryWorkflowUpdatedV1) + if err := _WorkflowRegistry.contract.UnpackLog(event, "WorkflowUpdatedV1", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_WorkflowRegistry *WorkflowRegistryFilterer) ParseWorkflowUpdatedV1(log types.Log) (*WorkflowRegistryWorkflowUpdatedV1, error) { + event := new(WorkflowRegistryWorkflowUpdatedV1) + if err := _WorkflowRegistry.contract.UnpackLog(event, "WorkflowUpdatedV1", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +func (_WorkflowRegistry *WorkflowRegistry) ParseLog(log types.Log) (generated.AbigenLog, error) { + switch log.Topics[0] { + case _WorkflowRegistry.abi.Events["AllowedDONsUpdatedV1"].ID: + return _WorkflowRegistry.ParseAllowedDONsUpdatedV1(log) + case _WorkflowRegistry.abi.Events["AuthorizedAddressesUpdatedV1"].ID: + return _WorkflowRegistry.ParseAuthorizedAddressesUpdatedV1(log) + case _WorkflowRegistry.abi.Events["OwnershipTransferRequested"].ID: + return _WorkflowRegistry.ParseOwnershipTransferRequested(log) + case _WorkflowRegistry.abi.Events["OwnershipTransferred"].ID: + return _WorkflowRegistry.ParseOwnershipTransferred(log) + case _WorkflowRegistry.abi.Events["RegistryLockedV1"].ID: + return _WorkflowRegistry.ParseRegistryLockedV1(log) + case _WorkflowRegistry.abi.Events["RegistryUnlockedV1"].ID: + return _WorkflowRegistry.ParseRegistryUnlockedV1(log) + case _WorkflowRegistry.abi.Events["WorkflowActivatedV1"].ID: + return _WorkflowRegistry.ParseWorkflowActivatedV1(log) + case _WorkflowRegistry.abi.Events["WorkflowDeletedV1"].ID: + return _WorkflowRegistry.ParseWorkflowDeletedV1(log) + case _WorkflowRegistry.abi.Events["WorkflowForceUpdateSecretsRequestedV1"].ID: + return _WorkflowRegistry.ParseWorkflowForceUpdateSecretsRequestedV1(log) + case _WorkflowRegistry.abi.Events["WorkflowPausedV1"].ID: + return _WorkflowRegistry.ParseWorkflowPausedV1(log) + case _WorkflowRegistry.abi.Events["WorkflowRegisteredV1"].ID: + return _WorkflowRegistry.ParseWorkflowRegisteredV1(log) + case _WorkflowRegistry.abi.Events["WorkflowUpdatedV1"].ID: + return _WorkflowRegistry.ParseWorkflowUpdatedV1(log) + + default: + return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) + } +} + +func (WorkflowRegistryAllowedDONsUpdatedV1) Topic() common.Hash { + return common.HexToHash("0xcab63bf31d1e656baa23cebef64e12033ea0ffbd44b1278c3747beec2d2f618c") +} + +func (WorkflowRegistryAuthorizedAddressesUpdatedV1) Topic() common.Hash { + return common.HexToHash("0x509460cccbb176edde6cac28895a4415a24961b8f3a0bd2617b9bb7b4e166c9b") +} + +func (WorkflowRegistryOwnershipTransferRequested) Topic() common.Hash { + return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") +} + +func (WorkflowRegistryOwnershipTransferred) Topic() common.Hash { + return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") +} + +func (WorkflowRegistryRegistryLockedV1) Topic() common.Hash { + return common.HexToHash("0x2789711f6fd67d131ad68378617b5d1d21a2c92b34d7c3745d70b3957c08096c") +} + +func (WorkflowRegistryRegistryUnlockedV1) Topic() common.Hash { + return common.HexToHash("0x11a03e25ee25bf1459f9e1cb293ea03707d84917f54a65e32c9a7be2f2edd68a") +} + +func (WorkflowRegistryWorkflowActivatedV1) Topic() common.Hash { + return common.HexToHash("0x17b2d730bb5e064df3fbc6165c8aceb3b0d62c524c196c0bc1012209280bc9a6") +} + +func (WorkflowRegistryWorkflowDeletedV1) Topic() common.Hash { + return common.HexToHash("0x76ee2dfcae10cb8522e62e713e62660e09ecfaab08db15d9404de19141322571") +} + +func (WorkflowRegistryWorkflowForceUpdateSecretsRequestedV1) Topic() common.Hash { + return common.HexToHash("0x95d94f817db4971aa99ba35d0fe019bd8cc39866fbe02b6d47b5f0f3727fb673") +} + +func (WorkflowRegistryWorkflowPausedV1) Topic() common.Hash { + return common.HexToHash("0x6a0ed88e9cf3cb493ab4028fcb1dc7d18f0130fcdfba096edde0aadbfbf5e99f") +} + +func (WorkflowRegistryWorkflowRegisteredV1) Topic() common.Hash { + return common.HexToHash("0xc4399022965bad9b2b468bbd8c758a7e80cdde36ff3088ddbb7f93bdfb5623cb") +} + +func (WorkflowRegistryWorkflowUpdatedV1) Topic() common.Hash { + return common.HexToHash("0x41161473ce2ed633d9f902aab9702d16a5531da27ec84e1939abeffe54ad7353") +} + +func (_WorkflowRegistry *WorkflowRegistry) Address() common.Address { + return _WorkflowRegistry.address +} + +type WorkflowRegistryInterface interface { + ComputeHashKey(opts *bind.CallOpts, owner common.Address, field string) ([32]byte, error) + + GetAllAllowedDONs(opts *bind.CallOpts) ([]uint32, error) + + GetAllAuthorizedAddresses(opts *bind.CallOpts) ([]common.Address, error) + + GetWorkflowMetadata(opts *bind.CallOpts, workflowOwner common.Address, workflowName string) (WorkflowRegistryWorkflowMetadata, error) + + GetWorkflowMetadataListByDON(opts *bind.CallOpts, donID uint32, start *big.Int, limit *big.Int) ([]WorkflowRegistryWorkflowMetadata, error) + + GetWorkflowMetadataListByOwner(opts *bind.CallOpts, workflowOwner common.Address, start *big.Int, limit *big.Int) ([]WorkflowRegistryWorkflowMetadata, error) + + IsRegistryLocked(opts *bind.CallOpts) (bool, error) + + Owner(opts *bind.CallOpts) (common.Address, error) + + TypeAndVersion(opts *bind.CallOpts) (string, error) + + AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) + + ActivateWorkflow(opts *bind.TransactOpts, workflowKey [32]byte) (*types.Transaction, error) + + DeleteWorkflow(opts *bind.TransactOpts, workflowKey [32]byte) (*types.Transaction, error) + + LockRegistry(opts *bind.TransactOpts) (*types.Transaction, error) + + PauseWorkflow(opts *bind.TransactOpts, workflowKey [32]byte) (*types.Transaction, error) + + RegisterWorkflow(opts *bind.TransactOpts, workflowName string, workflowID [32]byte, donID uint32, status uint8, binaryURL string, configURL string, secretsURL string) (*types.Transaction, error) + + RequestForceUpdateSecrets(opts *bind.TransactOpts, secretsURL string) (*types.Transaction, error) + + TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) + + UnlockRegistry(opts *bind.TransactOpts) (*types.Transaction, error) + + UpdateAllowedDONs(opts *bind.TransactOpts, donIDs []uint32, allowed bool) (*types.Transaction, error) + + UpdateAuthorizedAddresses(opts *bind.TransactOpts, addresses []common.Address, allowed bool) (*types.Transaction, error) + + UpdateWorkflow(opts *bind.TransactOpts, workflowKey [32]byte, newWorkflowID [32]byte, binaryURL string, configURL string, secretsURL string) (*types.Transaction, error) + + FilterAllowedDONsUpdatedV1(opts *bind.FilterOpts) (*WorkflowRegistryAllowedDONsUpdatedV1Iterator, error) + + WatchAllowedDONsUpdatedV1(opts *bind.WatchOpts, sink chan<- *WorkflowRegistryAllowedDONsUpdatedV1) (event.Subscription, error) + + ParseAllowedDONsUpdatedV1(log types.Log) (*WorkflowRegistryAllowedDONsUpdatedV1, error) + + FilterAuthorizedAddressesUpdatedV1(opts *bind.FilterOpts) (*WorkflowRegistryAuthorizedAddressesUpdatedV1Iterator, error) + + WatchAuthorizedAddressesUpdatedV1(opts *bind.WatchOpts, sink chan<- *WorkflowRegistryAuthorizedAddressesUpdatedV1) (event.Subscription, error) + + ParseAuthorizedAddressesUpdatedV1(log types.Log) (*WorkflowRegistryAuthorizedAddressesUpdatedV1, error) + + FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*WorkflowRegistryOwnershipTransferRequestedIterator, error) + + WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *WorkflowRegistryOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseOwnershipTransferRequested(log types.Log) (*WorkflowRegistryOwnershipTransferRequested, error) + + FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*WorkflowRegistryOwnershipTransferredIterator, error) + + WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *WorkflowRegistryOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseOwnershipTransferred(log types.Log) (*WorkflowRegistryOwnershipTransferred, error) + + FilterRegistryLockedV1(opts *bind.FilterOpts, lockedBy []common.Address) (*WorkflowRegistryRegistryLockedV1Iterator, error) + + WatchRegistryLockedV1(opts *bind.WatchOpts, sink chan<- *WorkflowRegistryRegistryLockedV1, lockedBy []common.Address) (event.Subscription, error) + + ParseRegistryLockedV1(log types.Log) (*WorkflowRegistryRegistryLockedV1, error) + + FilterRegistryUnlockedV1(opts *bind.FilterOpts, unlockedBy []common.Address) (*WorkflowRegistryRegistryUnlockedV1Iterator, error) + + WatchRegistryUnlockedV1(opts *bind.WatchOpts, sink chan<- *WorkflowRegistryRegistryUnlockedV1, unlockedBy []common.Address) (event.Subscription, error) + + ParseRegistryUnlockedV1(log types.Log) (*WorkflowRegistryRegistryUnlockedV1, error) + + FilterWorkflowActivatedV1(opts *bind.FilterOpts, workflowID [][32]byte, workflowOwner []common.Address, donID []uint32) (*WorkflowRegistryWorkflowActivatedV1Iterator, error) + + WatchWorkflowActivatedV1(opts *bind.WatchOpts, sink chan<- *WorkflowRegistryWorkflowActivatedV1, workflowID [][32]byte, workflowOwner []common.Address, donID []uint32) (event.Subscription, error) + + ParseWorkflowActivatedV1(log types.Log) (*WorkflowRegistryWorkflowActivatedV1, error) + + FilterWorkflowDeletedV1(opts *bind.FilterOpts, workflowID [][32]byte, workflowOwner []common.Address, donID []uint32) (*WorkflowRegistryWorkflowDeletedV1Iterator, error) + + WatchWorkflowDeletedV1(opts *bind.WatchOpts, sink chan<- *WorkflowRegistryWorkflowDeletedV1, workflowID [][32]byte, workflowOwner []common.Address, donID []uint32) (event.Subscription, error) + + ParseWorkflowDeletedV1(log types.Log) (*WorkflowRegistryWorkflowDeletedV1, error) + + FilterWorkflowForceUpdateSecretsRequestedV1(opts *bind.FilterOpts, owner []common.Address) (*WorkflowRegistryWorkflowForceUpdateSecretsRequestedV1Iterator, error) + + WatchWorkflowForceUpdateSecretsRequestedV1(opts *bind.WatchOpts, sink chan<- *WorkflowRegistryWorkflowForceUpdateSecretsRequestedV1, owner []common.Address) (event.Subscription, error) + + ParseWorkflowForceUpdateSecretsRequestedV1(log types.Log) (*WorkflowRegistryWorkflowForceUpdateSecretsRequestedV1, error) + + FilterWorkflowPausedV1(opts *bind.FilterOpts, workflowID [][32]byte, workflowOwner []common.Address, donID []uint32) (*WorkflowRegistryWorkflowPausedV1Iterator, error) + + WatchWorkflowPausedV1(opts *bind.WatchOpts, sink chan<- *WorkflowRegistryWorkflowPausedV1, workflowID [][32]byte, workflowOwner []common.Address, donID []uint32) (event.Subscription, error) + + ParseWorkflowPausedV1(log types.Log) (*WorkflowRegistryWorkflowPausedV1, error) + + FilterWorkflowRegisteredV1(opts *bind.FilterOpts, workflowID [][32]byte, workflowOwner []common.Address, donID []uint32) (*WorkflowRegistryWorkflowRegisteredV1Iterator, error) + + WatchWorkflowRegisteredV1(opts *bind.WatchOpts, sink chan<- *WorkflowRegistryWorkflowRegisteredV1, workflowID [][32]byte, workflowOwner []common.Address, donID []uint32) (event.Subscription, error) + + ParseWorkflowRegisteredV1(log types.Log) (*WorkflowRegistryWorkflowRegisteredV1, error) + + FilterWorkflowUpdatedV1(opts *bind.FilterOpts, oldWorkflowID [][32]byte, workflowOwner []common.Address, donID []uint32) (*WorkflowRegistryWorkflowUpdatedV1Iterator, error) + + WatchWorkflowUpdatedV1(opts *bind.WatchOpts, sink chan<- *WorkflowRegistryWorkflowUpdatedV1, oldWorkflowID [][32]byte, workflowOwner []common.Address, donID []uint32) (event.Subscription, error) + + ParseWorkflowUpdatedV1(log types.Log) (*WorkflowRegistryWorkflowUpdatedV1, error) + + ParseLog(log types.Log) (generated.AbigenLog, error) + + Address() common.Address +} diff --git a/core/gethwrappers/workflow/generation/generated-wrapper-dependency-versions-do-not-edit.txt b/core/gethwrappers/workflow/generation/generated-wrapper-dependency-versions-do-not-edit.txt new file mode 100644 index 00000000000..b937cc957a6 --- /dev/null +++ b/core/gethwrappers/workflow/generation/generated-wrapper-dependency-versions-do-not-edit.txt @@ -0,0 +1,2 @@ +GETH_VERSION: 1.14.11 +workflow_registry_wrapper: ../../../contracts/solc/v0.8.24/WorkflowRegistry/WorkflowRegistry.abi ../../../contracts/solc/v0.8.24/WorkflowRegistry/WorkflowRegistry.bin 2f7e6d51370fbb3a6c467515127333b6cb4b998c61f2e0b74d5e07ccb1a8716b diff --git a/core/gethwrappers/workflow/go_generate.go b/core/gethwrappers/workflow/go_generate.go new file mode 100644 index 00000000000..c6bb9dc5e61 --- /dev/null +++ b/core/gethwrappers/workflow/go_generate.go @@ -0,0 +1,7 @@ +// Package gethwrappers provides tools for wrapping solidity contracts with +// golang packages, using abigen. +package gethwrappers + +// Workflow + +//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/WorkflowRegistry/WorkflowRegistry.abi ../../../contracts/solc/v0.8.24/WorkflowRegistry/WorkflowRegistry.bin WorkflowRegistry workflow_registry_wrapper diff --git a/core/scripts/go.mod b/core/scripts/go.mod index eff79f4d58b..2eadcc83969 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -47,41 +47,77 @@ require ( cosmossdk.io/depinject v1.0.0-alpha.4 // indirect cosmossdk.io/errors v1.0.1 // indirect cosmossdk.io/math v1.3.0 // indirect + dario.cat/mergo v1.0.1 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect + github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 // indirect + github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect github.com/ChainSafe/go-schnorrkel v1.0.0 // indirect github.com/CosmWasm/wasmd v0.40.1 // indirect github.com/CosmWasm/wasmvm v1.2.4 // indirect github.com/DataDog/zstd v1.5.2 // indirect github.com/Depado/ginprom v1.8.0 // indirect + github.com/MakeNowJust/heredoc v1.0.0 // indirect + github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver/v3 v3.3.0 // indirect + github.com/Masterminds/sprig/v3 v3.2.3 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/NethermindEth/juno v0.3.1 // indirect github.com/NethermindEth/starknet.go v0.7.1-0.20240401080518-34a506f3cfdb // indirect github.com/VictoriaMetrics/fastcache v1.12.2 // indirect github.com/XSAM/otelsql v0.27.0 // indirect + github.com/alecthomas/units v0.0.0-20240626203959-61d1e3462e30 // indirect github.com/andybalholm/brotli v1.1.0 // indirect github.com/armon/go-metrics v0.4.1 // indirect + github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/atombender/go-jsonschema v0.16.1-0.20240916205339-a74cd4e2851c // indirect + github.com/avast/retry-go v3.0.0+incompatible // indirect github.com/avast/retry-go/v4 v4.6.0 // indirect + github.com/awalterschulze/gographviz v2.0.3+incompatible // indirect github.com/aws/aws-sdk-go v1.54.19 // indirect + github.com/aws/aws-sdk-go-v2 v1.32.2 // indirect + github.com/aws/aws-sdk-go-v2/config v1.28.0 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.41 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.17 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.21 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.21 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.2 // indirect + github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.2 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.24.2 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.2 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.32.2 // indirect + github.com/aws/constructs-go/constructs/v10 v10.4.2 // indirect + github.com/aws/jsii-runtime-go v1.104.0 // indirect + github.com/aws/smithy-go v1.22.0 // indirect github.com/bahlo/generic-list-go v0.2.0 // indirect + github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3 // indirect github.com/benbjohnson/clock v1.3.5 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect github.com/bits-and-blooms/bitset v1.13.0 // indirect + github.com/blang/semver/v4 v4.0.0 // indirect github.com/blendle/zapdriver v1.3.1 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect github.com/buger/jsonparser v1.1.1 // indirect github.com/bytecodealliance/wasmtime-go/v23 v23.0.0 // indirect github.com/bytedance/sonic v1.11.6 // indirect github.com/bytedance/sonic/loader v0.1.1 // indirect + github.com/c2h5oh/datasize v0.0.0-20220606134207-859f65c6625b // indirect + github.com/c9s/goprocinfo v0.0.0-20210130143923-c95fcf8c64a8 // indirect + github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2 v2.7.5 // indirect github.com/cenkalti/backoff v2.2.1+incompatible // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/chai2010/gettext-go v1.0.2 // indirect + github.com/chaos-mesh/chaos-mesh/api v0.0.0-20240821051457-da69c6d9617a // indirect github.com/cloudwego/base64x v0.1.4 // indirect github.com/cloudwego/iasm v0.2.0 // indirect github.com/cockroachdb/errors v1.11.3 // indirect @@ -90,11 +126,16 @@ require ( github.com/cockroachdb/pebble v1.1.2 // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect + github.com/coder/websocket v1.8.12 // indirect github.com/cometbft/cometbft v0.37.5 // indirect github.com/cometbft/cometbft-db v0.8.0 // indirect github.com/confio/ics23/go v0.9.0 // indirect github.com/consensys/bavard v0.1.13 // indirect github.com/consensys/gnark-crypto v0.12.1 // indirect + github.com/containerd/log v0.1.0 // indirect + github.com/containerd/platforms v0.2.1 // indirect + github.com/coreos/go-semver v0.3.1 // indirect + github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect github.com/cosmos/cosmos-sdk v0.47.11 // indirect @@ -104,6 +145,7 @@ require ( github.com/cosmos/ibc-go/v7 v7.5.1 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect github.com/cosmos/ledger-cosmos-go v0.12.4 // indirect + github.com/cpuguy83/dockercfg v0.3.2 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c // indirect github.com/crate-crypto/go-kzg-4844 v1.0.0 // indirect @@ -112,20 +154,27 @@ require ( github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/deckarep/golang-set/v2 v2.6.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect + github.com/dennwc/varint v1.0.0 // indirect github.com/dfuse-io/logging v0.0.0-20210109005628-b97a57253f70 // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect + github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/distribution/reference v0.6.0 // indirect github.com/docker/distribution v2.8.2+incompatible // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dominikbraun/graph v0.23.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.7.0 // indirect + github.com/edsrzf/mmap-go v1.1.0 // indirect github.com/emicklei/go-restful/v3 v3.12.1 // indirect github.com/esote/minmaxheap v1.0.0 // indirect github.com/ethereum/c-kzg-4844 v1.0.0 // indirect github.com/ethereum/go-verkle v0.1.1-0.20240829091221-dffa7562dbe9 // indirect + github.com/evanphx/json-patch/v5 v5.9.0 // indirect + github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect + github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb // indirect + github.com/fatih/camelcase v1.0.0 // indirect github.com/fatih/color v1.17.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect @@ -146,6 +195,7 @@ require ( github.com/gkampitakis/ciinfo v0.3.0 // indirect github.com/gkampitakis/go-diff v1.3.2 // indirect github.com/go-asn1-ber/asn1-ber v1.5.5 // indirect + github.com/go-errors/errors v1.4.2 // indirect github.com/go-json-experiment/json v0.0.0-20231102232822-2e55bd4e08b0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect @@ -154,12 +204,20 @@ require ( github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect + github.com/go-openapi/analysis v0.22.2 // indirect + github.com/go-openapi/errors v0.22.0 // indirect github.com/go-openapi/jsonpointer v0.21.0 // indirect github.com/go-openapi/jsonreference v0.21.0 // indirect + github.com/go-openapi/loads v0.21.5 // indirect + github.com/go-openapi/spec v0.20.14 // indirect + github.com/go-openapi/strfmt v0.23.0 // indirect github.com/go-openapi/swag v0.23.0 // indirect + github.com/go-openapi/validate v0.23.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-playground/validator/v10 v10.22.0 // indirect + github.com/go-redis/redis/v8 v8.11.5 // indirect + github.com/go-resty/resty/v2 v2.15.3 // indirect github.com/go-viper/mapstructure/v2 v2.1.0 // indirect github.com/go-webauthn/webauthn v0.9.4 // indirect github.com/go-webauthn/x v0.1.5 // indirect @@ -167,7 +225,9 @@ require ( github.com/goccy/go-yaml v1.12.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gofrs/flock v0.8.1 // indirect + github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.3 // indirect + github.com/gogo/status v1.1.1 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/golang-jwt/jwt/v5 v5.2.1 // indirect github.com/golang/glog v1.2.2 // indirect @@ -176,17 +236,28 @@ require ( github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/btree v1.1.2 // indirect github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect + github.com/google/go-github/v41 v41.0.0 // indirect + github.com/google/go-querystring v1.1.0 // indirect github.com/google/go-tpm v0.9.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5 // indirect + github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/gorilla/context v1.1.1 // indirect + github.com/gorilla/mux v1.8.0 // indirect github.com/gorilla/securecookie v1.1.2 // indirect github.com/gorilla/sessions v1.2.2 // indirect github.com/gorilla/websocket v1.5.1 // indirect + github.com/grafana/dskit v0.0.0-20231120170505-765e343eda4f // indirect + github.com/grafana/gomemcache v0.0.0-20231023152154-6947259a0586 // indirect + github.com/grafana/grafana-foundation-sdk/go v0.0.0-20240326122733-6f96a993222b // indirect + github.com/grafana/loki v1.6.2-0.20231215164305-b51b7d7b5503 // indirect + github.com/grafana/loki/pkg/push v0.0.0-20231201111602-11ef833ed3e4 // indirect github.com/grafana/pyroscope-go v1.1.2 // indirect github.com/grafana/pyroscope-go/godeltaprof v0.1.8 // indirect + github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc // indirect github.com/graph-gophers/dataloader v5.0.0+incompatible // indirect github.com/graph-gophers/graphql-go v1.5.0 // indirect + github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1 // indirect github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0 // indirect @@ -195,22 +266,31 @@ require ( github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/gtank/merlin v0.1.1 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect + github.com/hashicorp/consul/api v1.29.2 // indirect github.com/hashicorp/consul/sdk v0.16.1 // indirect + github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-bexpr v0.1.10 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-envparse v0.1.0 // indirect github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect + github.com/hashicorp/go-msgpack v0.5.5 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-plugin v1.6.2 // indirect github.com/hashicorp/go-retryablehttp v0.7.7 // indirect + github.com/hashicorp/go-rootcerts v1.0.2 // indirect + github.com/hashicorp/go-sockaddr v1.0.6 // indirect github.com/hashicorp/golang-lru v0.6.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hashicorp/memberlist v0.5.0 // indirect + github.com/hashicorp/serf v0.10.1 // indirect github.com/hashicorp/yamux v0.1.1 // indirect github.com/hdevalence/ed25519consensus v0.1.0 // indirect github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect github.com/holiman/uint256 v1.3.1 // indirect github.com/huandu/skiplist v1.2.0 // indirect + github.com/huandu/xstrings v1.4.0 // indirect github.com/huin/goupnp v1.3.0 // indirect github.com/iancoleman/strcase v0.3.0 // indirect github.com/imdario/mergo v0.3.16 // indirect @@ -230,6 +310,8 @@ require ( github.com/josharian/intern v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect + github.com/julienschmidt/httprouter v1.3.0 // indirect + github.com/kelseyhightower/envconfig v1.4.0 // indirect github.com/klauspost/compress v1.17.9 // indirect github.com/klauspost/cpuid/v2 v2.2.7 // indirect github.com/kr/pretty v0.3.1 // indirect @@ -239,8 +321,10 @@ require ( github.com/leodido/go-urn v1.4.0 // indirect github.com/lib/pq v1.10.9 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect + github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect github.com/linxGnu/grocksdb v1.7.16 // indirect github.com/logrusorgru/aurora v2.0.3+incompatible // indirect + github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/maruel/natural v1.1.1 // indirect @@ -248,33 +332,56 @@ require ( github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect github.com/mfridman/interpolate v0.0.2 // indirect + github.com/miekg/dns v1.1.61 // indirect github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/pointerstructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect + github.com/moby/patternmatcher v0.6.0 // indirect + github.com/moby/spdystream v0.4.0 // indirect + github.com/moby/sys/sequential v0.6.0 // indirect + github.com/moby/sys/user v0.3.0 // indirect + github.com/moby/sys/userns v0.1.0 // indirect + github.com/moby/term v0.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect + github.com/morikuni/aec v1.0.0 // indirect github.com/mostynb/zstdpool-freelist v0.0.0-20201229113212-927304c0c3b1 // indirect github.com/mr-tron/base58 v1.2.0 // indirect github.com/mtibben/percent v0.2.1 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect + github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect github.com/oklog/run v1.1.0 // indirect + github.com/oklog/ulid v1.3.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0 // indirect + github.com/opentracing-contrib/go-grpc v0.0.0-20210225150812-73cb765af46e // indirect + github.com/opentracing-contrib/go-stdlib v1.0.0 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect + github.com/otiai10/copy v1.14.0 // indirect github.com/patrickmn/go-cache v2.1.0+incompatible // indirect + github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect github.com/pelletier/go-toml v1.9.5 // indirect + github.com/peterbourgon/diskv v2.0.1+incompatible // indirect github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect + github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/pressly/goose/v3 v3.21.1 // indirect + github.com/prometheus/alertmanager v0.27.0 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.60.0 // indirect + github.com/prometheus/common/sigv4 v0.1.0 // indirect + github.com/prometheus/exporter-toolkit v0.11.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/prometheus/prometheus v0.54.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect @@ -282,6 +389,7 @@ require ( github.com/robfig/cron/v3 v3.0.1 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/rs/cors v1.10.1 // indirect + github.com/rs/zerolog v1.33.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect @@ -289,12 +397,16 @@ require ( github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/scylladb/go-reflectx v1.0.1 // indirect + github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect + github.com/sercand/kuberesolver/v5 v5.1.1 // indirect github.com/sethvargo/go-retry v0.2.4 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/shirou/gopsutil/v3 v3.24.3 // indirect + github.com/shoenig/go-m1cpu v0.1.6 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect github.com/smartcontractkit/ccip-owner-contracts v0.0.0-20240926212305-a6deabdfce86 // indirect github.com/smartcontractkit/chain-selectors v1.0.29 // indirect - github.com/smartcontractkit/chainlink-ccip v0.0.0-20241112095015-3e85d9f1898b // indirect + github.com/smartcontractkit/chainlink-ccip v0.0.0-20241118091009-43c2b4804cec // indirect github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20241017133723-5277829bd53f // indirect github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20241018134907-a00ba3729b5e // indirect github.com/smartcontractkit/chainlink-feeds v0.1.1 // indirect @@ -302,10 +414,16 @@ require ( github.com/smartcontractkit/chainlink-protos/orchestrator v0.3.0 // indirect github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241118190857-e2db20a6a969 // indirect github.com/smartcontractkit/chainlink-starknet/relayer v0.1.1-0.20241017135645-176a23722fd8 // indirect + github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.13 // indirect + github.com/smartcontractkit/chainlink-testing-framework/lib/grafana v1.50.0 // indirect + github.com/smartcontractkit/chainlink-testing-framework/seth v1.50.5 // indirect + github.com/smartcontractkit/chainlink-testing-framework/wasp v1.50.2 // indirect github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 // indirect github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20241009055228-33d0c0bf38de // indirect github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20241009055228-33d0c0bf38de // indirect github.com/smartcontractkit/wsrpc v0.8.2 // indirect + github.com/soheilhy/cmux v0.1.5 // indirect + github.com/sony/gobreaker v0.5.0 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spf13/afero v1.11.0 // indirect github.com/spf13/cast v1.6.0 // indirect @@ -319,6 +437,7 @@ require ( github.com/tendermint/go-amino v0.16.0 // indirect github.com/teris-io/shortid v0.0.0-20201117134242-e59966efd125 // indirect github.com/test-go/testify v1.1.4 // indirect + github.com/testcontainers/testcontainers-go v0.34.0 // indirect github.com/theodesp/go-heaps v0.0.0-20190520121037-88e35354fe0a // indirect github.com/tidwall/btree v1.6.0 // indirect github.com/tidwall/gjson v1.17.0 // indirect @@ -329,6 +448,8 @@ require ( github.com/tklauser/numcpus v0.6.1 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/tyler-smith/go-bip39 v1.1.0 // indirect + github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect + github.com/uber/jaeger-lib v2.4.1+incompatible // indirect github.com/ugorji/go/codec v1.2.12 // indirect github.com/ulule/limiter/v3 v3.11.2 // indirect github.com/unrolled/secure v1.13.0 // indirect @@ -336,6 +457,7 @@ require ( github.com/valyala/fastjson v1.4.1 // indirect github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect github.com/x448/float16 v0.8.4 // indirect + github.com/xlab/treeprint v1.2.0 // indirect github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect github.com/zondax/hid v0.9.2 // indirect @@ -343,8 +465,13 @@ require ( go.dedis.ch/fixbuf v1.0.3 // indirect go.dedis.ch/kyber/v3 v3.1.0 // indirect go.etcd.io/bbolt v1.3.9 // indirect + go.etcd.io/etcd/api/v3 v3.5.14 // indirect + go.etcd.io/etcd/client/pkg/v3 v3.5.14 // indirect + go.etcd.io/etcd/client/v3 v3.5.14 // indirect go.mongodb.org/mongo-driver v1.15.0 // indirect go.opencensus.io v0.24.0 // indirect + go.opentelemetry.io/collector/pdata v1.12.0 // indirect + go.opentelemetry.io/collector/semconv v0.105.0 // indirect go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.49.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.56.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0 // indirect @@ -366,9 +493,13 @@ require ( go.opentelemetry.io/otel/sdk/metric v1.31.0 // indirect go.opentelemetry.io/otel/trace v1.31.0 // indirect go.opentelemetry.io/proto/otlp v1.3.1 // indirect + go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect + go.uber.org/atomic v1.11.0 // indirect + go.uber.org/goleak v1.3.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/ratelimit v0.3.1 // indirect go.uber.org/zap v1.27.0 // indirect + go4.org/netipx v0.0.0-20230125063823-8449b0a6169f // indirect golang.org/x/arch v0.11.0 // indirect golang.org/x/crypto v0.28.0 // indirect golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c // indirect @@ -382,23 +513,32 @@ require ( golang.org/x/time v0.7.0 // indirect golang.org/x/tools v0.26.0 // indirect golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect + gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect gonum.org/v1/gonum v0.15.1 // indirect google.golang.org/genproto v0.0.0-20241021214115-324edc3d5d38 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20241021214115-324edc3d5d38 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 // indirect google.golang.org/grpc v1.67.1 // indirect + gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/guregu/null.v4 v4.0.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect + k8s.io/apiextensions-apiserver v0.31.0 // indirect + k8s.io/cli-runtime v0.31.1 // indirect + k8s.io/component-base v0.31.1 // indirect k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20240709000822-3c01b740850f // indirect + k8s.io/kubectl v0.31.1 // indirect k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect pgregory.net/rapid v1.1.0 // indirect rsc.io/tmplfunc v0.0.3 // indirect + sigs.k8s.io/controller-runtime v0.19.0 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect + sigs.k8s.io/kustomize/api v0.17.2 // indirect + sigs.k8s.io/kustomize/kyaml v0.17.1 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) diff --git a/core/scripts/go.sum b/core/scripts/go.sum index 82a9f96a38f..fe23d078f6c 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -11,7 +11,11 @@ cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.116.0 h1:B3fRrSDkLRt5qSHWe40ERJvhvnQwdZiHu0bJOpldweE= cloud.google.com/go v0.116.0/go.mod h1:cEPSRWPzZEswwdr9BxE6ChEn01dWlTaF05LiC2Xs70U= cloud.google.com/go/auth v0.9.9 h1:BmtbpNQozo8ZwW2t7QJjnrQtdganSdmqeIBxHxNkEZQ= @@ -21,6 +25,9 @@ cloud.google.com/go/auth/oauth2adapt v0.2.3/go.mod h1:tMQXOfZzFuNuUxOypHlQEXgdfX cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/compute v1.28.1 h1:XwPcZjgMCnU2tkwY10VleUjSAfpTj9RDn+kGrbYsi8o= cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY= cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY= @@ -34,9 +41,12 @@ cloud.google.com/go/monitoring v1.21.1/go.mod h1:Rj++LKrlht9uBi8+Eb530dIrzG/cU/l cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.45.0 h1:5av0QcIVj77t+44mV4gffFC/LscFRUhto6UBMB5SimM= cloud.google.com/go/storage v1.45.0/go.mod h1:wpPblkIuMP5jCB/E48Pz9zIo2S/zD8g+ITmxKkPCITE= contrib.go.opencensus.io/exporter/stackdriver v0.12.6/go.mod h1:8x999/OcIPy5ivx/wDiV7Gx4D+VUPODf0mWRGRc5kSk= @@ -57,6 +67,8 @@ cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= cosmossdk.io/tools/rosetta v0.2.1/go.mod h1:Pqdc1FdvkNV3LcNIkYWt2RQY6IP1ge6YWZk8MhhO9Hw= +dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= +dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= @@ -65,17 +77,34 @@ github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMb github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= github.com/AlekSi/pointer v1.1.0 h1:SSDMPcXD9jSl8FPy9cRzoRaMJtm9g9ggGTxecRUbQoI= github.com/AlekSi/pointer v1.1.0/go.mod h1:y7BvfRI3wXPWKXEBhU71nbnIEEZX0QTSB2Bj48UJIZE= +github.com/Azure/azure-sdk-for-go v65.0.0+incompatible h1:HzKLt3kIwMm4KeJYTdx9EbjRYTySD/t8i1Ee/W5EGXw= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0 h1:GJHeeA2N7xrG3q30L2UXDyuWRzDM900/65j70wcM4Ww= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0/go.mod h1:l38EPgmsp71HHLq9j7De57JcKOWPyhrsW1Awm1JS6K0= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 h1:tfLQ34V6F7tVSwoTf/4lH5sE0o6eCJuNDTmH09nDpbc= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0/go.mod h1:9kIvujWAA58nmPmWB1m23fyWic1kYZMxD9CxaWn4Qpg= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 h1:ywEEhmNahHBihViHepv3xPBn1663uRv2t2q/ESv9seY= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0/go.mod h1:iZDifYGJTIgIIkYRNWPENUnqx6bJ2xnSDFI2tjwZNuY= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.7.0 h1:LkHbJbgF3YyvC53aqYGR+wWQDn2Rdp9AQdGndf9QvY4= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.7.0/go.mod h1:QyiQdW4f4/BIfB8ZutZ2s+28RAgfa/pT+zS++ZHyM1I= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0 h1:bXwSugBiSbgtz7rOtbfGf+woewp4f06orW9OP5BjHLA= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0/go.mod h1:Y/HgrePTmGy9HjdSGTqZNa+apUpTVIEVKXJyARP2lrk= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 h1:mFRzDkZVAjdal+s7s0MwaRv9igoPqLRdzOLzw/8Xvq8= github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 h1:XHOnouVk1mxXfQidrMEnLlPk9UMeRtyBTnEFtxkV0kU= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v1.0.0 h1:3aDA67lAykLaG1y3AOjs88dMxC88PgUuHRrLeDnvGIM= github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z7vcchBSbMBEhCw4= +github.com/Code-Hex/go-generics-cache v1.5.1 h1:6vhZGc5M7Y/YD8cIUcY8kcuQLB4cHR7U+0KMqAA0KcU= +github.com/Code-Hex/go-generics-cache v1.5.1/go.mod h1:qxcC9kRVrct9rHeiYpFWSoW1vxyillCVzX13KZG8dl4= github.com/CosmWasm/wasmd v0.40.1 h1:LxbO78t/6S8TkeQlUrJ0m5O87HtAwLx4RGHq3rdrOEU= github.com/CosmWasm/wasmd v0.40.1/go.mod h1:6EOwnv7MpuFaEqxcUOdFV9i4yvrdOciaY6VQ1o7A3yg= github.com/CosmWasm/wasmvm v1.2.4 h1:6OfeZuEcEH/9iqwrg2pkeVtDCkMoj9U6PpKtcrCyVrQ= @@ -93,9 +122,18 @@ github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.48 github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.48.3/go.mod h1:SsdWig2J5PMnfMvfJuEb1uZa8Y+kvNyvrULFo69gTFk= github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.48.3 h1:2vcVkrNdSMJpoOVAWi9ApsQR5iqNeFGt5Qx8Xlt3IoI= github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.48.3/go.mod h1:wRbFgBQUVm1YXrvWKofAEmq9HNJTDphbAaJSSX01KUI= +github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= +github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= +github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= +github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= +github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= +github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= +github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+hmvYS0= github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= +github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA= +github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/NethermindEth/juno v0.3.1 h1:AW72LiAm9gqUeCVJWvepnZcTnpU4Vkl0KzPMxS+42FA= @@ -111,6 +149,8 @@ github.com/VictoriaMetrics/fastcache v1.12.2 h1:N0y9ASrJ0F6h0QaC3o6uJb3NIZ9VKLjC github.com/VictoriaMetrics/fastcache v1.12.2/go.mod h1:AmC+Nzz1+3G2eCPapF6UcsnkThDcMsQicp4xDukwJYI= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/Workiva/go-datastructures v1.1.0 h1:hu20UpgZneBhQ3ZvwiOGlqJSKIosin2Rd5wAKUHEO/k= +github.com/Workiva/go-datastructures v1.1.0/go.mod h1:1yZL+zfsztete+ePzZz/Zb1/t5BnDuE2Ya2MMGhzP6A= github.com/XSAM/otelsql v0.27.0 h1:i9xtxtdcqXV768a5C6SoT/RkG+ue3JTOgkYInzlTOqs= github.com/XSAM/otelsql v0.27.0/go.mod h1:0mFB3TvLa7NCuhm/2nU7/b2wEtsczkj8Rey8ygO7V+A= github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= @@ -118,8 +158,16 @@ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuy github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/alecthomas/units v0.0.0-20240626203959-61d1e3462e30 h1:t3eaIm0rUkzbrIewtiFmMK5RXHej2XnoXNhxVsAYUfg= +github.com/alecthomas/units v0.0.0-20240626203959-61d1e3462e30/go.mod h1:fvzegU4vN3H1qMT+8wDmzjAcDONcgo2/SZ/TyfdUOFs= github.com/alexbrainman/sspi v0.0.0-20210105120005-909beea2cc74 h1:Kk6a4nehpJ3UuJRqlA3JxYxBZEqCeOmATOvrbT4p9RA= github.com/alexbrainman/sspi v0.0.0-20210105120005-909beea2cc74/go.mod h1:cEWa1LVoE5KvSD9ONXsZrj0z6KqySlCCNKHlLzbqAt4= +github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a h1:HbKu58rmZpUGpz5+4FfNmIU+FmZg2P3Xaj2v2bfNWmk= +github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc= +github.com/alicebob/miniredis v2.5.0+incompatible h1:yBHoLpsyjupjz3NL3MhKMVkR41j82Yjf3KFv7ApYzUI= +github.com/alicebob/miniredis/v2 v2.30.4 h1:8S4/o1/KoUArAGbGwPxcwf0krlzceva2XVOSchFS7Eo= +github.com/alicebob/miniredis/v2 v2.30.4/go.mod h1:b25qWj4fCEsBeAAR2mlb0ufImGC6uH3VlUfb/HS5zKg= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/allegro/bigcache v1.2.1 h1:hg1sY1raCwic3Vnsvje6TT7/pnZba83LeFck5NrFKSc= github.com/allegro/bigcache v1.2.1/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= @@ -135,16 +183,62 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmV github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= +github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= +github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/atombender/go-jsonschema v0.16.1-0.20240916205339-a74cd4e2851c h1:cxQVoh6kY+c4b0HUchHjGWBI8288VhH50qxKG3hdEg0= github.com/atombender/go-jsonschema v0.16.1-0.20240916205339-a74cd4e2851c/go.mod h1:3XzxudkrYVUvbduN/uI2fl4lSrMSzU0+3RCu2mpnfx8= +github.com/avast/retry-go v3.0.0+incompatible h1:4SOWQ7Qs+oroOTQOYnAHqelpCO0biHSxpiH9JdtuBj0= +github.com/avast/retry-go v3.0.0+incompatible/go.mod h1:XtSnn+n/sHqQIpZ10K1qAevBhOOCWBLXXy3hyiqqBrY= github.com/avast/retry-go/v4 v4.6.0 h1:K9xNA+KeB8HHc2aWFuLb25Offp+0iVRXEvFx8IinRJA= github.com/avast/retry-go/v4 v4.6.0/go.mod h1:gvWlPhBVsvBbLkVGDg/KwvBv0bEkCOLRRSHKIr2PyOE= +github.com/awalterschulze/gographviz v2.0.3+incompatible h1:9sVEXJBJLwGX7EQVhLm2elIKCm7P2YHFC8v6096G09E= +github.com/awalterschulze/gographviz v2.0.3+incompatible/go.mod h1:GEV5wmg4YquNw7v1kkyoX9etIk8yVmXj+AkDHuuETHs= github.com/aws/aws-sdk-go v1.22.1/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.23.20/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.54.19 h1:tyWV+07jagrNiCcGRzRhdtVjQs7Vy41NwsuOcl0IbVI= github.com/aws/aws-sdk-go v1.54.19/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= +github.com/aws/aws-sdk-go-v2 v1.32.2 h1:AkNLZEyYMLnx/Q/mSKkcMqwNFXMAvFto9bNsHqcTduI= +github.com/aws/aws-sdk-go-v2 v1.32.2/go.mod h1:2SK5n0a2karNTv5tbP1SjsX0uhttou00v/HpXKM1ZUo= +github.com/aws/aws-sdk-go-v2/config v1.28.0 h1:FosVYWcqEtWNxHn8gB/Vs6jOlNwSoyOCA/g/sxyySOQ= +github.com/aws/aws-sdk-go-v2/config v1.28.0/go.mod h1:pYhbtvg1siOOg8h5an77rXle9tVG8T+BWLWAo7cOukc= +github.com/aws/aws-sdk-go-v2/credentials v1.17.41 h1:7gXo+Axmp+R4Z+AK8YFQO0ZV3L0gizGINCOWxSLY9W8= +github.com/aws/aws-sdk-go-v2/credentials v1.17.41/go.mod h1:u4Eb8d3394YLubphT4jLEwN1rLNq2wFOlT6OuxFwPzU= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.17 h1:TMH3f/SCAWdNtXXVPPu5D6wrr4G5hI1rAxbcocKfC7Q= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.17/go.mod h1:1ZRXLdTpzdJb9fwTMXiLipENRxkGMTn1sfKexGllQCw= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.21 h1:UAsR3xA31QGf79WzpG/ixT9FZvQlh5HY1NRqSHBNOCk= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.21/go.mod h1:JNr43NFf5L9YaG3eKTm7HQzls9J+A9YYcGI5Quh1r2Y= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.21 h1:6jZVETqmYCadGFvrYEQfC5fAQmlo80CeL5psbno6r0s= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.21/go.mod h1:1SR0GbLlnN3QUmYaflZNiH1ql+1qrSiB2vwcJ+4UM60= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 h1:TToQNkvGguu209puTojY/ozlqy2d/SFNcoLIqTFi42g= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0/go.mod h1:0jp+ltwkf+SwG2fm/PKo8t4y8pJSgOCO4D8Lz3k0aHQ= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.2 h1:s7NA1SOw8q/5c0wr8477yOPp0z+uBaXBnLE0XYb0POA= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.2/go.mod h1:fnjjWyAW/Pj5HYOxl9LJqWtEwS7W2qgcRLWP+uWbss0= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.2 h1:Rrqru2wYkKQCS2IM5/JrgKUQIoNTqA6y/iuxkjzxC6M= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.2/go.mod h1:QuCURO98Sqee2AXmqDNxKXYFm2OEDAVAPApMqO0Vqnc= +github.com/aws/aws-sdk-go-v2/service/sso v1.24.2 h1:bSYXVyUzoTHoKalBmwaZxs97HU9DWWI3ehHSAMa7xOk= +github.com/aws/aws-sdk-go-v2/service/sso v1.24.2/go.mod h1:skMqY7JElusiOUjMJMOv1jJsP7YUg7DrhgqZZWuzu1U= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.2 h1:AhmO1fHINP9vFYUE0LHzCWg/LfUWUF+zFPEcY9QXb7o= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.2/go.mod h1:o8aQygT2+MVP0NaV6kbdE1YnnIM8RRVQzoeUH45GOdI= +github.com/aws/aws-sdk-go-v2/service/sts v1.32.2 h1:CiS7i0+FUe+/YY1GvIBLLrR/XNGZ4CtM1Ll0XavNuVo= +github.com/aws/aws-sdk-go-v2/service/sts v1.32.2/go.mod h1:HtaiBI8CjYoNVde8arShXb94UbQQi9L4EMr6D+xGBwo= +github.com/aws/constructs-go/constructs/v10 v10.4.2 h1:+hDLTsFGLJmKIn0Dg20vWpKBrVnFrEWYgTEY5UiTEG8= +github.com/aws/constructs-go/constructs/v10 v10.4.2/go.mod h1:cXsNCKDV+9eR9zYYfwy6QuE4uPFp6jsq6TtH1MwBx9w= +github.com/aws/jsii-runtime-go v1.104.0 h1:651Sh6J2FtatfnVzlOQ3/Ye1WWPAseZ6E/tSQxEKdSI= +github.com/aws/jsii-runtime-go v1.104.0/go.mod h1:7ZmQXxV0AAhhvv/GaHX4n6zbgA1tSRVdnQYAJbIhXHk= +github.com/aws/smithy-go v1.22.0 h1:uunKnWlcoL3zO7q+gG2Pk53joueEOsnNB28QdMsmiMM= +github.com/aws/smithy-go v1.22.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= +github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df h1:GSoSVRLoBaFpOOds6QyY1L8AX7uoY+Ln3BHc22W40X0= +github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df/go.mod h1:hiVxq5OP2bUGBRNS3Z/bt/reCLFNbdcST6gISi1fiOM= +github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3 h1:6df1vn4bBlDDo4tARvBm7l6KA9iVMnE3NWizDeWSrps= +github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3/go.mod h1:CIWtjkly68+yqLPbvwwR/fjNJA/idrtULjZWh2v1ys0= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -160,6 +254,8 @@ github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsy github.com/bits-and-blooms/bitset v1.13.0 h1:bAQ9OPNFYbGHV6Nez0tmNI0RiEu7/hxlYJRUA0wFAVE= github.com/bits-and-blooms/bitset v1.13.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= +github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/blendle/zapdriver v1.3.1 h1:C3dydBOWYRiOk+B8X9IVZ5IOe+7cl+tGOexN4QqHfpE= github.com/blendle/zapdriver v1.3.1/go.mod h1:mdXfREi6u5MArG4j9fewC+FGnXaBR+T4Ox4J2u4eHCc= github.com/btcsuite/btcd v0.22.1 h1:CnwP9LM/M9xuRrGSCGeMVs9iv09uMqwsVX7EeIpgV2c= @@ -173,12 +269,20 @@ github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZ github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= +github.com/bxcodec/faker v2.0.1+incompatible h1:P0KUpUw5w6WJXwrPfv35oc91i4d8nf40Nwln+M/+faA= +github.com/bxcodec/faker v2.0.1+incompatible/go.mod h1:BNzfpVdTwnFJ6GtfYTcQu6l6rHShT+veBxNCnjCx5XM= github.com/bytecodealliance/wasmtime-go/v23 v23.0.0 h1:NJvU4S8KEk1GnF6+FvlnzMD/8wXTj/mYJSG6Q4yu3Pw= github.com/bytecodealliance/wasmtime-go/v23 v23.0.0/go.mod h1:5YIL+Ouiww2zpO7u+iZ1U1G5NvmwQYaXdmCZQGjQM0U= github.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc0= github.com/bytedance/sonic v1.11.6/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4= github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM= github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= +github.com/c2h5oh/datasize v0.0.0-20220606134207-859f65c6625b h1:6+ZFm0flnudZzdSE0JxlhR2hKnGPcNB35BjQf4RYQDY= +github.com/c2h5oh/datasize v0.0.0-20220606134207-859f65c6625b/go.mod h1:S/7n9copUssQ56c7aAgHqftWO4LTf4xY6CGWt8Bc+3M= +github.com/c9s/goprocinfo v0.0.0-20210130143923-c95fcf8c64a8 h1:SjZ2GvvOononHOpK84APFuMvxqsk3tEIaKH/z4Rpu3g= +github.com/c9s/goprocinfo v0.0.0-20210130143923-c95fcf8c64a8/go.mod h1:uEyr4WpAH4hio6LFriaPkL938XnrvLpNPmQHBdrmbIE= +github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2 v2.7.5 h1:rvc39Ol6z3MvaBzXkxFC6Nfsnixq/dRypushKDd7Nc0= +github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2 v2.7.5/go.mod h1:R/pdNYDYFQk+tuuOo7QES1kkv6OLmp5ze2XBZQIVffM= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= @@ -194,6 +298,10 @@ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chai2010/gettext-go v1.0.2 h1:1Lwwip6Q2QGsAdl/ZKPCwTe9fe0CjlUbqj5bFNSjIRk= +github.com/chai2010/gettext-go v1.0.2/go.mod h1:y+wnP2cHYaVj19NZhYKAwEMH2CI1gNHeQQ+5AjwawxA= +github.com/chaos-mesh/chaos-mesh/api v0.0.0-20240821051457-da69c6d9617a h1:6Pg3a6j/41QDzH/oYcMLwwKsf3x/HXcu9W/dBaf2Hzs= +github.com/chaos-mesh/chaos-mesh/api v0.0.0-20240821051457-da69c6d9617a/go.mod h1:x11iCbZV6hzzSQWMq610B6Wl5Lg1dhwqcVfeiWQQnQQ= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI= @@ -228,6 +336,8 @@ github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwP github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= +github.com/coder/websocket v1.8.12 h1:5bUXkEPPIbewrnkU8LTCLVaxi4N4J8ahufH2vlo4NAo= +github.com/coder/websocket v1.8.12/go.mod h1:LNVeNrXQZfe5qhS9ALED3uA+l5pPqvwXg3CKoDBB2gs= github.com/coinbase/rosetta-sdk-go/types v1.0.0 h1:jpVIwLcPoOeCR6o1tU+Xv7r5bMONNbHU7MuEHboiFuA= github.com/coinbase/rosetta-sdk-go/types v1.0.0/go.mod h1:eq7W2TMRH22GTW0N0beDnN931DW0/WOI1R2sdHNHG4c= github.com/cometbft/cometbft v0.37.5 h1:/U/TlgMh4NdnXNo+YU9T2NMCWyhXNDF34Mx582jlvq0= @@ -244,14 +354,20 @@ github.com/containerd/continuity v0.4.3 h1:6HVkalIp+2u1ZLH1J/pYX2oBVXlJZvh1X1A7b github.com/containerd/continuity v0.4.3/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= +github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= +github.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= +github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= @@ -276,6 +392,8 @@ github.com/cosmos/ledger-cosmos-go v0.12.4 h1:drvWt+GJP7Aiw550yeb3ON/zsrgW0jgh5s github.com/cosmos/ledger-cosmos-go v0.12.4/go.mod h1:fjfVWRf++Xkygt9wzCsjEBdjcf7wiiY35fv3ctT+k4M= github.com/cosmos/rosetta-sdk-go v0.10.0 h1:E5RhTruuoA7KTIXUcMicL76cffyeoyvNybzUGSKFTcM= github.com/cosmos/rosetta-sdk-go v0.10.0/go.mod h1:SImAZkb96YbwvoRkzSMQB6noNJXFgWl/ENIznEoYQI4= +github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GKorA= +github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= @@ -290,6 +408,8 @@ github.com/creachadair/taskgroup v0.4.2 h1:jsBLdAJE42asreGss2xZGZ8fJra7WtwnHWeJF github.com/creachadair/taskgroup v0.4.2/go.mod h1:qiXUOSrbwAY3u0JPGTzObbE3yf9hcXHDKBZ2ZjpCbgM= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= +github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/daaku/go.zipexe v1.0.0/go.mod h1:z8IiR6TsVLEYKwXAoE/I+8ys/sDkgTzSL0CLnGVd57E= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= @@ -306,6 +426,8 @@ github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5il github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= +github.com/dennwc/varint v1.0.0 h1:kGNFFSSw8ToIy3obO/kKr8U9GZYUAxQEVuix4zfDWzE= +github.com/dennwc/varint v1.0.0/go.mod h1:hnItb35rvZvJrbTALZtY/iQfDs48JKRG1RPpgziApxA= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= github.com/dfuse-io/logging v0.0.0-20201110202154-26697de88c79/go.mod h1:V+ED4kT/t/lKtH99JQmKIb0v9WL3VaYkJ36CfHlVECI= @@ -320,7 +442,11 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/digitalocean/godo v1.118.0 h1:lkzGFQmACrVCp7UqH1sAi4JK/PWwlc5aaxubgorKmC4= +github.com/digitalocean/godo v1.118.0/go.mod h1:Vk0vpCot2HOAJwc5WE8wljZGtJ3ZtWIc8MQ8rF38sdo= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= @@ -338,6 +464,8 @@ github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkp github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/dvsekhvalnov/jose2go v1.7.0 h1:bnQc8+GMnidJZA8zc6lLEAb4xNrIqHwO+9TzqvtQZPo= github.com/dvsekhvalnov/jose2go v1.7.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +github.com/edsrzf/mmap-go v1.1.0 h1:6EUwBLQ/Mcr1EYLE4Tn1VdW1A4ckqCQWZBw8Hr0kjpQ= +github.com/edsrzf/mmap-go v1.1.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q= github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU= github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -357,6 +485,16 @@ github.com/ethereum/go-ethereum v1.14.11 h1:8nFDCUUE67rPc6AKxFj7JKaOa2W/W1Rse3oS github.com/ethereum/go-ethereum v1.14.11/go.mod h1:+l/fr42Mma+xBnhefL/+z11/hcmJ2egl+ScIVPjhc7E= github.com/ethereum/go-verkle v0.1.1-0.20240829091221-dffa7562dbe9 h1:8NfxH2iXvJ60YRB8ChToFTUzl8awsc3cJ8CbLjGIl/A= github.com/ethereum/go-verkle v0.1.1-0.20240829091221-dffa7562dbe9/go.mod h1:M3b90YRnzqKyyzBEWJGqj8Qff4IDeXnzFw0P9bFw3uk= +github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= +github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg= +github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= +github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2Wvf/TIe2xdyJxTlb6obmF18d8QdkxNDu4= +github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc= +github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb h1:IT4JYU7k4ikYg1SCxNI1/Tieq/NFvh6dzLdgi7eu0tM= +github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb/go.mod h1:bH6Xx7IW64qjjJq8M2u4dxNaBiDfKK+z/3eGDpXEQhc= +github.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8= +github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= @@ -442,15 +580,29 @@ github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= +github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= +github.com/go-openapi/analysis v0.22.2 h1:ZBmNoP2h5omLKr/srIC9bfqrUGzT6g6gNv03HE9Vpj0= +github.com/go-openapi/analysis v0.22.2/go.mod h1:pDF4UbZsQTo/oNuRfAWWd4dAh4yuYf//LYorPTjrpvo= +github.com/go-openapi/errors v0.22.0 h1:c4xY/OLxUBSTiepAg3j/MHuAv5mJhnf53LLMWFB+u/w= +github.com/go-openapi/errors v0.22.0/go.mod h1:J3DmZScxCDufmIMsdOuDHxJbdOGC0xtUynjIx092vXE= github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= +github.com/go-openapi/loads v0.21.5 h1:jDzF4dSoHw6ZFADCGltDb2lE4F6De7aWSpe+IcsRzT0= +github.com/go-openapi/loads v0.21.5/go.mod h1:PxTsnFBoBe+z89riT+wYt3prmSBP6GDAQh2l9H1Flz8= +github.com/go-openapi/spec v0.20.14 h1:7CBlRnw+mtjFGlPDRZmAMnq35cRzI91xj03HVyUi/Do= +github.com/go-openapi/spec v0.20.14/go.mod h1:8EOhTpBoFiask8rrgwbLC3zmJfz4zsCUueRuPM6GNkw= +github.com/go-openapi/strfmt v0.23.0 h1:nlUS6BCqcnAk0pyhi9Y+kdDVZdZMHfEKQiS4HaMgO/c= +github.com/go-openapi/strfmt v0.23.0/go.mod h1:NrtIpfKtWIygRkKVsxh7XQMDQW5HKQl6S5ik2elW+K4= github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= +github.com/go-openapi/validate v0.23.0 h1:2l7PJLzCis4YUGEoW6eoQw3WhyM65WSIcjX6SQnlfDw= +github.com/go-openapi/validate v0.23.0/go.mod h1:EeiAZ5bmpSIOJV1WLfyYF9qp/B1ZgSaEpHTJHtN5cbE= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= @@ -463,11 +615,15 @@ github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91 github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos= github.com/go-playground/validator/v10 v10.22.0 h1:k6HsTZ0sTnROkhS//R0O+55JgM8C4Bx7ia+JlgcnOao= github.com/go-playground/validator/v10 v10.22.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= +github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= +github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= +github.com/go-resty/resty/v2 v2.15.3 h1:bqff+hcqAflpiF591hhJzNdkRsFhlB96CYfBwSFvql8= +github.com/go-resty/resty/v2 v2.15.3/go.mod h1:0fHAoK7JoBy/Ch36N8VFeMsK7xQOHhvWaC3iOktwmIU= github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/go-viper/mapstructure/v2 v2.1.0 h1:gHnMa2Y/pIxElCH2GlZZ1lZSsn6XMtufpGyP1XxdC/w= @@ -476,6 +632,8 @@ github.com/go-webauthn/webauthn v0.9.4 h1:YxvHSqgUyc5AK2pZbqkWWR55qKeDPhP8zLDr6l github.com/go-webauthn/webauthn v0.9.4/go.mod h1:LqupCtzSef38FcxzaklmOn7AykGKhAhr9xlRbdbgnTw= github.com/go-webauthn/x v0.1.5 h1:V2TCzDU2TGLd0kSZOXdrqDVV5JB9ILnKxA9S53CSBw0= github.com/go-webauthn/x v0.1.5/go.mod h1:qbzWwcFcv4rTwtCLOZd+icnr6B7oSsAGZJqlt8cukqY= +github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg= +github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= @@ -483,13 +641,17 @@ github.com/goccy/go-yaml v1.12.0 h1:/1WHjnMsI1dlIBQutrvSMGZRQufVO3asrHfTwfACoPM= github.com/goccy/go-yaml v1.12.0/go.mod h1:wKnAMd44+9JAAnGQpWVEgBzGt3YuTaQ4uXoHvE4m7WU= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= +github.com/gogo/status v1.1.1 h1:DuHXlSFHNKqTQ+/ACf5Vs6r4X/dH2EgIzR9Vr+H65kg= +github.com/gogo/status v1.1.1/go.mod h1:jpG3dM5QPcqu19Hg8lkUhBFBa3TcLs1DG7+2Jqci7oU= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= @@ -507,7 +669,9 @@ github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -515,6 +679,7 @@ github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= @@ -544,15 +709,22 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-github/v41 v41.0.0 h1:HseJrM2JFf2vfiZJ8anY2hqBjdfY1Vlj/K27ueww4gg= +github.com/google/go-github/v41 v41.0.0/go.mod h1:XgmCA5H323A9rtgExdTcnDkcqp6S30AVACCBDOonIxg= +github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= +github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/go-tpm v0.9.0 h1:sQF6YqWMi+SCXpsmS3fd21oPy/vSddwZry4JnmltHVk= github.com/google/go-tpm v0.9.0/go.mod h1:FkNVkc6C+IsvDI9Jw1OveJmxGZUUaKxtrpOS47QWKfU= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= @@ -560,6 +732,7 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -567,13 +740,18 @@ github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OI github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5 h1:5iH8iuqE5apketRbSFBy+X1V0o+l+8NF1avt4HWl7cA= github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -584,6 +762,8 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.13.0 h1:yitjD5f7jQHhyDsnhKEBU52NdvvdSeGzlAnDPT0hH1s= github.com/googleapis/gax-go/v2 v2.13.0/go.mod h1:Z/fvTZXF8/uw7Xu5GuslPw+bplx6SS338j1Is2S+B7A= +github.com/gophercloud/gophercloud v1.13.0 h1:8iY9d1DAbzMW6Vok1AxbbK5ZaUjzMp0tdyt4fX9IeJ0= +github.com/gophercloud/gophercloud v1.13.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= @@ -599,14 +779,28 @@ github.com/gorilla/sessions v1.2.2/go.mod h1:ePLdVu+jbEgHH+KWw8I1z2wqd0BAdAQh/8L github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= +github.com/grafana/dskit v0.0.0-20231120170505-765e343eda4f h1:gyojr97YeWZ70pKNakWv5/tKwBHuLy3icnIeCo9gQr4= +github.com/grafana/dskit v0.0.0-20231120170505-765e343eda4f/go.mod h1:8dsy5tQOkeNQyjXpm5mQsbCu3H5uzeBD35MzRQFznKU= +github.com/grafana/gomemcache v0.0.0-20231023152154-6947259a0586 h1:/of8Z8taCPftShATouOrBVy6GaTTjgQd/VfNiZp/VXQ= +github.com/grafana/gomemcache v0.0.0-20231023152154-6947259a0586/go.mod h1:PGk3RjYHpxMM8HFPhKKo+vve3DdlPUELZLSDEFehPuU= +github.com/grafana/grafana-foundation-sdk/go v0.0.0-20240326122733-6f96a993222b h1:Msqs1nc2qWMxTriDCITKl58Td+7Md/RURmUmH7RXKns= +github.com/grafana/grafana-foundation-sdk/go v0.0.0-20240326122733-6f96a993222b/go.mod h1:WtWosval1KCZP9BGa42b8aVoJmVXSg0EvQXi9LDSVZQ= +github.com/grafana/loki v1.6.2-0.20231215164305-b51b7d7b5503 h1:gdrsYbmk8822v6qvPwZO5DC6QjnAW7uKJ9YXnoUmV8c= +github.com/grafana/loki v1.6.2-0.20231215164305-b51b7d7b5503/go.mod h1:d8seWXCEXkL42mhuIJYcGi6DxfehzoIpLrMQWJojvOo= +github.com/grafana/loki/pkg/push v0.0.0-20231201111602-11ef833ed3e4 h1:wQ0FnSeebhJIBkgYOD06Mxk9HV2KhtEG0hp/7R+5RUQ= +github.com/grafana/loki/pkg/push v0.0.0-20231201111602-11ef833ed3e4/go.mod h1:f3JSoxBTPXX5ec4FxxeC19nTBSxoTz+cBgS3cYLMcr0= github.com/grafana/pyroscope-go v1.1.2 h1:7vCfdORYQMCxIzI3NlYAs3FcBP760+gWuYWOyiVyYx8= github.com/grafana/pyroscope-go v1.1.2/go.mod h1:HSSmHo2KRn6FasBA4vK7BMiQqyQq8KSuBKvrhkXxYPU= github.com/grafana/pyroscope-go/godeltaprof v0.1.8 h1:iwOtYXeeVSAeYefJNaxDytgjKtUuKQbJqgAIjlnicKg= github.com/grafana/pyroscope-go/godeltaprof v0.1.8/go.mod h1:2+l7K7twW49Ct4wFluZD3tZ6e0SjanjcUUBPVD/UuGU= +github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc h1:GN2Lv3MGO7AS6PrRoT6yV5+wkrOpcszoIsO4+4ds248= +github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc/go.mod h1:+JKpmjMGhpgPL+rXZ5nsZieVzvarn86asRlBg4uNGnk= github.com/graph-gophers/dataloader v5.0.0+incompatible h1:R+yjsbrNq1Mo3aPG+Z/EKYrXrXXUNJHOgbRt+U6jOug= github.com/graph-gophers/dataloader v5.0.0+incompatible/go.mod h1:jk4jk0c5ZISbKaMe8WsVopGB5/15GvGHMdMdPtwlRp4= github.com/graph-gophers/graphql-go v1.5.0 h1:fDqblo50TEpD0LY7RXk/LFVYEVqo3+tXMNMPSVXA1yc= github.com/graph-gophers/graphql-go v1.5.0/go.mod h1:YtmJZDLbF1YYNrlNAuiO5zAStUWc3XZT07iGsVqe1Os= +github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA= +github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= @@ -620,6 +814,7 @@ github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4 github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys= github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= +github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= @@ -628,10 +823,18 @@ github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/b github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/api v1.29.2 h1:aYyRn8EdE2mSfG14S1+L9Qkjtz8RzmaWh6AcNGRNwPw= +github.com/hashicorp/consul/api v1.29.2/go.mod h1:0YObcaLNDSbtlgzIRtmRXI1ZkeuK0trCBxwZQ4MYnIk= +github.com/hashicorp/consul/proto-public v0.6.2 h1:+DA/3g/IiKlJZb88NBn0ZgXrxJp2NlvCZdEyl+qxvL0= +github.com/hashicorp/consul/proto-public v0.6.2/go.mod h1:cXXbOg74KBNGajC+o8RlA502Esf0R9prcoJgiOX/2Tg= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.16.1 h1:V8TxTnImoPD5cj0U9Spl0TUxcytjcbbJeADFF07KdHg= github.com/hashicorp/consul/sdk v0.16.1/go.mod h1:fSXvwxB2hmh1FMZCNl6PwX0Q/1wdWtHJcZ7Ea5tns0s= +github.com/hashicorp/cronexpr v1.1.2 h1:wG/ZYIKT+RT3QkOdgYc+xsKWVRgnxJ1OJtjjy84fJ9A= +github.com/hashicorp/cronexpr v1.1.2/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= +github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= @@ -648,23 +851,32 @@ github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjh github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= +github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-plugin v1.6.2 h1:zdGAEd0V1lCaU0u+MxWQhtSDQmahpkwOun8U8EiRVog= github.com/hashicorp/go-plugin v1.6.2/go.mod h1:CkgLQ5CZqNmdL9U9JzM532t8ZiYQ35+pj3b1FD37R0Q= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU= github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-sockaddr v1.0.6 h1:RSG8rKU28VTUTvEKghe5gIhIQpv8evvNpnDEyqO4u9I= +github.com/hashicorp/go-sockaddr v1.0.6/go.mod h1:uoUUmtwU7n9Dv3O4SNLeFvg0SxQ3lyjsj6+CCykpaxI= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= +github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -677,12 +889,21 @@ github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM= +github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= +github.com/hashicorp/nomad/api v0.0.0-20240717122358-3d93bd3778f3 h1:fgVfQ4AC1avVOnu2cfms8VAiD8lUq3vWI8mTocOXN/w= +github.com/hashicorp/nomad/api v0.0.0-20240717122358-3d93bd3778f3/go.mod h1:svtxn6QnrQ69P23VvIWMR34tg3vmwLz4UdUzm1dSCgE= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= +github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= +github.com/hetznercloud/hcloud-go/v2 v2.10.2 h1:9gyTUPhfNbfbS40Spgij5mV5k37bOZgt8iHKCbfGs5I= +github.com/hetznercloud/hcloud-go/v2 v2.10.2/go.mod h1:xQ+8KhIS62W0D78Dpi57jsufWh844gUw1az5OUvaeq8= github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 h1:X4egAf/gcS1zATw6wn4Ej8vjuVGxeHdan+bRb2ebyv4= github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4/go.mod h1:5GuXa7vkL8u9FkFuWdVvfR5ix8hRB7DbOAaYULamFpc= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= @@ -694,12 +915,16 @@ github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3 github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= +github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU= +github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= @@ -709,6 +934,8 @@ github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2 github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/invopop/jsonschema v0.12.0 h1:6ovsNSuvn9wEQVOyc72aycBMVQFKz7cPdMJn10CvzRI= github.com/invopop/jsonschema v0.12.0/go.mod h1:ffZ5Km5SWWRAIN6wbDXItl95euhFz2uON45H2qjYt+0= +github.com/ionos-cloud/sdk-go/v6 v6.1.11 h1:J/uRN4UWO3wCyGOeDdMKv8LWRzKu6UIkLEaes38Kzh8= +github.com/ionos-cloud/sdk-go/v6 v6.1.11/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= @@ -781,12 +1008,18 @@ github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2E github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8= +github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= @@ -798,8 +1031,11 @@ github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa02 github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM= github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= +github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b h1:udzkj9S/zlT5X367kqJis0QP7YMxobob6zhzq6Yre00= +github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b/go.mod h1:pcaDhQK0/NJZEvtCO0qQPPropqV0sJOJ6YW7X+9kRwM= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -826,10 +1062,17 @@ github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= +github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0= +github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= +github.com/linode/linodego v1.37.0 h1:B/2Spzv9jYXzKA+p+GD8fVCNJ7Wuw6P91ZDD9eCkkso= +github.com/linode/linodego v1.37.0/go.mod h1:L7GXKFD3PoN2xSEtFc04wIXP5WK65O10jYQx0PQISWQ= github.com/linxGnu/grocksdb v1.7.16 h1:Q2co1xrpdkr5Hx3Fp+f+f7fRGhQFQhvi/+226dtLmA8= github.com/linxGnu/grocksdb v1.7.16/go.mod h1:JkS7pl5qWpGpuVb3bPqTz8nC12X3YtPZT+Xq7+QfQo4= +github.com/lithammer/dedent v1.1.0 h1:VNzHMVCBNG1j0fh3OrsFRkVUwStdDArbgBWoPAffktY= +github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= github.com/logrusorgru/aurora v2.0.3+incompatible h1:tOpm7WcpBTn4fjmVfgpQq0EfczGlG91VSDkswnjF5A8= github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= @@ -859,6 +1102,7 @@ github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOA github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= @@ -871,12 +1115,20 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5 github.com/mfridman/interpolate v0.0.2 h1:pnuTK7MQIxxFz1Gr+rjSIx9u7qVjf5VOoM/u6BbAxPY= github.com/mfridman/interpolate v0.0.2/go.mod h1:p+7uk6oE07mpE/Ik1b8EckO0O4ZXiGAfshKBWLUM9Xg= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= +github.com/miekg/dns v1.1.61 h1:nLxbwF3XxhwVSm8g9Dghm9MHPaUZuqhPiGL+675ZmEs= +github.com/miekg/dns v1.1.61/go.mod h1:mnAarhS3nWaW+NVP2wTkYVIZyHNJ098SJZUki3eykwQ= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 h1:QRUSJEgZn2Snx0EmT/QLXibWjSUDjKWvXIT19NBVp94= github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= +github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -894,11 +1146,24 @@ github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyua github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= +github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= +github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= +github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= +github.com/moby/spdystream v0.4.0 h1:Vy79D6mHeJJjiPdFEL2yku1kl0chZpJfZcPpb16BRl8= +github.com/moby/spdystream v0.4.0/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI= +github.com/moby/sys/sequential v0.6.0 h1:qrx7XFUd/5DxtqcoH1h438hF5TmOvzC/lspjy7zgvCU= +github.com/moby/sys/sequential v0.6.0/go.mod h1:uyv8EUTrca5PnDsdMGXhZe6CCe8U/UiTWd+lL+7b/Ko= +github.com/moby/sys/user v0.3.0 h1:9ni5DlcW5an3SvRSx4MouotOygvzaXbaSrc/wGDFWPo= +github.com/moby/sys/user v0.3.0/go.mod h1:bG+tYYYJgaMtRKgEmuueC0hJEAZWwtIbZTB+85uoHjs= +github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g= +github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -908,6 +1173,8 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0= +github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/montanaflynn/stats v0.7.1 h1:etflOAAHORrCC44V+aR6Ftzort912ZU+YLiSTuV8eaE= github.com/montanaflynn/stats v0.7.1/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= @@ -922,6 +1189,10 @@ github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ib github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4= github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= @@ -933,6 +1204,7 @@ github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= +github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= @@ -948,35 +1220,53 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= -github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= +github.com/onsi/gomega v1.34.2 h1:pNCwDkzrsv7MS9kpaQvVb1aVLahQXyJ/Tv5oAZMI3i8= +github.com/onsi/gomega v1.34.2/go.mod h1:v1xfxRgk0KIsG+QOdm7p8UosrOzPYRo60fd3B/1Dukc= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= github.com/opencontainers/runc v1.1.10 h1:EaL5WeO9lv9wmS6SASjszOeQdSctvpbu0DdBQBizE40= github.com/opencontainers/runc v1.1.10/go.mod h1:+/R6+KmDlh+hOO8NkjmgkG9Qzvypzk0yXxAPYYR65+M= +github.com/opentracing-contrib/go-grpc v0.0.0-20210225150812-73cb765af46e h1:4cPxUYdgaGzZIT5/j0IfqOrrXmq6bG8AwvwisMXpdrg= +github.com/opentracing-contrib/go-grpc v0.0.0-20210225150812-73cb765af46e/go.mod h1:DYR5Eij8rJl8h7gblRrOZ8g0kW1umSpKqYIBTgeDtLo= +github.com/opentracing-contrib/go-stdlib v1.0.0 h1:TBS7YuVotp8myLon4Pv7BtCBzOTo1DeZCld0Z63mW2w= +github.com/opentracing-contrib/go-stdlib v1.0.0/go.mod h1:qtI1ogk+2JhVPIXVc6q+NHziSmy2W5GbdQZFUHADCBU= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= +github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU= +github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w= +github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks= +github.com/otiai10/mint v1.5.1/go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM= +github.com/ovh/go-ovh v1.6.0 h1:ixLOwxQdzYDx296sXcgS35TOPEahJkpjMGtzPadCjQI= +github.com/ovh/go-ovh v1.6.0/go.mod h1:cTVDnl94z4tl8pP1uZ/8jlVxntjSIf09bNcQ5TJSC7c= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= +github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0= +github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M= github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc= +github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 h1:hDSdbBuw3Lefr6R18ax0tZ2BJeNB3NehB3trOwYBsdU= github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/pierrec/lz4/v4 v4.1.18 h1:xaKrnTkyoqfh1YItXl56+6KJNVYWlEEPuAQW9xsplYQ= +github.com/pierrec/lz4/v4 v4.1.18/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -989,14 +1279,19 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/pressly/goose/v3 v3.21.1 h1:5SSAKKWej8LVVzNLuT6KIvP1eFDuPvxa+B6H0w78buQ= github.com/pressly/goose/v3 v3.21.1/go.mod h1:sqthmzV8PitchEkjecFJII//l43dLOCzfWh8pHEe+vE= +github.com/prometheus/alertmanager v0.27.0 h1:V6nTa2J5V4s8TG4C4HtrBP/WNSebCCTYGGv4qecA/+I= +github.com/prometheus/alertmanager v0.27.0/go.mod h1:8Ia/R3urPmbzJ8OsdvmZvIprDwvwmYCmUbwBL+jlPOE= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y= github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -1009,12 +1304,21 @@ github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7q github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.60.0 h1:+V9PAREWNvJMAuJ1x1BaWl9dewMW4YrHZQbx0sJNllA= github.com/prometheus/common v0.60.0/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= +github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= +github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= +github.com/prometheus/exporter-toolkit v0.11.0 h1:yNTsuZ0aNCNFQ3aFTD2uhPOvr4iD7fdBvKPAEGkNf+g= +github.com/prometheus/exporter-toolkit v0.11.0/go.mod h1:BVnENhnNecpwoTLiABx7mrPB/OLRIgN74qlQbV+FK1Q= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/prometheus/prometheus v0.54.1 h1:vKuwQNjnYN2/mDoWfHXDhAsz/68q/dQDb+YbcEqU7MQ= @@ -1044,6 +1348,7 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= @@ -1064,16 +1369,25 @@ github.com/santhosh-tekuri/jsonschema/v5 v5.3.1/go.mod h1:uToXkOrWAZ6/Oc07xWQrPO github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.29 h1:BkTk4gynLjguayxrYxZoMZjBnAOh7ntQvUkOFmkMqPU= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.29/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= github.com/scylladb/go-reflectx v1.0.1 h1:b917wZM7189pZdlND9PbIJ6NQxfDPfBvUaQ7cjj1iZQ= github.com/scylladb/go-reflectx v1.0.1/go.mod h1:rWnOfDIRWBGN0miMLIcoPt/Dhi2doCMZqwMCJ3KupFc= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/sercand/kuberesolver/v5 v5.1.1 h1:CYH+d67G0sGBj7q5wLK61yzqJJ8gLLC8aeprPTHb6yY= +github.com/sercand/kuberesolver/v5 v5.1.1/go.mod h1:Fs1KbKhVRnB2aDWN12NjKCB+RgYMWZJ294T3BtmVCpQ= +github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= +github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sethvargo/go-retry v0.2.4 h1:T+jHEQy/zKJf5s95UkguisicE0zuF9y7+/vgz08Ocec= github.com/sethvargo/go-retry v0.2.4/go.mod h1:1afjQuvh7s4gflMObvjLPaWgluLLyhA1wmVZ6KLpICw= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= +github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= +github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= @@ -1084,6 +1398,7 @@ github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeV github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartcontractkit/ccip-owner-contracts v0.0.0-20240926212305-a6deabdfce86 h1:qQH6fZZe31nBAG6INHph3z5ysDTPptyu0TR9uoJ1+ok= @@ -1092,8 +1407,8 @@ github.com/smartcontractkit/chain-selectors v1.0.29 h1:aZ9+OoUSMn4nqnissHtDvDoKR github.com/smartcontractkit/chain-selectors v1.0.29/go.mod h1:xsKM0aN3YGcQKTPRPDDtPx2l4mlTN1Djmg0VVXV40b8= github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgBc2xpDKBco/Q4h4ydl6+UUU= github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20241112095015-3e85d9f1898b h1:4kmZtaQ4fXwduHnw9xk5VmiIOW4nHg/Mx6iidlZJt5o= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20241112095015-3e85d9f1898b/go.mod h1:4adKaHNaxFsRvV/lYfqtbsWyyvIPUMLR0FdOJN/ljis= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20241118091009-43c2b4804cec h1:5vS1k8Qn09p8SQ3JzvS8iy4Pve7s3aVq+UPIdl74smY= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20241118091009-43c2b4804cec/go.mod h1:4adKaHNaxFsRvV/lYfqtbsWyyvIPUMLR0FdOJN/ljis= github.com/smartcontractkit/chainlink-common v0.3.1-0.20241114134822-aadff98ef068 h1:2llRW4Tn9W/EZp2XvXclQ9IjeTBwwxVPrrqaerX+vCE= github.com/smartcontractkit/chainlink-common v0.3.1-0.20241114134822-aadff98ef068/go.mod h1:ny87uTW6hLjCTLiBqBRNFEhETSXhHWevYlPclT5lSco= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20241017133723-5277829bd53f h1:BwrIaQIx5Iy6eT+DfLhFfK2XqjxRm74mVdlX8gbu4dw= @@ -1110,6 +1425,14 @@ github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241118190857-e2db20a6a96 github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241118190857-e2db20a6a969/go.mod h1:mGmRvlk54ufCufV4EBWizOGtXoXfePoFAuYEVC8EwdY= github.com/smartcontractkit/chainlink-starknet/relayer v0.1.1-0.20241017135645-176a23722fd8 h1:B4DFdk6MGcQnoCjjMBCx7Z+GWQpxRWJ4O8W/dVJyWGA= github.com/smartcontractkit/chainlink-starknet/relayer v0.1.1-0.20241017135645-176a23722fd8/go.mod h1:WkBqgBo+g34Gm5vWkDDl8Fh3Mzd7bF5hXp7rryg0t5o= +github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.13 h1:T0kbw07Vb6xUyA9MIJZfErMgWseWi1zf7cYvRpoq7ug= +github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.13/go.mod h1:1CKUOzoK+Ga19WuhRH9pxZ+qUUnrlIx108VEA6qSzeQ= +github.com/smartcontractkit/chainlink-testing-framework/lib/grafana v1.50.0 h1:VIxK8u0Jd0Q/VuhmsNm6Bls6Tb31H/sA3A/rbc5hnhg= +github.com/smartcontractkit/chainlink-testing-framework/lib/grafana v1.50.0/go.mod h1:lyAu+oMXdNUzEDScj2DXB2IueY+SDXPPfyl/kb63tMM= +github.com/smartcontractkit/chainlink-testing-framework/seth v1.50.5 h1:BxN9wddNLiugruN3k7nYoSMQTO0tz9qR+vILFW2l0Ps= +github.com/smartcontractkit/chainlink-testing-framework/seth v1.50.5/go.mod h1:lJk0atEJ5Zyo3Tqrmf1Pl9jUEe79EgDb9bD3K5OTUBI= +github.com/smartcontractkit/chainlink-testing-framework/wasp v1.50.2 h1:7bCdbTUWzyczQg+kwHCxlx6y07zE8HNB8+ntTne6qd8= +github.com/smartcontractkit/chainlink-testing-framework/wasp v1.50.2/go.mod h1:MltlNu3jcXm/DyLN98I5TFNtu/o1NNAcaPAFKMXWk70= github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 h1:12ijqMM9tvYVEm+nR826WsrNi6zCKpwBhuApq127wHs= github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7/go.mod h1:FX7/bVdoep147QQhsOPkYsPEXhGZjeYx6lBSaSXtZOA= github.com/smartcontractkit/libocr v0.0.0-20241007185508-adbe57025f12 h1:NzZGjaqez21I3DU7objl3xExTH4fxYvzTqar8DC6360= @@ -1123,6 +1446,10 @@ github.com/smartcontractkit/wsrpc v0.8.2/go.mod h1:2u/wfnhl5R4RlSXseN4n6HHIWk8w1 github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= +github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= +github.com/sony/gobreaker v0.5.0 h1:dRCvqm0P490vZPmy7ppEk2qCnCieBooFJ+YoXGYB+yg= +github.com/sony/gobreaker v0.5.0/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= @@ -1132,6 +1459,7 @@ github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= @@ -1186,6 +1514,8 @@ github.com/teris-io/shortid v0.0.0-20201117134242-e59966efd125 h1:3SNcvBmEPE1YlB github.com/teris-io/shortid v0.0.0-20201117134242-e59966efd125/go.mod h1:M8agBzgqHIhgj7wEn9/0hJUZcrvt9VY+Ln+S1I5Mha0= github.com/test-go/testify v1.1.4 h1:Tf9lntrKUMHiXQ07qBScBTSA0dhYQlu83hswqelv1iE= github.com/test-go/testify v1.1.4/go.mod h1:rH7cfJo/47vWGdi4GPj16x3/t1xGOj2YxzmNQzk2ghU= +github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= +github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= github.com/theodesp/go-heaps v0.0.0-20190520121037-88e35354fe0a h1:YuO+afVc3eqrjiCUizNCxI53bl/BnPiVwXqLzqYTqgU= github.com/theodesp/go-heaps v0.0.0-20190520121037-88e35354fe0a/go.mod h1:/sfW47zCZp9FrtGcWyo1VjbgDaodxX9ovZvgLb/MxaA= github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= @@ -1212,6 +1542,10 @@ github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= +github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= +github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= +github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= @@ -1236,6 +1570,8 @@ github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyC github.com/valyala/fastjson v1.4.1 h1:hrltpHpIpkaxll8QltMU8c3QZ5+qIiCL8yKqPFJI/yE= github.com/valyala/fastjson v1.4.1/go.mod h1:nV6MsjxL2IMJQUoHDIrjEI7oLyeqK6aBD7EFWPsvP8o= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= +github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= +github.com/vultr/govultr/v2 v2.17.2/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49cAp50dzXI= github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc= github.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+xBAnxjb1X5vnTw= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= @@ -1244,15 +1580,20 @@ github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ= +github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4= github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/yuin/gopher-lua v1.1.0 h1:BojcDhfyDWgU2f2TOzYK/g5p2gxMrku8oupLDqlnSqE= +github.com/yuin/gopher-lua v1.1.0/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= @@ -1272,6 +1613,12 @@ go.dedis.ch/protobuf v1.0.11/go.mod h1:97QR256dnkimeNdfmURz0wAMNVbd1VmLXhG1CrTYr go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI= go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE= +go.etcd.io/etcd/api/v3 v3.5.14 h1:vHObSCxyB9zlF60w7qzAdTcGaglbJOpSj1Xj9+WGxq0= +go.etcd.io/etcd/api/v3 v3.5.14/go.mod h1:BmtWcRlQvwa1h3G2jvKYwIQy4PkHlDej5t7uLMUdJUU= +go.etcd.io/etcd/client/pkg/v3 v3.5.14 h1:SaNH6Y+rVEdxfpA2Jr5wkEvN6Zykme5+YnbCkxvuWxQ= +go.etcd.io/etcd/client/pkg/v3 v3.5.14/go.mod h1:8uMgAokyG1czCtIdsq+AGyYQMvpIKnSvPjFMunkgeZI= +go.etcd.io/etcd/client/v3 v3.5.14 h1:CWfRs4FDaDoSz81giL7zPpZH2Z35tbOrAJkkjMqOupg= +go.etcd.io/etcd/client/v3 v3.5.14/go.mod h1:k3XfdV/VIHy/97rqWjoUzrj9tk7GgJGH9J8L4dNXmAk= go.mongodb.org/mongo-driver v1.11.0/go.mod h1:s7p5vEtfbeR1gYi6pnj3c3/urpbLv2T5Sfd6Rp2HBB8= go.mongodb.org/mongo-driver v1.15.0 h1:rJCKC8eEliewXjZGf0ddURtl7tTVy1TK3bfl0gkUSLc= go.mongodb.org/mongo-driver v1.15.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c= @@ -1284,6 +1631,10 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/collector/pdata v1.12.0 h1:Xx5VK1p4VO0md8MWm2icwC1MnJ7f8EimKItMWw46BmA= +go.opentelemetry.io/collector/pdata v1.12.0/go.mod h1:MYeB0MmMAxeM0hstCFrCqWLzdyeYySim2dG6pDT6nYI= +go.opentelemetry.io/collector/semconv v0.105.0 h1:8p6dZ3JfxFTjbY38d8xlQGB1TQ3nPUvs+D0RERniZ1g= +go.opentelemetry.io/collector/semconv v0.105.0/go.mod h1:yMVUCNoQPZVq/IPfrHrnntZTWsLf5YGZ7qwKulIl5hw= go.opentelemetry.io/contrib/detectors/gcp v1.31.0 h1:G1JQOreVrfhRkner+l4mrGxmfqYCAuy76asTDAo0xsA= go.opentelemetry.io/contrib/detectors/gcp v1.31.0/go.mod h1:tzQL6E1l+iV44YFTkcAeNQqzXUiekSYP9jjJjXwEd00= go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.49.0 h1:1f31+6grJmV3X4lxcEvUy13i5/kfDw1nJZwhd8mA4tg= @@ -1332,6 +1683,8 @@ go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HY go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= +go.starlark.net v0.0.0-20230525235612-a134d8f9ddca h1:VdD38733bfYv5tUZwEIskMM93VanwNIi5bIKnDrJdEY= +go.starlark.net v0.0.0-20230525235612-a134d8f9ddca/go.mod h1:jxU+3+j+71eXOW14274+SmmuW82qJzl6iZSeqEtTGds= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -1360,6 +1713,8 @@ go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +go4.org/netipx v0.0.0-20230125063823-8449b0a6169f h1:ketMxHg+vWm3yccyYiq+uK8D3fRmna2Fcj+awpQp84s= +go4.org/netipx v0.0.0-20230125063823-8449b0a6169f/go.mod h1:tgPU4N2u9RByaTN3NC2p9xOzyFpte4jYwsIIRF7XlSc= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.11.0 h1:KXV8WWKCXm6tRpLirl2szsO5j/oOODwZf4hATmGVNs4= golang.org/x/arch v0.11.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= @@ -1372,6 +1727,7 @@ golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaE golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -1380,9 +1736,11 @@ golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= @@ -1440,28 +1798,41 @@ golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190921015927-1a5e07d1ff72/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210331212208-0fccb6fa2b5c/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= @@ -1471,6 +1842,7 @@ golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1480,7 +1852,9 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1511,32 +1885,47 @@ golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210331175145-43e1dd70ce54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1545,10 +1934,13 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1562,6 +1954,8 @@ golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXR golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= @@ -1576,6 +1970,7 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= @@ -1602,6 +1997,7 @@ golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191010075000-0337d82405ff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1624,8 +2020,18 @@ golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= @@ -1643,6 +2049,8 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da h1:noIWHXmPHxILtqtCOPIhSt0ABwskkZKjD3bXGnZGpNY= golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= +gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= +gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= gonum.org/v1/gonum v0.15.1 h1:FNy7N6OUZVUaWG9pTiD+jlhdQ3lMP+/LcTpJ6+a8sQ0= gonum.org/v1/gonum v0.15.1/go.mod h1:eZTZuRFrzu5pcyjN5wJhcIhnUdNijYxX1T2IcrOGY0o= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= @@ -1655,8 +2063,13 @@ google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsb google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= google.golang.org/api v0.202.0 h1:y1iuVHMqokQbimW79ZqPZWo4CiyFu6HcCYHwSNyzlfo= google.golang.org/api v0.202.0/go.mod h1:3Jjeq7M/SFblTNCp7ES2xhq+WvGL0KeXI0joHQBfwTQ= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= @@ -1665,6 +2078,9 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.2/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1684,11 +2100,21 @@ google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvx google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200324203455-a04cca1dde73/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210401141331-865547bb08e2/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20241021214115-324edc3d5d38 h1:Q3nlH8iSQSRUwOskjbcSMcF2jiYMNiQYZ0c2KEJLKKU= google.golang.org/genproto v0.0.0-20241021214115-324edc3d5d38/go.mod h1:xBI+tzfqGGN2JBeSebfKXFSdBpWVQ7sLW40PTupVRm4= @@ -1696,6 +2122,7 @@ google.golang.org/genproto/googleapis/api v0.0.0-20241021214115-324edc3d5d38 h1: google.golang.org/genproto/googleapis/api v0.0.0-20241021214115-324edc3d5d38/go.mod h1:vuAjtvlwkDKF6L1GQ0SokiRLCGFfeBUXWr/aFFkHACc= google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 h1:zciRKQ4kBpFgpfC5QQCVtnnNAcLIqweL7plyZRQHVpI= google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= +google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1708,6 +2135,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= @@ -1723,6 +2152,7 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= @@ -1737,6 +2167,8 @@ gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= +gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= @@ -1778,17 +2210,26 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= k8s.io/api v0.31.1 h1:Xe1hX/fPW3PXYYv8BlozYqw63ytA92snr96zMW9gWTU= k8s.io/api v0.31.1/go.mod h1:sbN1g6eY6XVLeqNsZGLnI5FwVseTrZX7Fv3O26rhAaI= +k8s.io/apiextensions-apiserver v0.31.0 h1:fZgCVhGwsclj3qCw1buVXCV6khjRzKC5eCFt24kyLSk= +k8s.io/apiextensions-apiserver v0.31.0/go.mod h1:b9aMDEYaEe5sdK+1T0KU78ApR/5ZVp4i56VacZYEHxk= k8s.io/apimachinery v0.31.1 h1:mhcUBbj7KUjaVhyXILglcVjuS4nYXiwC+KKFBgIVy7U= k8s.io/apimachinery v0.31.1/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/cli-runtime v0.31.1 h1:/ZmKhmZ6hNqDM+yf9s3Y4KEYakNXUn5sod2LWGGwCuk= +k8s.io/cli-runtime v0.31.1/go.mod h1:pKv1cDIaq7ehWGuXQ+A//1OIF+7DI+xudXtExMCbe9U= k8s.io/client-go v0.31.1 h1:f0ugtWSbWpxHR7sjVpQwuvw9a3ZKLXX0u0itkFXufb0= k8s.io/client-go v0.31.1/go.mod h1:sKI8871MJN2OyeqRlmA4W4KM9KBdBUpDLu/43eGemCg= +k8s.io/component-base v0.31.1 h1:UpOepcrX3rQ3ab5NB6g5iP0tvsgJWzxTyAo20sgYSy8= +k8s.io/component-base v0.31.1/go.mod h1:WGeaw7t/kTsqpVTaCoVEtillbqAhF2/JgvO0LDOMa0w= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20240709000822-3c01b740850f h1:2sXuKesAYbRHxL3aE2PN6zX/gcJr22cjrsej+W784Tc= k8s.io/kube-openapi v0.0.0-20240709000822-3c01b740850f/go.mod h1:UxDHUPsUwTOOxSU+oXURfFBcAS6JwiRXTYqYwfuGowc= +k8s.io/kubectl v0.31.1 h1:ih4JQJHxsEggFqDJEHSOdJ69ZxZftgeZvYo7M/cpp24= +k8s.io/kubectl v0.31.1/go.mod h1:aNuQoR43W6MLAtXQ/Bu4GDmoHlbhHKuyD49lmTC8eJM= k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6 h1:5D53IMaUuA5InSeMu9eJtlQXS2NxAhyWQvkKEgXZhHI= @@ -1816,8 +2257,14 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= +sigs.k8s.io/controller-runtime v0.19.0 h1:nWVM7aq+Il2ABxwiCizrVDSlmDcshi9llbaFbC0ji/Q= +sigs.k8s.io/controller-runtime v0.19.0/go.mod h1:iRmWllt8IlaLjvTTDLhRBXIEtkCK6hwVBJJsYS9Ajf4= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/kustomize/api v0.17.2 h1:E7/Fjk7V5fboiuijoZHgs4aHuexi5Y2loXlVOAVAG5g= +sigs.k8s.io/kustomize/api v0.17.2/go.mod h1:UWTz9Ct+MvoeQsHcJ5e+vziRRkwimm3HytpZgIYqye0= +sigs.k8s.io/kustomize/kyaml v0.17.1 h1:TnxYQxFXzbmNG6gOINgGWQt09GghzgTP6mIurOgrLCQ= +sigs.k8s.io/kustomize/kyaml v0.17.1/go.mod h1:9V0mCjIEYjlXuCdYsSXvyoy2BTsLESH7TlGV81S282U= sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= diff --git a/core/services/keystore/keys/vrfkey/private_key.go b/core/services/keystore/keys/vrfkey/private_key.go deleted file mode 100644 index dd2545fdd28..00000000000 --- a/core/services/keystore/keys/vrfkey/private_key.go +++ /dev/null @@ -1,83 +0,0 @@ -package vrfkey - -import ( - "encoding/json" - "fmt" - - "github.com/ethereum/go-ethereum/accounts/keystore" - "github.com/google/uuid" - "github.com/pkg/errors" - "go.dedis.ch/kyber/v3" - - "github.com/smartcontractkit/chainlink/v2/core/services/signatures/secp256k1" -) - -// PrivateKey represents the secret used to construct a VRF proof. -// -// Don't serialize directly, use Encrypt method, with user-supplied passphrase. -// The unencrypted PrivateKey struct should only live in-memory. -// -// Only use it if you absolutely need it (i.e., for a novel crypto protocol.) -// Implement whatever cryptography you need on this struct, so your callers -// don't need to know the secret key explicitly. (See, e.g., MarshaledProof.) -type PrivateKey struct { - k kyber.Scalar - PublicKey secp256k1.PublicKey -} - -func (k PrivateKey) ToV2() KeyV2 { - return KeyV2{ - k: &k.k, - PublicKey: k.PublicKey, - } -} - -// fromGethKey returns the vrfkey representation of gethKey. Do not abuse this -// to convert an ethereum key into a VRF key! -func fromGethKey(gethKey *keystore.Key) *PrivateKey { - secretKey := secp256k1.IntToScalar(gethKey.PrivateKey.D) - rawPublicKey, err := secp256k1.ScalarToPublicPoint(secretKey).MarshalBinary() - if err != nil { - panic(err) // Only way this can happen is out-of-memory failure - } - var publicKey secp256k1.PublicKey - copy(publicKey[:], rawPublicKey) - return &PrivateKey{secretKey, publicKey} -} - -func (k *PrivateKey) String() string { - return fmt.Sprintf("PrivateKey{k: <redacted>, PublicKey: %s}", k.PublicKey) -} - -// GoString reduces the risk of accidentally logging the private key -func (k *PrivateKey) GoString() string { - return k.String() -} - -// Decrypt returns the PrivateKey in e, decrypted via auth, or an error -func Decrypt(e EncryptedVRFKey, auth string) (*PrivateKey, error) { - // NOTE: We do this shuffle to an anonymous struct - // solely to add a throwaway UUID, so we can leverage - // the keystore.DecryptKey from the geth which requires it - // as of 1.10.0. - keyJSON, err := json.Marshal(struct { - Address string `json:"address"` - Crypto keystore.CryptoJSON `json:"crypto"` - Version int `json:"version"` - Id string `json:"id"` - }{ - Address: e.VRFKey.Address, - Crypto: e.VRFKey.Crypto, - Version: e.VRFKey.Version, - Id: uuid.New().String(), - }) - if err != nil { - return nil, errors.Wrapf(err, "while marshaling key for decryption") - } - gethKey, err := keystore.DecryptKey(keyJSON, adulteratedPassword(auth)) - if err != nil { - return nil, errors.Wrapf(err, "could not decrypt VRF key %s", - e.PublicKey.String()) - } - return fromGethKey(gethKey), nil -} diff --git a/core/services/keystore/keys/vrfkey/private_key_test.go b/core/services/keystore/keys/vrfkey/private_key_test.go deleted file mode 100644 index a4010e780df..00000000000 --- a/core/services/keystore/keys/vrfkey/private_key_test.go +++ /dev/null @@ -1,40 +0,0 @@ -package vrfkey - -import ( - "encoding/json" - "fmt" - "testing" - - "github.com/ethereum/go-ethereum/accounts/keystore" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" - "github.com/smartcontractkit/chainlink/v2/core/utils" -) - -func TestVRFKeys_PrivateKey(t *testing.T) { - jsonKey := `{"PublicKey":"0xd2377bc6be8a2c5ce163e1867ee42ef111e320686f940a98e52e9c019ca0606800","vrf_key":{"address":"b94276ad4e5452732ec0cccf30ef7919b67844b6","crypto":{"cipher":"aes-128-ctr","ciphertext":"ff66d61d02dba54a61bab1ceb8414643f9e76b7351785d2959e2c8b50ee69a92","cipherparams":{"iv":"75705da271b11e330a27b8d593a3930c"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"efe5b372e4fe79d0af576a79d65a1ee35d0792d9c92b70107b5ada1817ea7c7b"},"mac":"e4d0bb08ffd004ab03aeaa42367acbd9bb814c6cfd981f5157503f54c30816e7"},"version":3}}` - k, err := FromEncryptedJSON([]byte(jsonKey), "p4SsW0rD1!@#_") - require.NoError(t, err) - cryptoJSON, err := keystore.EncryptKey(k.toGethKey(), adulteratedPassword(testutils.Password), utils.FastScryptParams.N, utils.FastScryptParams.P) - require.NoError(t, err) - var gethKey gethKeyStruct - err = json.Unmarshal(cryptoJSON, &gethKey) - require.NoError(t, err) - - ek := EncryptedVRFKey{ - PublicKey: k.PublicKey, - VRFKey: gethKey, - } - - pk, err := Decrypt(ek, testutils.Password) - require.NoError(t, err) - _, err = Decrypt(ek, "wrong-password") - assert.Error(t, err) - - kv2 := pk.ToV2() - - assert.Equal(t, fmt.Sprintf("VRFKeyV2{PublicKey: %s}", kv2.PublicKey), kv2.String()) - assert.Equal(t, fmt.Sprintf("PrivateKey{k: <redacted>, PublicKey: %s}", pk.PublicKey), pk.String()) -} diff --git a/core/services/keystore/keys/vrfkey/public_key_test.go b/core/services/signatures/secp256k1/public_key_test.go similarity index 77% rename from core/services/keystore/keys/vrfkey/public_key_test.go rename to core/services/signatures/secp256k1/public_key_test.go index 70c26ae27fe..eabce44968f 100644 --- a/core/services/keystore/keys/vrfkey/public_key_test.go +++ b/core/services/signatures/secp256k1/public_key_test.go @@ -1,10 +1,8 @@ -package vrfkey +package secp256k1 import ( "testing" - "github.com/smartcontractkit/chainlink/v2/core/services/signatures/secp256k1" - "github.com/smartcontractkit/chainlink/v2/core/services/signatures/cryptotest" "github.com/stretchr/testify/assert" @@ -14,12 +12,12 @@ import ( func TestValueScanIdentityPointSet(t *testing.T) { randomStream := cryptotest.NewStream(t, 0) for i := 0; i < 10; i++ { - p := suite.Point().Pick(randomStream) - var pk, nPk, nnPk secp256k1.PublicKey + p := NewBlakeKeccackSecp256k1().Point().Pick(randomStream) + var pk, nPk, nnPk PublicKey marshaledKey, err := p.MarshalBinary() require.NoError(t, err, "failed to marshal public key") require.Equal(t, copy(pk[:], marshaledKey), - secp256k1.CompressedPublicKeyLength, "failed to copy marshaled key to pk") + CompressedPublicKeyLength, "failed to copy marshaled key to pk") assert.NotEqual(t, pk, nPk, "equality test succeeds on different keys!") np, err := pk.Point() require.NoError(t, err, "failed to marshal public key") @@ -37,7 +35,7 @@ func TestValueScanIdentityPointSet(t *testing.T) { // Tests that PublicKey.Hash gives the same result as the VRFCoordinator's func TestHash(t *testing.T) { - pk, err := secp256k1.NewPublicKeyFromHex("0x9dc09a0f898f3b5e8047204e7ce7e44b587920932f08431e29c9bf6923b8450a01") + pk, err := NewPublicKeyFromHex("0x9dc09a0f898f3b5e8047204e7ce7e44b587920932f08431e29c9bf6923b8450a01") assert.NoError(t, err) assert.Equal(t, "0xc4406d555db624837188b91514a5f47e34d825d935ab887a35c06a3e7c41de69", pk.MustHash().String()) } diff --git a/core/web/assets/index.html b/core/web/assets/index.html index b4327b8f308..d5b24848b5d 100644 --- a/core/web/assets/index.html +++ b/core/web/assets/index.html @@ -1 +1 @@ -<!doctype html><html><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>Operator UI</title><link rel="shortcut icon" href="https://smartcontract.imgix.net/chainlink.ico?auto=compress%2Cformat"/><link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet"/><link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"/><link href="/favicon.ico" rel="shortcut icon" type="image/x-icon"/><title>Chainlink</title><script defer="defer" src="/assets/main.1d1632f9bf7627b5ea5e.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html> \ No newline at end of file +<!doctype html><html><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>Operator UI</title><link rel="shortcut icon" href="https://smartcontract.imgix.net/chainlink.ico?auto=compress%2Cformat"/><link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet"/><link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"/><link href="/favicon.ico" rel="shortcut icon" type="image/x-icon"/><title>Chainlink</title><script defer="defer" src="/assets/main.57f94389bc8271642420.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html> \ No newline at end of file diff --git a/core/web/assets/index.html.gz b/core/web/assets/index.html.gz index 4d4296b8676..6ab5d6b95af 100644 Binary files a/core/web/assets/index.html.gz and b/core/web/assets/index.html.gz differ diff --git a/core/web/assets/main.1d1632f9bf7627b5ea5e.js b/core/web/assets/main.57f94389bc8271642420.js similarity index 93% rename from core/web/assets/main.1d1632f9bf7627b5ea5e.js rename to core/web/assets/main.57f94389bc8271642420.js index 6707f6d377a..99b5c06781a 100644 --- a/core/web/assets/main.1d1632f9bf7627b5ea5e.js +++ b/core/web/assets/main.57f94389bc8271642420.js @@ -168,7 +168,7 @@ object-assign * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */ Object.defineProperty(t,"__esModule",{value:!0}),"undefined"==typeof window||"function"!=typeof MessageChannel){var n,r,i,a,o,s=null,u=null,c=function(){if(null!==s)try{var e=t.unstable_now();s(!0,e),s=null}catch(n){throw setTimeout(c,0),n}},l=Date.now();t.unstable_now=function(){return Date.now()-l},n=function(e){null!==s?setTimeout(n,0,e):(s=e,setTimeout(c,0))},r=function(e,t){u=setTimeout(e,t)},i=function(){clearTimeout(u)},a=function(){return!1},o=t.unstable_forceFrameRate=function(){}}else{var f=window.performance,d=window.Date,h=window.setTimeout,p=window.clearTimeout;if("undefined"!=typeof console){var b=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof b&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof f&&"function"==typeof f.now)t.unstable_now=function(){return f.now()};else{var m=d.now();t.unstable_now=function(){return d.now()-m}}var g=!1,v=null,y=-1,w=5,_=0;a=function(){return t.unstable_now()>=_},o=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):w=0<e?Math.floor(1e3/e):5};var E=new MessageChannel,S=E.port2;E.port1.onmessage=function(){if(null!==v){var e=t.unstable_now();_=e+w;try{v(!0,e)?S.postMessage(null):(g=!1,v=null)}catch(n){throw S.postMessage(null),n}}else g=!1},n=function(e){v=e,g||(g=!0,S.postMessage(null))},r=function(e,n){y=h(function(){e(t.unstable_now())},n)},i=function(){p(y),y=-1}}function k(e,t){var n=e.length;e.push(t);a:for(;;){var r=Math.floor((n-1)/2),i=e[r];if(void 0!==i&&0<M(i,t))e[r]=t,e[n]=i,n=r;else break a}}function x(e){return void 0===(e=e[0])?null:e}function T(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,i=e.length;r<i;){var a=2*(r+1)-1,o=e[a],s=a+1,u=e[s];if(void 0!==o&&0>M(o,n))void 0!==u&&0>M(u,o)?(e[r]=u,e[s]=n,r=s):(e[r]=o,e[a]=n,r=a);else if(void 0!==u&&0>M(u,n))e[r]=u,e[s]=n,r=s;else break a}}return t}return null}function M(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var O=[],A=[],L=1,C=null,I=3,D=!1,N=!1,P=!1;function R(e){for(var t=x(A);null!==t;){if(null===t.callback)T(A);else if(t.startTime<=e)T(A),t.sortIndex=t.expirationTime,k(O,t);else break;t=x(A)}}function j(e){if(P=!1,R(e),!N){if(null!==x(O))N=!0,n(F);else{var t=x(A);null!==t&&r(j,t.startTime-e)}}}function F(e,n){N=!1,P&&(P=!1,i()),D=!0;var o=I;try{for(R(n),C=x(O);null!==C&&(!(C.expirationTime>n)||e&&!a());){var s=C.callback;if(null!==s){C.callback=null,I=C.priorityLevel;var u=s(C.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?C.callback=u:C===x(O)&&T(O),R(n)}else T(O);C=x(O)}if(null!==C)var c=!0;else{var l=x(A);null!==l&&r(j,l.startTime-n),c=!1}return c}finally{C=null,I=o,D=!1}}function Y(e){switch(e){case 1:return -1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var B=o;t.unstable_ImmediatePriority=1,t.unstable_UserBlockingPriority=2,t.unstable_NormalPriority=3,t.unstable_IdlePriority=5,t.unstable_LowPriority=4,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=I;I=e;try{return t()}finally{I=n}},t.unstable_next=function(e){switch(I){case 1:case 2:case 3:var t=3;break;default:t=I}var n=I;I=t;try{return e()}finally{I=n}},t.unstable_scheduleCallback=function(e,a,o){var s=t.unstable_now();if("object"==typeof o&&null!==o){var u=o.delay;u="number"==typeof u&&0<u?s+u:s,o="number"==typeof o.timeout?o.timeout:Y(e)}else o=Y(e),u=s;return o=u+o,e={id:L++,callback:a,priorityLevel:e,startTime:u,expirationTime:o,sortIndex:-1},u>s?(e.sortIndex=u,k(A,e),null===x(O)&&e===x(A)&&(P?i():P=!0,r(j,u-s))):(e.sortIndex=o,k(O,e),N||D||(N=!0,n(F))),e},t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_wrapCallback=function(e){var t=I;return function(){var n=I;I=t;try{return e.apply(this,arguments)}finally{I=n}}},t.unstable_getCurrentPriorityLevel=function(){return I},t.unstable_shouldYield=function(){var e=t.unstable_now();R(e);var n=x(O);return n!==C&&null!==C&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<C.expirationTime||a()},t.unstable_requestPaint=B,t.unstable_continueExecution=function(){N||D||(N=!0,n(F))},t.unstable_pauseExecution=function(){},t.unstable_getFirstCallbackNode=function(){return x(O)},t.unstable_Profiling=null},63840(e,t,n){"use strict";e.exports=n(60053)},36582(e,t){"use strict";t.Q=o,n=s;var n,r="",i=" ",a=/[ \t\n\r\f]+/g;function o(e){var t=String(e||r).trim();return t===r?[]:t.split(a)}function s(e){return e.join(i).trim()}},42830(e,t,n){e.exports=i;var r=n(17187).EventEmitter;function i(){r.call(this)}n(35717)(i,r),i.Readable=n(79481),i.Writable=n(64229),i.Duplex=n(56753),i.Transform=n(74605),i.PassThrough=n(82725),i.finished=n(8610),i.pipeline=n(59946),i.Stream=i,i.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function a(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",a),e._isStdio||t&&!1===t.end||(n.on("end",s),n.on("close",u));var o=!1;function s(){o||(o=!0,e.end())}function u(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(l(),0===r.listenerCount(this,"error"))throw e}function l(){n.removeListener("data",i),e.removeListener("drain",a),n.removeListener("end",s),n.removeListener("close",u),n.removeListener("error",c),e.removeListener("error",c),n.removeListener("end",l),n.removeListener("close",l),e.removeListener("close",l)}return n.on("error",c),e.on("error",c),n.on("end",l),n.on("close",l),e.on("close",l),e.emit("pipe",n),e}},32553(e,t,n){"use strict";var r=n(40396).Buffer,i=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(e){var t;if(!e)return"utf8";for(;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function o(e){var t=a(e);if("string"!=typeof t&&(r.isEncoding===i||!i(e)))throw Error("Unknown encoding: "+e);return t||e}function s(e){var t;switch(this.encoding=o(e),this.encoding){case"utf16le":this.text=p,this.end=b,t=4;break;case"utf8":this.fillLast=f,t=4;break;case"base64":this.text=m,this.end=g,t=3;break;default:this.write=v,this.end=y;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function u(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function c(e,t,n){var r=t.length-1;if(r<n)return 0;var i=u(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||-2===i?0:(i=u(t[r]))>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||-2===i?0:(i=u(t[r]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}function l(e,t,n){if((192&t[0])!=128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((192&t[1])!=128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(192&t[2])!=128)return e.lastNeed=2,"�"}}function f(e){var t=this.lastTotal-this.lastNeed,n=l(this,e,t);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length)}function d(e,t){var n=c(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function p(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function b(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function m(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function g(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function v(e){return e.toString(this.encoding)}function y(e){return e&&e.length?this.write(e):""}t.s=s,s.prototype.write=function(e){var t,n;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},s.prototype.end=h,s.prototype.text=d,s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},40396(e,t,n){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ var r=n(48764),i=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(a(r,t),t.Buffer=o),o.prototype=Object.create(i.prototype),a(i,o),o.from=function(e,t,n){if("number"==typeof e)throw TypeError("Argument must not be a number");return i(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},o.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return r.SlowBuffer(e)}},93379(e,t,n){"use strict";var r,i,a=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},o=(i={},function(e){if(void 0===i[e]){var t=document.querySelector(e);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(n){t=null}i[e]=t}return i[e]}),s=[];function u(e){for(var t=-1,n=0;n<s.length;n++)if(s[n].identifier===e){t=n;break}return t}function c(e,t){for(var n={},r=[],i=0;i<e.length;i++){var a=e[i],o=t.base?a[0]+t.base:a[0],c=n[o]||0,l="".concat(o," ").concat(c);n[o]=c+1;var f=u(l),d={css:a[1],media:a[2],sourceMap:a[3]};-1!==f?(s[f].references++,s[f].updater(d)):s.push({identifier:l,updater:v(d,t),references:1}),r.push(l)}return r}function l(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var i=n.nc;i&&(r.nonce=i)}if(Object.keys(r).forEach(function(e){t.setAttribute(e,r[e])}),"function"==typeof e.insert)e.insert(t);else{var a=o(e.insert||"head");if(!a)throw Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}function f(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}var d,h=(d=[],function(e,t){return d[e]=t,d.filter(Boolean).join("\n")});function p(e,t,n,r){var i=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=h(t,i);else{var a=document.createTextNode(i),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}function b(e,t,n){var r=n.css,i=n.media,a=n.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var m=null,g=0;function v(e,t){if(t.singleton){var n,r,i,a=g++;n=m||(m=l(t)),r=p.bind(null,n,a,!1),i=p.bind(null,n,a,!0)}else n=l(t),r=b.bind(null,n,t),i=function(){f(n)};return r(e),function(t){t?(t.css!==e.css||t.media!==e.media||t.sourceMap!==e.sourceMap)&&r(e=t):i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=a()),e=e||[];var n=c(e,t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var i=u(n[r]);s[i].references--}for(var a=c(e,t),o=0;o<n.length;o++){var l=u(n[o]);0===s[l].references&&(s[l].updater(),s.splice(l,1))}n=a}}}},86527(e,t,n){"use strict";n.d(t,{Z:()=>Au});var r,i,a,o,s,u,c,l=n(67294),f=n.t(l,2),d=n(39814),h=n(5977),p=n(57209),b=n(32316),m=n(95880),g=n(17051),v=n(71381),y=n(81701),w=n(3022),_=n(60323),E=n(87591),S=n(25649),k=n(28902),x=n(71426),T=n(48884),M=n(94184),O=n.n(M),A=n(37703),L=n(73935),C=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];e.call(t,i[1],i[0])}},t}()}(),I="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,D=void 0!==n.g&&n.g.Math===Math?n.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),N="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(D):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)},P=2;function R(e,t){var n=!1,r=!1,i=0;function a(){n&&(n=!1,e()),r&&s()}function o(){N(a)}function s(){var e=Date.now();if(n){if(e-i<P)return;r=!0}else n=!0,r=!1,setTimeout(o,t);i=e}return s}var j=20,F=["top","right","bottom","left","width","height","size","weight"],Y="undefined"!=typeof MutationObserver,B=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=R(this.refresh.bind(this),j)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},e.prototype.connect_=function(){I&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Y?(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)},e.prototype.disconnect_=function(){I&&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)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;F.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),U=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},H=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||D},$=Q(0,0,0,0);function z(e){return parseFloat(e)||0}function G(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(t,n){return t+z(e["border-"+n+"-width"])},0)}function W(e){for(var t=["top","right","bottom","left"],n={},r=0,i=t;r<i.length;r++){var a=i[r],o=e["padding-"+a];n[a]=z(o)}return n}function K(e){var t=e.getBBox();return Q(0,0,t.width,t.height)}function V(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return $;var r=H(e).getComputedStyle(e),i=W(r),a=i.left+i.right,o=i.top+i.bottom,s=z(r.width),u=z(r.height);if("border-box"===r.boxSizing&&(Math.round(s+a)!==t&&(s-=G(r,"left","right")+a),Math.round(u+o)!==n&&(u-=G(r,"top","bottom")+o)),!Z(e)){var c=Math.round(s+a)-t,l=Math.round(u+o)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(l)&&(u-=l)}return Q(i.left,i.top,s,u)}var q="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof H(e).SVGGraphicsElement}:function(e){return e instanceof H(e).SVGElement&&"function"==typeof e.getBBox};function Z(e){return e===H(e).document.documentElement}function X(e){return I?q(e)?K(e):V(e):$}function J(e){var t=e.x,n=e.y,r=e.width,i=e.height,a=Object.create(("undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object).prototype);return U(a,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),a}function Q(e,t,n,r){return{x:e,y:t,width:n,height:r}}var ee=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Q(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=X(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),et=function(){function e(e,t){var n=J(t);U(this,{target:e,contentRect:n})}return e}(),en=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new C,"function"!=typeof e)throw TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof H(e).Element))throw TypeError('parameter 1 is not of type "Element".');var t=this.observations_;!t.has(e)&&(t.set(e,new ee(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof H(e).Element))throw TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new et(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),er="undefined"!=typeof WeakMap?new WeakMap:new C,ei=function(){function e(t){if(!(this instanceof e))throw TypeError("Cannot call a class as a function.");if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");var n=B.getInstance(),r=new en(t,n,this);er.set(this,r)}return e}();["observe","unobserve","disconnect"].forEach(function(e){ei.prototype[e]=function(){var t;return(t=er.get(this))[e].apply(t,arguments)}});var ea=void 0!==D.ResizeObserver?D.ResizeObserver:ei;let eo=ea;var es=function(e){var t=[],n=null,r=function(){for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];t=i,!n&&(n=requestAnimationFrame(function(){n=null,e.apply(void 0,t)}))};return r.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},r};let eu=es;var ec=n(45697),el=n.n(ec);function ef(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}let ed=ef;var eh=n(56169),ep=function(){return eh.Z.Date.now()};let eb=ep;var em=eh.Z.Symbol;let eg=em;var ev=Object.prototype,ey=ev.hasOwnProperty,ew=ev.toString,e_=eg?eg.toStringTag:void 0;function eE(e){var t=ey.call(e,e_),n=e[e_];try{e[e_]=void 0;var r=!0}catch(i){}var a=ew.call(e);return r&&(t?e[e_]=n:delete e[e_]),a}let eS=eE;var ek=Object.prototype.toString;function ex(e){return ek.call(e)}let eT=ex;var eM="[object Null]",eO="[object Undefined]",eA=eg?eg.toStringTag:void 0;function eL(e){return null==e?void 0===e?eO:eM:eA&&eA in Object(e)?eS(e):eT(e)}let eC=eL;function eI(e){return null!=e&&"object"==typeof e}let eD=eI;var eN="[object Symbol]";function eP(e){return"symbol"==typeof e||eD(e)&&eC(e)==eN}let eR=eP;var ej=0/0,eF=/^\s+|\s+$/g,eY=/^[-+]0x[0-9a-f]+$/i,eB=/^0b[01]+$/i,eU=/^0o[0-7]+$/i,eH=parseInt;function e$(e){if("number"==typeof e)return e;if(eR(e))return ej;if(ed(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ed(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(eF,"");var n=eB.test(e);return n||eU.test(e)?eH(e.slice(2),n?2:8):eY.test(e)?ej:+e}let ez=e$;var eG="Expected a function",eW=Math.max,eK=Math.min;function eV(e,t,n){var r,i,a,o,s,u,c=0,l=!1,f=!1,d=!0;if("function"!=typeof e)throw TypeError(eG);function h(t){var n=r,a=i;return r=i=void 0,c=t,o=e.apply(a,n)}function p(e){return c=e,s=setTimeout(g,t),l?h(e):o}function b(e){var n=e-u,r=e-c,i=t-n;return f?eK(i,a-r):i}function m(e){var n=e-u,r=e-c;return void 0===u||n>=t||n<0||f&&r>=a}function g(){var e=eb();if(m(e))return v(e);s=setTimeout(g,b(e))}function v(e){return(s=void 0,d&&r)?h(e):(r=i=void 0,o)}function y(){void 0!==s&&clearTimeout(s),c=0,r=u=i=s=void 0}function w(){return void 0===s?o:v(eb())}function _(){var e=eb(),n=m(e);if(r=arguments,i=this,u=e,n){if(void 0===s)return p(u);if(f)return clearTimeout(s),s=setTimeout(g,t),h(u)}return void 0===s&&(s=setTimeout(g,t)),o}return t=ez(t)||0,ed(n)&&(l=!!n.leading,a=(f="maxWait"in n)?eW(ez(n.maxWait)||0,t):a,d="trailing"in n?!!n.trailing:d),_.cancel=y,_.flush=w,_}let eq=eV;var eZ="Expected a function";function eX(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw TypeError(eZ);return ed(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),eq(e,t,{leading:r,maxWait:t,trailing:i})}let eJ=eX;var eQ={debounce:eq,throttle:eJ},e1=function(e){return eQ[e]},e0=function(e){return"function"==typeof e},e2=function(){return"undefined"==typeof window},e3=function(e){return e instanceof Element||e instanceof HTMLDocument};function e4(e){return(e4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function e6(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function e5(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function e8(e,t,n){return t&&e5(e.prototype,t),n&&e5(e,n),e}function e9(e,t){return t&&("object"===e4(t)||"function"==typeof t)?t:e7(e)}function e7(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function te(e){return(te=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tt(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&tn(e,t)}function tn(e,t){return(tn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var tr=function(e){function t(){return e6(this,t),e9(this,te(t).apply(this,arguments))}return tt(t,e),e8(t,[{key:"render",value:function(){return this.props.children}}]),t}(l.PureComponent);let ti=tr;function ta(e){return(ta="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function to(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function ts(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tu(e,t,n){return t&&ts(e.prototype,t),n&&ts(e,n),e}function tc(e,t){return t&&("object"===ta(t)||"function"==typeof t)?t:tf(e)}function tl(e){return(tl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tf(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function td(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&th(e,t)}function th(e,t){return(th=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var tb=function(e){function t(e){to(this,t),n=tc(this,tl(t).call(this,e)),tp(tf(n),"cancelHandler",function(){n.resizeHandler&&n.resizeHandler.cancel&&(n.resizeHandler.cancel(),n.resizeHandler=null)}),tp(tf(n),"rafClean",function(){n.raf&&n.raf.cancel&&(n.raf.cancel(),n.raf=null)}),tp(tf(n),"toggleObserver",function(e){var t=n.getElement();t&&n.resizeObserver[e]&&n.resizeObserver[e](t)}),tp(tf(n),"getElement",function(){var e=n.props,t=e.querySelector,r=e.targetDomEl;if(!e2()){if(t)return document.querySelector(t);if(r&&e3(r))return r;var i=n.element&&(0,L.findDOMNode)(n.element);if(i)return i.parentElement}}),tp(tf(n),"createUpdater",function(){return n.rafClean(),n.raf=eu(function(e){var t=e.width,r=e.height,i=n.props.onResize;e0(i)&&i(t,r),n.setState({width:t,height:r})}),n.raf}),tp(tf(n),"createResizeHandler",function(e){var t=n.state,r=t.width,i=t.height,a=n.props,o=a.handleWidth,s=a.handleHeight;if(o||s){var u=n.createUpdater();e.forEach(function(e){var t=e&&e.contentRect||{},a=t.width,c=t.height,l=o&&r!==a,f=s&&i!==c,d=l||f;n.skipOnMount||!d||e2()||u({width:a,height:c}),n.skipOnMount=!1})}}),tp(tf(n),"onRef",function(e){n.element=e}),tp(tf(n),"getRenderType",function(){var e=n.props,t=e.render,r=e.children;return e0(t)?"renderProp":e0(r)?"childFunction":(0,l.isValidElement)(r)?"child":Array.isArray(r)?"childArray":"parent"}),tp(tf(n),"getTargetComponent",function(){var e,t=n.props,r=t.render,i=t.children,a=t.nodeType,o=n.state,s={width:o.width,height:o.height},u=n.getRenderType();switch(u){case"renderProp":return(0,l.cloneElement)(r(s),{key:"resize-detector"});case"childFunction":return(0,l.cloneElement)(i(s));case"child":return(0,l.cloneElement)(i,s);case"childArray":return i.map(function(e){return!!e&&(0,l.cloneElement)(e,s)});default:return(0,l.createElement)(a)}});var n,r=e.skipOnMount,i=e.refreshMode,a=e.refreshRate,o=e.refreshOptions;n.state={width:void 0,height:void 0},n.skipOnMount=r,n.raf=null,n.element=null,n.unmounted=!1;var s=e1(i);return n.resizeHandler=s?s(n.createResizeHandler,a,o):n.createResizeHandler,n.resizeObserver=new eo(n.resizeHandler),n}return td(t,e),tu(t,[{key:"componentDidMount",value:function(){this.toggleObserver("observe")}},{key:"componentWillUnmount",value:function(){this.toggleObserver("unobserve"),this.rafClean(),this.cancelHandler(),this.unmounted=!0}},{key:"render",value:function(){return l.createElement(ti,{ref:this.onRef},this.getTargetComponent())}}]),t}(l.PureComponent);tb.propTypes={handleWidth:ec.bool,handleHeight:ec.bool,skipOnMount:ec.bool,refreshRate:ec.number,refreshMode:ec.string,refreshOptions:(0,ec.shape)({leading:ec.bool,trailing:ec.bool}),querySelector:ec.string,targetDomEl:ec.any,onResize:ec.func,render:ec.func,children:ec.any,nodeType:ec.node},tb.defaultProps={handleWidth:!1,handleHeight:!1,skipOnMount:!1,refreshRate:1e3,refreshMode:void 0,refreshOptions:void 0,querySelector:null,targetDomEl:null,onResize:null,render:void 0,children:null,nodeType:"div"};let tm=tb,tg=tm;var tv=n(97779),ty=n(26842),tw=n(82067),t_=n(70087),tE=n(31126);function tS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tk(e){if(Array.isArray(e))return e}function tx(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function tT(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function tM(e,t){return tk(e)||tx(e,t)||tO(e,t)||tT()}function tO(e,t){if(e){if("string"==typeof e)return tS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tS(e,t)}}var tA=function(e){return{accountButton:{fontSize:32,color:e.palette.primary.main},menuList:{paddingTop:0,paddingBottom:0}}},tL=(0,b.withStyles)(tA)(function(e){var t=e.classes,n=(0,A.I0)(),r=tM(l.useState(null),2),i=r[0],a=r[1],o=function(e){a(e.currentTarget)},s=function(){a(null)},u=function(){n((0,ty.EO)()),s()},c=function(){n((0,ty.iw)()),s()};return l.createElement(l.Fragment,null,l.createElement(y.default,{disableRipple:!0,onClick:o},l.createElement(tw.Z,{className:t.accountButton})),l.createElement(t_.Z,{id:"account-menu",anchorEl:i,getContentAnchorEl:null,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:8,horizontal:64},open:Boolean(i),onClose:s,disableAutoFocusItem:!0,MenuListProps:{className:t.menuList}},l.createElement(tE.default,{onClick:c},"Register MFA Token"),l.createElement(tE.default,{onClick:u},"Log out")))}),tC=n(9969),tI=n(73727);function tD(){return(tD=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var tN=function(e){return l.createElement(tE.default,tD({button:!0},e,{component:tI.rU}),e.children)};function tP(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tR(e){if(Array.isArray(e))return e}function tj(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function tF(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function tY(e,t){return tR(e)||tj(e,t)||tB(e,t)||tF()}function tB(e,t){if(e){if("string"==typeof e)return tP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tP(e,t)}}var tU=function(e){return{iconButton:{fontSize:32,color:e.palette.primary.main},menuList:{paddingTop:0,paddingBottom:0}}},tH=(0,b.withStyles)(tU)(function(e){var t=e.classes,n=tY(l.useState(null),2),r=n[0],i=n[1],a=function(e){i(e.currentTarget)},o=function(){i(null)};return l.createElement(l.Fragment,null,l.createElement(y.default,{disableRipple:!0,onClick:a},l.createElement(tC.Z,{className:t.iconButton})),l.createElement(t_.Z,{id:"settings-menu",anchorEl:r,getContentAnchorEl:null,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:8,horizontal:128},open:Boolean(r),onClose:o,disableAutoFocusItem:!0,MenuListProps:{className:t.menuList}},l.createElement(tN,{onClick:o,to:"/keys"},"Key Management"),l.createElement(tN,{onClick:o,to:"/config"},"Configuration")))}),t$=function(e){var t=e.children,n=e.href,r=e.id,i=e.className,a=e.onClick;return l.createElement(tI.rU,{to:n,id:r,className:i,onClick:a},t)};let tz=t$;var tG=n(79424),tW=function(e){return{root:{flexGrow:1,height:3,overflow:"hidden"},colorPrimary:{backgroundColor:e.palette.background.default},barColorPrimary:{backgroundColor:e.palette.primary.main}}},tK=function(e){var t=e.classes,n=e.fetchCount,r={colorPrimary:t.colorPrimary,barColorPrimary:t.barColorPrimary};return l.createElement("div",{className:t.root},n>0&&l.createElement(tG.Z,{variant:"indeterminate",classes:r}))};tK.propTypes={fetchCount:el().number.isRequired};let tV=(0,b.withStyles)(tW)(tK);var tq=n(5536);let tZ=n.p+"ba8bbf16ebf8e1d05bef.svg";function tX(){return(tX=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var tJ=function(e){return l.createElement(tq.T,tX({src:tZ,alt:"Chainlink Operator"},e))};tJ.propTypes={width:el().number,height:el().number};let tQ=tJ;function t1(e){return e.fetching.count}var t0=n(70655);function t2(e){return(t2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function t3(e){return"object"==t2(e)&&null!==e}var t4=n(99763);function t6(e,t){for(var n,r=/\r\n|[\n\r]/g,i=1,a=t+1;(n=r.exec(e.body))&&n.index<t;)i+=1,a=t+1-(n.index+n[0].length);return{line:i,column:a}}function t5(e){return t8(e.source,t6(e.source,e.start))}function t8(e,t){var n=e.locationOffset.column-1,r=t7(n)+e.body,i=t.line-1,a=e.locationOffset.line-1,o=t.line+a,s=1===t.line?n:0,u=t.column+s,c="".concat(e.name,":").concat(o,":").concat(u,"\n"),l=r.split(/\r\n|[\n\r]/g),f=l[i];if(f.length>120){for(var d=Math.floor(u/80),h=u%80,p=[],b=0;b<f.length;b+=80)p.push(f.slice(b,b+80));return c+t9([["".concat(o),p[0]]].concat(p.slice(1,d+1).map(function(e){return["",e]}),[[" ",t7(h-1)+"^"],["",p[d+1]]]))}return c+t9([["".concat(o-1),l[i-1]],["".concat(o),f],["",t7(u-1)+"^"],["".concat(o+1),l[i+1]]])}function t9(e){var t=e.filter(function(e){return e[0],void 0!==e[1]}),n=Math.max.apply(Math,t.map(function(e){return e[0].length}));return t.map(function(e){var t=e[0],r=e[1];return ne(n,t)+(r?" | "+r:" |")}).join("\n")}function t7(e){return Array(e+1).join(" ")}function ne(e,t){return t7(e-t.length)+t}function nt(e){return(nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function nr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nn(Object(n),!0).forEach(function(t){ni(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ni(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function na(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function no(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ns(e,t,n){return t&&no(e.prototype,t),n&&no(e,n),e}function nu(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&nm(e,t)}function nc(e){var t=np();return function(){var n,r=ng(e);if(t){var i=ng(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return nl(this,n)}}function nl(e,t){return t&&("object"===nt(t)||"function"==typeof t)?t:nf(e)}function nf(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nd(e){var t="function"==typeof Map?new Map:void 0;return(nd=function(e){if(null===e||!nb(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return nh(e,arguments,ng(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),nm(n,e)})(e)}function nh(e,t,n){return(nh=np()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&nm(i,n.prototype),i}).apply(null,arguments)}function np(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function nb(e){return -1!==Function.toString.call(e).indexOf("[native code]")}function nm(e,t){return(nm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ng(e){return(ng=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var nv=function(e){nu(n,e);var t=nc(n);function n(e,r,i,a,o,s,u){na(this,n),(b=t.call(this,e)).name="GraphQLError",b.originalError=null!=s?s:void 0,b.nodes=ny(Array.isArray(r)?r:r?[r]:void 0);for(var c=[],l=0,f=null!==(m=b.nodes)&&void 0!==m?m:[];l<f.length;l++){var d,h,p,b,m,g=f[l].loc;null!=g&&c.push(g)}c=ny(c),b.source=null!=i?i:null===(d=c)||void 0===d?void 0:d[0].source,b.positions=null!=a?a:null===(h=c)||void 0===h?void 0:h.map(function(e){return e.start}),b.locations=a&&i?a.map(function(e){return t6(i,e)}):null===(p=c)||void 0===p?void 0:p.map(function(e){return t6(e.source,e.start)}),b.path=null!=o?o:void 0;var v=null==s?void 0:s.extensions;return(null==u&&t3(v)?b.extensions=nr({},v):b.extensions=null!=u?u:{},Object.defineProperties(nf(b),{message:{enumerable:!0},locations:{enumerable:null!=b.locations},path:{enumerable:null!=b.path},extensions:{enumerable:null!=b.extensions&&Object.keys(b.extensions).length>0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=s&&s.stack)?(Object.defineProperty(nf(b),"stack",{value:s.stack,writable:!0,configurable:!0}),nl(b)):(Error.captureStackTrace?Error.captureStackTrace(nf(b),n):Object.defineProperty(nf(b),"stack",{value:Error().stack,writable:!0,configurable:!0}),b)}return ns(n,[{key:"toString",value:function(){return nw(this)}},{key:t4.YF,get:function(){return"Object"}}]),n}(nd(Error));function ny(e){return void 0===e||0===e.length?void 0:e}function nw(e){var t=e.message;if(e.nodes)for(var n=0,r=e.nodes;n<r.length;n++){var i=r[n];i.loc&&(t+="\n\n"+t5(i.loc))}else if(e.source&&e.locations)for(var a=0,o=e.locations;a<o.length;a++){var s=o[a];t+="\n\n"+t8(e.source,s)}return t}function n_(e,t,n){return new nv("Syntax Error: ".concat(n),void 0,e,[t])}var nE=n(97359),nS=n(25217),nk=Object.freeze({SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"}),nx=n(10143),nT=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"}),nM=n(87392),nO=function(){function e(e){var t=new nS.WU(nk.SOF,0,0,0,0,null);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}var t=e.prototype;return t.advance=function(){return this.lastToken=this.token,this.token=this.lookahead()},t.lookahead=function(){var e,t=this.token;if(t.kind!==nk.EOF)do t=null!==(e=t.next)&&void 0!==e?e:t.next=nC(this,t);while(t.kind===nk.COMMENT)return t},e}();function nA(e){return e===nk.BANG||e===nk.DOLLAR||e===nk.AMP||e===nk.PAREN_L||e===nk.PAREN_R||e===nk.SPREAD||e===nk.COLON||e===nk.EQUALS||e===nk.AT||e===nk.BRACKET_L||e===nk.BRACKET_R||e===nk.BRACE_L||e===nk.PIPE||e===nk.BRACE_R}function nL(e){return isNaN(e)?nk.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function nC(e,t){for(var n=e.source,r=n.body,i=r.length,a=t.end;a<i;){var o=r.charCodeAt(a),s=e.line,u=1+a-e.lineStart;switch(o){case 65279:case 9:case 32:case 44:++a;continue;case 10:++a,++e.line,e.lineStart=a;continue;case 13:10===r.charCodeAt(a+1)?a+=2:++a,++e.line,e.lineStart=a;continue;case 33:return new nS.WU(nk.BANG,a,a+1,s,u,t);case 35:return nD(n,a,s,u,t);case 36:return new nS.WU(nk.DOLLAR,a,a+1,s,u,t);case 38:return new nS.WU(nk.AMP,a,a+1,s,u,t);case 40:return new nS.WU(nk.PAREN_L,a,a+1,s,u,t);case 41:return new nS.WU(nk.PAREN_R,a,a+1,s,u,t);case 46:if(46===r.charCodeAt(a+1)&&46===r.charCodeAt(a+2))return new nS.WU(nk.SPREAD,a,a+3,s,u,t);break;case 58:return new nS.WU(nk.COLON,a,a+1,s,u,t);case 61:return new nS.WU(nk.EQUALS,a,a+1,s,u,t);case 64:return new nS.WU(nk.AT,a,a+1,s,u,t);case 91:return new nS.WU(nk.BRACKET_L,a,a+1,s,u,t);case 93:return new nS.WU(nk.BRACKET_R,a,a+1,s,u,t);case 123:return new nS.WU(nk.BRACE_L,a,a+1,s,u,t);case 124:return new nS.WU(nk.PIPE,a,a+1,s,u,t);case 125:return new nS.WU(nk.BRACE_R,a,a+1,s,u,t);case 34:if(34===r.charCodeAt(a+1)&&34===r.charCodeAt(a+2))return nj(n,a,s,u,t,e);return nR(n,a,s,u,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return nN(n,a,o,s,u,t);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return nB(n,a,s,u,t)}throw n_(n,a,nI(o))}var c=e.line,l=1+a-e.lineStart;return new nS.WU(nk.EOF,i,i,c,l,t)}function nI(e){return e<32&&9!==e&&10!==e&&13!==e?"Cannot contain the invalid character ".concat(nL(e),"."):39===e?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character ".concat(nL(e),".")}function nD(e,t,n,r,i){var a,o=e.body,s=t;do a=o.charCodeAt(++s);while(!isNaN(a)&&(a>31||9===a))return new nS.WU(nk.COMMENT,t,s,n,r,i,o.slice(t+1,s))}function nN(e,t,n,r,i,a){var o=e.body,s=n,u=t,c=!1;if(45===s&&(s=o.charCodeAt(++u)),48===s){if((s=o.charCodeAt(++u))>=48&&s<=57)throw n_(e,u,"Invalid number, unexpected digit after 0: ".concat(nL(s),"."))}else u=nP(e,u,s),s=o.charCodeAt(u);if(46===s&&(c=!0,s=o.charCodeAt(++u),u=nP(e,u,s),s=o.charCodeAt(u)),(69===s||101===s)&&(c=!0,(43===(s=o.charCodeAt(++u))||45===s)&&(s=o.charCodeAt(++u)),u=nP(e,u,s),s=o.charCodeAt(u)),46===s||nU(s))throw n_(e,u,"Invalid number, expected digit but got: ".concat(nL(s),"."));return new nS.WU(c?nk.FLOAT:nk.INT,t,u,r,i,a,o.slice(t,u))}function nP(e,t,n){var r=e.body,i=t,a=n;if(a>=48&&a<=57){do a=r.charCodeAt(++i);while(a>=48&&a<=57)return i}throw n_(e,i,"Invalid number, expected digit but got: ".concat(nL(a),"."))}function nR(e,t,n,r,i){for(var a=e.body,o=t+1,s=o,u=0,c="";o<a.length&&!isNaN(u=a.charCodeAt(o))&&10!==u&&13!==u;){if(34===u)return c+=a.slice(s,o),new nS.WU(nk.STRING,t,o+1,n,r,i,c);if(u<32&&9!==u)throw n_(e,o,"Invalid character within String: ".concat(nL(u),"."));if(++o,92===u){switch(c+=a.slice(s,o-1),u=a.charCodeAt(o)){case 34:c+='"';break;case 47:c+="/";break;case 92:c+="\\";break;case 98:c+="\b";break;case 102:c+="\f";break;case 110:c+="\n";break;case 114:c+="\r";break;case 116:c+=" ";break;case 117:var l=nF(a.charCodeAt(o+1),a.charCodeAt(o+2),a.charCodeAt(o+3),a.charCodeAt(o+4));if(l<0){var f=a.slice(o+1,o+5);throw n_(e,o,"Invalid character escape sequence: \\u".concat(f,"."))}c+=String.fromCharCode(l),o+=4;break;default:throw n_(e,o,"Invalid character escape sequence: \\".concat(String.fromCharCode(u),"."))}s=++o}}throw n_(e,o,"Unterminated string.")}function nj(e,t,n,r,i,a){for(var o=e.body,s=t+3,u=s,c=0,l="";s<o.length&&!isNaN(c=o.charCodeAt(s));){if(34===c&&34===o.charCodeAt(s+1)&&34===o.charCodeAt(s+2))return l+=o.slice(u,s),new nS.WU(nk.BLOCK_STRING,t,s+3,n,r,i,(0,nM.W7)(l));if(c<32&&9!==c&&10!==c&&13!==c)throw n_(e,s,"Invalid character within String: ".concat(nL(c),"."));10===c?(++s,++a.line,a.lineStart=s):13===c?(10===o.charCodeAt(s+1)?s+=2:++s,++a.line,a.lineStart=s):92===c&&34===o.charCodeAt(s+1)&&34===o.charCodeAt(s+2)&&34===o.charCodeAt(s+3)?(l+=o.slice(u,s)+'"""',s+=4,u=s):++s}throw n_(e,s,"Unterminated string.")}function nF(e,t,n,r){return nY(e)<<12|nY(t)<<8|nY(n)<<4|nY(r)}function nY(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function nB(e,t,n,r,i){for(var a=e.body,o=a.length,s=t+1,u=0;s!==o&&!isNaN(u=a.charCodeAt(s))&&(95===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122);)++s;return new nS.WU(nk.NAME,t,s,n,r,i,a.slice(t,s))}function nU(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}function nH(e,t){return new n$(e,t).parseDocument()}var n$=function(){function e(e,t){var n=(0,nx.T)(e)?e:new nx.H(e);this._lexer=new nO(n),this._options=t}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(nk.NAME);return{kind:nE.h.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:nE.h.DOCUMENT,definitions:this.many(nk.SOF,this.parseDefinition,nk.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(nk.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else if(this.peek(nk.BRACE_L))return this.parseOperationDefinition();else if(this.peekDescription())return this.parseTypeSystemDefinition();throw this.unexpected()},t.parseOperationDefinition=function(){var e,t=this._lexer.token;if(this.peek(nk.BRACE_L))return{kind:nE.h.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(t)};var n=this.parseOperationType();return this.peek(nk.NAME)&&(e=this.parseName()),{kind:nE.h.OPERATION_DEFINITION,operation:n,name:e,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseOperationType=function(){var e=this.expectToken(nk.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},t.parseVariableDefinitions=function(){return this.optionalMany(nk.PAREN_L,this.parseVariableDefinition,nk.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:nE.h.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(nk.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(nk.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},t.parseVariable=function(){var e=this._lexer.token;return this.expectToken(nk.DOLLAR),{kind:nE.h.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:nE.h.SELECTION_SET,selections:this.many(nk.BRACE_L,this.parseSelection,nk.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(nk.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,n=this._lexer.token,r=this.parseName();return this.expectOptionalToken(nk.COLON)?(e=r,t=this.parseName()):t=r,{kind:nE.h.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(nk.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(n)}},t.parseArguments=function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(nk.PAREN_L,t,nk.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(nk.COLON),{kind:nE.h.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:nE.h.ARGUMENT,name:this.parseName(),value:(this.expectToken(nk.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(nk.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(nk.NAME)?{kind:nE.h.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:nE.h.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseFragmentDefinition=function(){var e,t=this._lexer.token;return(this.expectKeyword("fragment"),(null===(e=this._options)||void 0===e?void 0:e.experimentalFragmentVariables)===!0)?{kind:nE.h.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:nE.h.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(e){var t=this._lexer.token;switch(t.kind){case nk.BRACKET_L:return this.parseList(e);case nk.BRACE_L:return this.parseObject(e);case nk.INT:return this._lexer.advance(),{kind:nE.h.INT,value:t.value,loc:this.loc(t)};case nk.FLOAT:return this._lexer.advance(),{kind:nE.h.FLOAT,value:t.value,loc:this.loc(t)};case nk.STRING:case nk.BLOCK_STRING:return this.parseStringLiteral();case nk.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:nE.h.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:nE.h.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:nE.h.NULL,loc:this.loc(t)};default:return{kind:nE.h.ENUM,value:t.value,loc:this.loc(t)}}case nk.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:nE.h.STRING,value:e.value,block:e.kind===nk.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,n=this._lexer.token,r=function(){return t.parseValueLiteral(e)};return{kind:nE.h.LIST,values:this.any(nk.BRACKET_L,r,nk.BRACKET_R),loc:this.loc(n)}},t.parseObject=function(e){var t=this,n=this._lexer.token,r=function(){return t.parseObjectField(e)};return{kind:nE.h.OBJECT,fields:this.any(nk.BRACE_L,r,nk.BRACE_R),loc:this.loc(n)}},t.parseObjectField=function(e){var t=this._lexer.token,n=this.parseName();return this.expectToken(nk.COLON),{kind:nE.h.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(nk.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(nk.AT),{kind:nE.h.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return(this.expectOptionalToken(nk.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(nk.BRACKET_R),e={kind:nE.h.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(nk.BANG))?{kind:nE.h.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:nE.h.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},t.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===nk.NAME)switch(e.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(e)},t.peekDescription=function(){return this.peek(nk.STRING)||this.peek(nk.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var n=this.parseDirectives(!0),r=this.many(nk.BRACE_L,this.parseOperationTypeDefinition,nk.BRACE_R);return{kind:nE.h.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(nk.COLON);var n=this.parseNamedType();return{kind:nE.h.OPERATION_TYPE_DEFINITION,operation:t,type:n,loc:this.loc(e)}},t.parseScalarTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var n=this.parseName(),r=this.parseDirectives(!0);return{kind:nE.h.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),a=this.parseFieldsDefinition();return{kind:nE.h.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:a,loc:this.loc(e)}},t.parseImplementsInterfaces=function(){var e;if(!this.expectOptionalKeyword("implements"))return[];if((null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLImplementsInterfaces)===!0){var t=[];this.expectOptionalToken(nk.AMP);do t.push(this.parseNamedType());while(this.expectOptionalToken(nk.AMP)||this.peek(nk.NAME))return t}return this.delimitedMany(nk.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var e;return(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)===!0&&this.peek(nk.BRACE_L)&&this._lexer.lookahead().kind===nk.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(nk.BRACE_L,this.parseFieldDefinition,nk.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(nk.COLON);var i=this.parseTypeReference(),a=this.parseDirectives(!0);return{kind:nE.h.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:a,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(nk.PAREN_L,this.parseInputValueDef,nk.PAREN_R)},t.parseInputValueDef=function(){var e,t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(nk.COLON);var i=this.parseTypeReference();this.expectOptionalToken(nk.EQUALS)&&(e=this.parseValueLiteral(!0));var a=this.parseDirectives(!0);return{kind:nE.h.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:e,directives:a,loc:this.loc(t)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),a=this.parseFieldsDefinition();return{kind:nE.h.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:a,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseUnionMemberTypes();return{kind:nE.h.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(nk.EQUALS)?this.delimitedMany(nk.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseEnumValuesDefinition();return{kind:nE.h.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(nk.BRACE_L,this.parseEnumValueDefinition,nk.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseDirectives(!0);return{kind:nE.h.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseInputFieldsDefinition();return{kind:nE.h.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(nk.BRACE_L,this.parseInputValueDef,nk.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===nk.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)},t.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),n=this.optionalMany(nk.BRACE_L,this.parseOperationTypeDefinition,nk.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return{kind:nE.h.SCHEMA_EXTENSION,directives:t,operationTypes:n,loc:this.loc(e)}},t.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),n=this.parseDirectives(!0);if(0===n.length)throw this.unexpected();return{kind:nE.h.SCALAR_TYPE_EXTENSION,name:t,directives:n,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:nE.h.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:nE.h.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:nE.h.UNION_TYPE_EXTENSION,name:t,directives:n,types:r,loc:this.loc(e)}},t.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:nE.h.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r,loc:this.loc(e)}},t.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:nE.h.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r,loc:this.loc(e)}},t.parseDirectiveDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(nk.AT);var n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var a=this.parseDirectiveLocations();return{kind:nE.h.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:a,loc:this.loc(e)}},t.parseDirectiveLocations=function(){return this.delimitedMany(nk.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==nT[t.value])return t;throw this.unexpected(e)},t.loc=function(e){var t;if((null===(t=this._options)||void 0===t?void 0:t.noLocation)!==!0)return new nS.Ye(e,this._lexer.lastToken,this._lexer.source)},t.peek=function(e){return this._lexer.token.kind===e},t.expectToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw n_(this._lexer.source,t.start,"Expected ".concat(nG(e),", found ").concat(nz(t),"."))},t.expectOptionalToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t},t.expectKeyword=function(e){var t=this._lexer.token;if(t.kind===nk.NAME&&t.value===e)this._lexer.advance();else throw n_(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(nz(t),"."))},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===nk.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=null!=e?e:this._lexer.token;return n_(this._lexer.source,t.start,"Unexpected ".concat(nz(t),"."))},t.any=function(e,t,n){this.expectToken(e);for(var r=[];!this.expectOptionalToken(n);)r.push(t.call(this));return r},t.optionalMany=function(e,t,n){if(this.expectOptionalToken(e)){var r=[];do r.push(t.call(this));while(!this.expectOptionalToken(n))return r}return[]},t.many=function(e,t,n){this.expectToken(e);var r=[];do r.push(t.call(this));while(!this.expectOptionalToken(n))return r},t.delimitedMany=function(e,t){this.expectOptionalToken(e);var n=[];do n.push(t.call(this));while(this.expectOptionalToken(e))return n},e}();function nz(e){var t=e.value;return nG(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function nG(e){return nA(e)?'"'.concat(e,'"'):e}var nW=new Map,nK=new Map,nV=!0,nq=!1;function nZ(e){return e.replace(/[\s,]+/g," ").trim()}function nX(e){return nZ(e.source.body.substring(e.start,e.end))}function nJ(e){var t=new Set,n=[];return e.definitions.forEach(function(e){if("FragmentDefinition"===e.kind){var r=e.name.value,i=nX(e.loc),a=nK.get(r);a&&!a.has(i)?nV&&console.warn("Warning: fragment with name "+r+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):a||nK.set(r,a=new Set),a.add(i),t.has(i)||(t.add(i),n.push(e))}else n.push(e)}),(0,t0.pi)((0,t0.pi)({},e),{definitions:n})}function nQ(e){var t=new Set(e.definitions);t.forEach(function(e){e.loc&&delete e.loc,Object.keys(e).forEach(function(n){var r=e[n];r&&"object"==typeof r&&t.add(r)})});var n=e.loc;return n&&(delete n.startToken,delete n.endToken),e}function n1(e){var t=nZ(e);if(!nW.has(t)){var n=nH(e,{experimentalFragmentVariables:nq,allowLegacyFragmentVariables:nq});if(!n||"Document"!==n.kind)throw Error("Not a valid GraphQL document.");nW.set(t,nQ(nJ(n)))}return nW.get(t)}function n0(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];"string"==typeof e&&(e=[e]);var r=e[0];return t.forEach(function(t,n){t&&"Document"===t.kind?r+=t.loc.source.body:r+=t,r+=e[n+1]}),n1(r)}function n2(){nW.clear(),nK.clear()}function n3(){nV=!1}function n4(){nq=!0}function n6(){nq=!1}var n5,n8={gql:n0,resetCaches:n2,disableFragmentWarnings:n3,enableExperimentalFragmentVariables:n4,disableExperimentalFragmentVariables:n6};(n5=n0||(n0={})).gql=n8.gql,n5.resetCaches=n8.resetCaches,n5.disableFragmentWarnings=n8.disableFragmentWarnings,n5.enableExperimentalFragmentVariables=n8.enableExperimentalFragmentVariables,n5.disableExperimentalFragmentVariables=n8.disableExperimentalFragmentVariables,n0.default=n0;var n9=n(83952),n7=n(30320),re=!1,rt=f.useSyncExternalStore||function(e,t,n){var r=t();__DEV__&&!re&&r!==t()&&(re=!0,__DEV__&&n9.kG.error("The result of getSnapshot should be cached to avoid an infinite loop"));var i=l.useState({inst:{value:r,getSnapshot:t}}),a=i[0].inst,o=i[1];return n7.JC?l.useLayoutEffect(function(){Object.assign(a,{value:r,getSnapshot:t}),rn(a)&&o({inst:a})},[e,r,t]):Object.assign(a,{value:r,getSnapshot:t}),l.useEffect(function(){return rn(a)&&o({inst:a}),e(function(){rn(a)&&o({inst:a})})},[e]),r};function rn(e){var t=e.value,n=e.getSnapshot;try{return t!==n()}catch(r){return!0}}var rr,ri=n(82152),ra=n(14012),ro=n(85317),rs=n(30990),ru=n(1644);(rr=r||(r={}))[rr.Query=0]="Query",rr[rr.Mutation=1]="Mutation",rr[rr.Subscription=2]="Subscription";var rc=new Map;function rl(e){var t;switch(e){case r.Query:t="Query";break;case r.Mutation:t="Mutation";break;case r.Subscription:t="Subscription"}return t}function rf(e){var t,n,i,a=rc.get(e);if(a)return a;__DEV__?(0,n9.kG)(!!e&&!!e.kind,"Argument of ".concat(e," passed to parser was not a valid GraphQL ")+"DocumentNode. You may need to use 'graphql-tag' or another method to convert your operation into a document"):(0,n9.kG)(!!e&&!!e.kind,33);for(var o=[],s=[],u=[],c=[],l=0,f=e.definitions;l<f.length;l++){var d=f[l];if("FragmentDefinition"===d.kind){o.push(d);continue}if("OperationDefinition"===d.kind)switch(d.operation){case"query":s.push(d);break;case"mutation":u.push(d);break;case"subscription":c.push(d)}}__DEV__?(0,n9.kG)(!o.length||s.length||u.length||c.length,"Passing only a fragment to 'graphql' is not yet supported. You must include a query, subscription or mutation as well"):(0,n9.kG)(!o.length||s.length||u.length||c.length,34),__DEV__?(0,n9.kG)(s.length+u.length+c.length<=1,"react-apollo only supports a query, subscription, or a mutation per HOC. "+"".concat(e," had ").concat(s.length," queries, ").concat(c.length," ")+"subscriptions and ".concat(u.length," mutations. ")+"You can use 'compose' to join multiple operation types to a component"):(0,n9.kG)(s.length+u.length+c.length<=1,35),n=s.length?r.Query:r.Mutation,s.length||u.length||(n=r.Subscription);var h=s.length?s:u.length?u:c;__DEV__?(0,n9.kG)(1===h.length,"react-apollo only supports one definition per HOC. ".concat(e," had ")+"".concat(h.length," definitions. ")+"You can use 'compose' to join multiple operation types to a component"):(0,n9.kG)(1===h.length,36);var p=h[0];t=p.variableDefinitions||[];var b={name:i=p.name&&"Name"===p.name.kind?p.name.value:"data",type:n,variables:t};return rc.set(e,b),b}function rd(e,t){var n=rf(e),r=rl(t),i=rl(n.type);__DEV__?(0,n9.kG)(n.type===t,"Running a ".concat(r," requires a graphql ")+"".concat(r,", but a ").concat(i," was used instead.")):(0,n9.kG)(n.type===t,37)}function rh(e){var t=(0,l.useContext)((0,ro.K)()),n=e||t.client;return __DEV__?(0,n9.kG)(!!n,'Could not find "client" in the context or passed in as an option. Wrap the root component in an <ApolloProvider>, or pass an ApolloClient instance in via options.'):(0,n9.kG)(!!n,32),n}var rp=n(10542),rb=n(53712),rm=n(21436),rg=Object.prototype.hasOwnProperty;function rv(e,t){return void 0===t&&(t=Object.create(null)),ry(rh(t.client),e).useQuery(t)}function ry(e,t){var n=(0,l.useRef)();n.current&&e===n.current.client&&t===n.current.query||(n.current=new rw(e,t,n.current));var r=n.current,i=(0,l.useState)(0),a=(i[0],i[1]);return r.forceUpdate=function(){a(function(e){return e+1})},r}var rw=function(){function e(e,t,n){this.client=e,this.query=t,this.ssrDisabledResult=(0,rp.J)({loading:!0,data:void 0,error:void 0,networkStatus:ru.I.loading}),this.skipStandbyResult=(0,rp.J)({loading:!1,data:void 0,error:void 0,networkStatus:ru.I.ready}),this.toQueryResultCache=new(n7.mr?WeakMap:Map),rd(t,r.Query);var i=n&&n.result,a=i&&i.data;a&&(this.previousData=a)}return e.prototype.forceUpdate=function(){__DEV__&&n9.kG.warn("Calling default no-op implementation of InternalState#forceUpdate")},e.prototype.executeQuery=function(e){var t,n=this;e.query&&Object.assign(this,{query:e.query}),this.watchQueryOptions=this.createWatchQueryOptions(this.queryHookOptions=e);var r=this.observable.reobserveAsConcast(this.getObsQueryOptions());return this.previousData=(null===(t=this.result)||void 0===t?void 0:t.data)||this.previousData,this.result=void 0,this.forceUpdate(),new Promise(function(e){var t;r.subscribe({next:function(e){t=e},error:function(){e(n.toQueryResult(n.observable.getCurrentResult()))},complete:function(){e(n.toQueryResult(t))}})})},e.prototype.useQuery=function(e){var t=this;this.renderPromises=(0,l.useContext)((0,ro.K)()).renderPromises,this.useOptions(e);var n=this.useObservableQuery(),r=rt((0,l.useCallback)(function(){if(t.renderPromises)return function(){};var e=function(){var e=t.result,r=n.getCurrentResult();!(e&&e.loading===r.loading&&e.networkStatus===r.networkStatus&&(0,ri.D)(e.data,r.data))&&t.setResult(r)},r=function(a){var o=n.last;i.unsubscribe();try{n.resetLastResults(),i=n.subscribe(e,r)}finally{n.last=o}if(!rg.call(a,"graphQLErrors"))throw a;var s=t.result;(!s||s&&s.loading||!(0,ri.D)(a,s.error))&&t.setResult({data:s&&s.data,error:a,loading:!1,networkStatus:ru.I.error})},i=n.subscribe(e,r);return function(){return setTimeout(function(){return i.unsubscribe()})}},[n,this.renderPromises,this.client.disableNetworkFetches,]),function(){return t.getCurrentResult()},function(){return t.getCurrentResult()});return this.unsafeHandlePartialRefetch(r),this.toQueryResult(r)},e.prototype.useOptions=function(t){var n,r=this.createWatchQueryOptions(this.queryHookOptions=t),i=this.watchQueryOptions;!(0,ri.D)(r,i)&&(this.watchQueryOptions=r,i&&this.observable&&(this.observable.reobserve(this.getObsQueryOptions()),this.previousData=(null===(n=this.result)||void 0===n?void 0:n.data)||this.previousData,this.result=void 0)),this.onCompleted=t.onCompleted||e.prototype.onCompleted,this.onError=t.onError||e.prototype.onError,(this.renderPromises||this.client.disableNetworkFetches)&&!1===this.queryHookOptions.ssr&&!this.queryHookOptions.skip?this.result=this.ssrDisabledResult:this.queryHookOptions.skip||"standby"===this.watchQueryOptions.fetchPolicy?this.result=this.skipStandbyResult:(this.result===this.ssrDisabledResult||this.result===this.skipStandbyResult)&&(this.result=void 0)},e.prototype.getObsQueryOptions=function(){var e=[],t=this.client.defaultOptions.watchQuery;return t&&e.push(t),this.queryHookOptions.defaultOptions&&e.push(this.queryHookOptions.defaultOptions),e.push((0,rb.o)(this.observable&&this.observable.options,this.watchQueryOptions)),e.reduce(ra.J)},e.prototype.createWatchQueryOptions=function(e){void 0===e&&(e={});var t,n=e.skip,r=Object.assign((e.ssr,e.onCompleted,e.onError,e.defaultOptions,(0,t0._T)(e,["skip","ssr","onCompleted","onError","defaultOptions"])),{query:this.query});if(this.renderPromises&&("network-only"===r.fetchPolicy||"cache-and-network"===r.fetchPolicy)&&(r.fetchPolicy="cache-first"),r.variables||(r.variables={}),n){var i=r.fetchPolicy,a=void 0===i?this.getDefaultFetchPolicy():i,o=r.initialFetchPolicy;Object.assign(r,{initialFetchPolicy:void 0===o?a:o,fetchPolicy:"standby"})}else r.fetchPolicy||(r.fetchPolicy=(null===(t=this.observable)||void 0===t?void 0:t.options.initialFetchPolicy)||this.getDefaultFetchPolicy());return r},e.prototype.getDefaultFetchPolicy=function(){var e,t;return(null===(e=this.queryHookOptions.defaultOptions)||void 0===e?void 0:e.fetchPolicy)||(null===(t=this.client.defaultOptions.watchQuery)||void 0===t?void 0:t.fetchPolicy)||"cache-first"},e.prototype.onCompleted=function(e){},e.prototype.onError=function(e){},e.prototype.useObservableQuery=function(){var e=this.observable=this.renderPromises&&this.renderPromises.getSSRObservable(this.watchQueryOptions)||this.observable||this.client.watchQuery(this.getObsQueryOptions());this.obsQueryFields=(0,l.useMemo)(function(){return{refetch:e.refetch.bind(e),reobserve:e.reobserve.bind(e),fetchMore:e.fetchMore.bind(e),updateQuery:e.updateQuery.bind(e),startPolling:e.startPolling.bind(e),stopPolling:e.stopPolling.bind(e),subscribeToMore:e.subscribeToMore.bind(e)}},[e]);var t=!(!1===this.queryHookOptions.ssr||this.queryHookOptions.skip);return this.renderPromises&&t&&(this.renderPromises.registerSSRObservable(e),e.getCurrentResult().loading&&this.renderPromises.addObservableQueryPromise(e)),e},e.prototype.setResult=function(e){var t=this.result;t&&t.data&&(this.previousData=t.data),this.result=e,this.forceUpdate(),this.handleErrorOrCompleted(e)},e.prototype.handleErrorOrCompleted=function(e){var t=this;if(!e.loading){var n=this.toApolloError(e);Promise.resolve().then(function(){n?t.onError(n):e.data&&t.onCompleted(e.data)}).catch(function(e){__DEV__&&n9.kG.warn(e)})}},e.prototype.toApolloError=function(e){return(0,rm.O)(e.errors)?new rs.cA({graphQLErrors:e.errors}):e.error},e.prototype.getCurrentResult=function(){return this.result||this.handleErrorOrCompleted(this.result=this.observable.getCurrentResult()),this.result},e.prototype.toQueryResult=function(e){var t=this.toQueryResultCache.get(e);if(t)return t;var n=e.data,r=(e.partial,(0,t0._T)(e,["data","partial"]));return this.toQueryResultCache.set(e,t=(0,t0.pi)((0,t0.pi)((0,t0.pi)({data:n},r),this.obsQueryFields),{client:this.client,observable:this.observable,variables:this.observable.variables,called:!this.queryHookOptions.skip,previousData:this.previousData})),!t.error&&(0,rm.O)(e.errors)&&(t.error=new rs.cA({graphQLErrors:e.errors})),t},e.prototype.unsafeHandlePartialRefetch=function(e){e.partial&&this.queryHookOptions.partialRefetch&&!e.loading&&(!e.data||0===Object.keys(e.data).length)&&"cache-only"!==this.observable.options.fetchPolicy&&(Object.assign(e,{loading:!0,networkStatus:ru.I.refetch}),this.observable.refetch())},e}();function r_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function rE(e){if(Array.isArray(e))return e}function rS(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function rk(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function rx(e,t){return rE(e)||rS(e,t)||rM(e,t)||rk()}function rT(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function rM(e,t){if(e){if("string"==typeof e)return r_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r_(e,t)}}function rO(){var e=rT(["\n query FetchFeatures {\n features {\n ... on Features {\n __typename\n csa\n feedsManager\n }\n }\n }\n"]);return rO=function(){return e},e}(am=i||(i={})).CSA="csa",am.FeedsManager="feeds_manager";var rA=n0(rO());function rL(e){var t=rv(rA,{fetchPolicy:"network-only"}).data,n=rx(l.useState(!1),2),r=n[0],a=n[1];return l.useEffect(function(){if((null==t?void 0:t.features.__typename)=="Features")switch(e){case i.CSA:a(null==t?void 0:t.features.csa);break;case i.FeedsManager:a(null==t?void 0:t.features.feedsManager);break;default:a(!1)}},[t,e]),r}function rC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function rI(e){if(Array.isArray(e))return e}function rD(e){if(Array.isArray(e))return rC(e)}function rN(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function rP(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function rR(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function rj(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function rF(e,t){return rI(e)||rP(e,t)||rB(e,t)||rR()}function rY(e){return rD(e)||rN(e)||rB(e)||rj()}function rB(e,t){if(e){if("string"==typeof e)return rC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rC(e,t)}}var rU=[["/jobs","Jobs"],["/runs","Runs"],["/chains","Chains"],["/nodes","Nodes"],["/bridges","Bridges"],["/transactions","Transactions"],],rH=rY(rU).concat([["/keys","Keys"],["/config","Configuration"],]),r$=240,rz=function(e){var t=e.palette,n=e.spacing;return(0,b.createStyles)({menuitem:{padding:3*n.unit,display:"block"},drawerPaper:{backgroundColor:t.common.white,paddingTop:7*n.unit,width:r$},drawerList:{padding:0}})},rG=(0,b.withStyles)(rz)(function(e){var t=e.drawerOpen,n=e.toggleDrawer,r=e.authenticated,i=e.classes,a=e.submitSignOut,o=e.isFeedsManagerFeatureEnabled;return l.createElement(g.Z,{anchor:"right",open:t,classes:{paper:i.drawerPaper},onClose:n},l.createElement("div",{tabIndex:0,role:"button",onClick:n},l.createElement(w.default,{className:i.drawerList},rH.map(function(e){var t=rF(e,2),n=t[0],r=t[1];return l.createElement(_.default,{key:n,button:!0,component:function(){return l.createElement(tz,{href:n},l.createElement(E.Z,{primary:r}))},className:i.menuitem})}),o&&l.createElement(_.default,{button:!0,component:function(){return l.createElement(tz,{href:"/job_distributors"},l.createElement(E.Z,{primary:"Job Distributors"}))},className:i.menuitem}),r&&l.createElement(_.default,{button:!0,onClick:a,className:i.menuitem},l.createElement(E.Z,{primary:"Sign Out"})))))}),rW=function(e){var t=e.palette,n=e.spacing;return(0,b.createStyles)({horizontalNav:{paddingTop:0,paddingBottom:0},horizontalNavItem:{display:"inline"},horizontalNavLink:{color:t.secondary.main,paddingTop:3*n.unit,paddingBottom:3*n.unit,textDecoration:"none",display:"inline-block",borderBottom:"solid 1px",borderBottomColor:t.common.white,"&:hover":{borderBottomColor:t.primary.main}},activeNavLink:{color:t.primary.main,borderBottomColor:t.primary.main}})},rK=(0,b.withStyles)(rW)(function(e){var t=e.authenticated,n=e.classes,r=e.isFeedsManagerFeatureEnabled,i=(0,h.TH)().pathname;return l.createElement(x.default,{variant:"body1",component:"div"},l.createElement(w.default,{className:n.horizontalNav},rU.map(function(e){var t=rF(e,2),r=t[0],a=t[1];return l.createElement(_.default,{key:r,className:n.horizontalNavItem},l.createElement(tz,{key:r,href:r,className:O()(n.horizontalNavLink,i.startsWith(r)&&n.activeNavLink)},a))}),r&&l.createElement(_.default,{className:n.horizontalNavItem},l.createElement(tz,{href:"/job_distributors",className:O()(n.horizontalNavLink,i.includes("/job_distributors")&&n.activeNavLink)},"Job Distributors")),t&&l.createElement(l.Fragment,null,l.createElement(_.default,{className:n.horizontalNavItem},l.createElement(tH,null),l.createElement(tL,null)))))}),rV=function(e){var t=e.palette,n=e.spacing,r=e.zIndex;return(0,b.createStyles)({appBar:{backgroundColor:t.common.white,zIndex:r.modal-1},toolbar:{paddingLeft:5*n.unit,paddingRight:5*n.unit}})},rq=(0,b.withStyles)(rV)(function(e){var t=e.authenticated,n=e.classes,r=e.fetchCount,a=e.drawerContainer,o=e.onResize,s=e.submitSignOut,u=rF(l.useState(!1),2),c=u[0],f=u[1],h=rL(i.FeedsManager),p=function(){f(!c)};return l.createElement(m.Z,{className:n.appBar,color:"default",position:"absolute"},l.createElement(tg,{refreshMode:"debounce",refreshRate:200,onResize:o,handleHeight:!0},l.createElement(tV,{fetchCount:r}),l.createElement(k.default,{className:n.toolbar},l.createElement(d.Z,{container:!0,alignItems:"center"},l.createElement(d.Z,{item:!0,xs:11,sm:6,md:4},l.createElement(tz,{href:"/"},l.createElement(tQ,{width:200}))),l.createElement(d.Z,{item:!0,xs:1,sm:6,md:8},l.createElement(d.Z,{container:!0,justify:"flex-end"},l.createElement(d.Z,{item:!0},l.createElement(v.Z,{mdUp:!0},l.createElement(y.default,{"aria-label":"open drawer",onClick:p},l.createElement(T.Z,null))),l.createElement(v.Z,{smDown:!0},l.createElement(rK,{authenticated:t,isFeedsManagerFeatureEnabled:h})))))))),l.createElement(S.default,{container:a},l.createElement(rG,{isFeedsManagerFeatureEnabled:h,toggleDrawer:p,drawerOpen:c,authenticated:t,submitSignOut:s})))}),rZ=function(e){return{authenticated:e.authentication.allowed,fetchCount:t1(e),url:e.notifications.currentUrl}},rX=function(e){return(0,tv.DE)({submitSignOut:ty.EO},e)},rJ=(0,A.$j)(rZ,rX)(rq);let rQ=(0,b.withStyles)(rV)(rJ);var r1=n(3950),r0=n(16353),r2=n(19084);function r3(){return(r3=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var r4=function(e){var t=(0,A.I0)(),n=(0,h.TH)().pathname;return(l.useEffect(function(){t({type:r2.di.MATCH_ROUTE,pathname:n})},[t,n]),(0,r0.rH)(function(e){return e.authentication.allowed}))?l.createElement(h.AW,r3({},e)):l.createElement(h.l_,{to:"/signin"})};let r6=r4;var r5=n(82204),r8=n(15417),r9=n(90070),r7=n(72883),ie=n(51531),it=n(18217),ir=n(17175),ii=n(68821),ia=n(21727),io=function(e){return(0,b.createStyles)({paper:{backgroundColor:e.palette.primary.light,padding:2*e.spacing.unit,display:"flex"},icon:{marginRight:e.spacing.unit}})},is=(0,b.withStyles)(io)(function(e){var t=e.classes;return l.createElement(ii.default,{className:t.paper},l.createElement(ia.Z,{className:t.icon}),l.createElement(x.default,null,"Multi-chain functionality is in Beta"))}),iu=function(e){return(0,b.createStyles)({cell:{paddingTop:2*e.spacing.unit,paddingBottom:2*e.spacing.unit},row:{transform:"scale(1)"},link:{"&::before":{content:"''",position:"absolute",top:0,left:0,width:"100%",height:"100%"}}})},ic=n(19350),il=function(){return(0,b.createStyles)({link:{color:ic.BA[900],textDecoration:"none"},linkContent:{display:"inline-block"}})},id=function(e){var t=e.children,n=e.classes,r=e.className,i=e.href,a=e.variant,o=e.color,s=a||"body1",u=o||"inherit";return l.createElement(tz,{href:i,className:O()(n.link,r)},l.createElement(x.default,{variant:s,color:u,className:n.linkContent},t))};let ih=(0,b.withStyles)(il)(id);var ip=(0,b.withStyles)(iu)(function(e){var t=e.chain,n=e.classes;return l.createElement(ir.Z,{className:n.row,hover:!0},l.createElement(r7.default,{className:n.cell,component:"th",scope:"row"},l.createElement(ih,{className:n.link,href:"/chains/".concat(t.id)},t.id)),l.createElement(r7.default,null,t.enabled.toString()))}),ib=function(e){return{content:{padding:5*e.spacing.unit}}},im=function(e){var t=e.children,n=e.classes;return l.createElement("div",{className:n.content},t)};let ig=(0,b.withStyles)(ib)(im);var iv=function(){return(0,b.createStyles)({root:{fontSize:30}})},iy=(0,b.withStyles)(iv)(function(e){var t=e.children,n=e.classes;return l.createElement(x.default,{variant:"h1",className:n.root},t)}),iw=n(60520),i_=function(e){return(0,b.createStyles)({textField:{marginBottom:2*e.spacing.unit},input:{padding:14,backgroundColor:"white",borderRadius:4}})},iE=(0,b.withStyles)(i_)(function(e){var t=e.classes,n=e.onChange,r=e.placeholder,i=e.value;return l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(iw.Z,{className:t.textField,inputProps:{className:t.input},InputLabelProps:{shrink:!0},placeholder:r||"Search",value:i,name:"search",onChange:function(e){return n(e.target.value)},variant:"outlined",fullWidth:!0})))});function iS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ik(e){if(Array.isArray(e))return e}function ix(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function iT(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function iM(e,t){return ik(e)||ix(e,t)||iO(e,t)||iT()}function iO(e,t){if(e){if("string"==typeof e)return iS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iS(e,t)}}var iA=function(e){var t=e.toLowerCase();return function(e){return e.toLowerCase().includes(t)}},iL=function(e){return function(t){return""===e||iC(t,e)}};function iC(e,t){var n;return[e.id].some(iA(t))}var iI=function(e){var t=e.chains,n=e.page,r=e.pageSize,i=e.total,a=(0,h.k6)(),o=iM(l.useState(""),2),s=o[0],u=o[1],c=(0,l.useMemo)(function(){return t.filter(iL(s.trim()))},[s,t]);return l.createElement(ig,null,l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12},l.createElement(is,null)),l.createElement(d.Z,{item:!0,xs:12},l.createElement(iy,null,"Chains")),l.createElement(d.Z,{item:!0,xs:12},l.createElement(iE,{value:s,onChange:u,placeholder:"Search chains"}),l.createElement(r5.Z,null,l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,"Chain ID"),l.createElement(r7.default,null,"Enabled"))),l.createElement(r9.Z,null,0===c.length&&l.createElement(ir.Z,null,l.createElement(r7.default,{component:"th",scope:"row",colSpan:3},"No chains found")),c.map(function(e){return l.createElement(ip,{key:e.id,chain:e})}))),l.createElement(it.Z,{component:"div",count:i,rowsPerPage:r,rowsPerPageOptions:[r],page:n-1,onChangePage:function(e,t){a.push("/chains?page=".concat(t+1,"&per=").concat(r))},onChangeRowsPerPage:function(){},backIconButtonProps:{"aria-label":"prev-page"},nextIconButtonProps:{"aria-label":"next-page"}})))))},iD=function(e){var t=e.error,n=(0,h.k6)(),r=(0,A.I0)();return t?(t.graphQLErrors.forEach(function(e){var t;(null===(t=e.extensions)||void 0===t?void 0:t.code)=="UNAUTHORIZED"&&(r((0,ty.Jc)()),n.push("/signin"))}),l.createElement("div",null,"Error: ",t.message)):null},iN=n(30866),iP=function(e){return{root:{margin:2*e.spacing.unit},gridItem:{display:"flex",justifyContent:"center"}}},iR=(0,b.withStyles)(iP)(function(e){var t=e.classes;return l.createElement(d.Z,{container:!0,className:t.root},l.createElement(d.Z,{item:!0,xs:12,className:t.gridItem},l.createElement(iN.Z,{"data-testid":"loading-spinner"})))}),ij=function(){var e=(0,h.TH)().search;return l.useMemo(function(){return new URLSearchParams(e)},[e])};function iF(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function iY(){var e=iF(["\n fragment ChainsPayload_ResultsFields on Chain {\n id\n enabled\n network\n }\n"]);return iY=function(){return e},e}function iB(){var e=iF(["\n ","\n query FetchChains($offset: Int, $limit: Int) {\n chains(offset: $offset, limit: $limit) {\n results {\n ...ChainsPayload_ResultsFields\n }\n metadata {\n total\n }\n }\n }\n"]);return iB=function(){return e},e}var iU=n0(iY()),iH=n0(iB(),iU),i$=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return rv(iH,e)},iz=function(){var e=ij(),t=parseInt(e.get("page")||"1",10),n=parseInt(e.get("per")||"50",10),r=i$({variables:{offset:(t-1)*n,limit:n},fetchPolicy:"network-only"}),i=r.data,a=r.loading,o=r.error;return a?l.createElement(iR,null):o?l.createElement(iD,{error:o}):i?l.createElement(iI,{chains:i.chains.results,page:t,pageSize:n,total:i.chains.metadata.total}):null},iG=n(67932),iW=n(8126),iK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function iV(e){if(iq())return Intl.DateTimeFormat.supportedLocalesOf(e)[0]}function iq(){return("undefined"==typeof Intl?"undefined":iK(Intl))==="object"&&"function"==typeof Intl.DateTimeFormat}var iZ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},iX=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function iJ(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var iQ=function(){function e(){iJ(this,e),this.cache={}}return iX(e,[{key:"get",value:function(){for(var e=this.cache,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var i=n,a=Array.isArray(i),o=0,i=a?i:i[Symbol.iterator]();;){if(a){if(o>=i.length)break;s=i[o++]}else{if((o=i.next()).done)break;s=o.value}var s,u=s;if((void 0===e?"undefined":iZ(e))!=="object")return;e=e[u]}return e}},{key:"put",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=t.pop(),i=t.pop(),a=this.cache,o=t,s=Array.isArray(o),u=0,o=s?o:o[Symbol.iterator]();;){if(s){if(u>=o.length)break;c=o[u++]}else{if((u=o.next()).done)break;c=u.value}var c,l=c;"object"!==iZ(a[l])&&(a[l]={}),a=a[l]}return a[i]=r}}]),e}();let i1=iQ;var i0=new i1;function i2(e,t){if(!iq())return function(e){return e.toString()};var n=i4(e),r=JSON.stringify(t),i=i0.get(String(n),r)||i0.put(String(n),r,new Intl.DateTimeFormat(n,t));return function(e){return i.format(e)}}var i3={};function i4(e){var t=e.toString();return i3[t]?i3[t]:i3[t]=iV(e)}var i6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function i5(e){return i8(e)?e:new Date(e)}function i8(e){return e instanceof Date||i9(e)}function i9(e){return(void 0===e?"undefined":i6(e))==="object"&&"function"==typeof e.getTime}var i7=n(54087),ae=n.n(i7);function at(e,t){if(0===e.length)return 0;for(var n=0,r=e.length-1,i=void 0;n<=r;){var a=t(e[i=Math.floor((r+n)/2)]);if(0===a)return i;if(a<0){if((n=i+1)>r)return n}else if((r=i-1)<n)return n}}var an=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(u){i=!0,a=u}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw TypeError("Invalid attempt to destructure non-iterable instance")}}();let ar={instances:[],add:function(e){var t=this,n=0===this.instances.length;return ao(this.instances,e),n&&this.start(),{stop:function(){as(t.instances,e),0===t.instances.length&&t.stop()},forceUpdate:function(){aa(e,t.instances)}}},tick:function(){for(var e=Date.now();;){var t=this.instances[0];if(e>=t.nextUpdateTime)aa(t,this.instances);else break}},scheduleNextTick:function(){var e=this;this.scheduledTick=ae()(function(){e.tick(),e.scheduleNextTick()})},start:function(){this.scheduleNextTick()},stop:function(){ae().cancel(this.scheduledTick)}};function ai(e){var t=an(e.getNextValue(),2),n=t[0],r=t[1];e.setValue(n),e.nextUpdateTime=r}function aa(e,t){ai(e),as(t,e),ao(t,e)}function ao(e,t){var n=au(e,t);e.splice(n,0,t)}function as(e,t){var n=e.indexOf(t);e.splice(n,1)}function au(e,t){var n=t.nextUpdateTime;return at(e,function(e){return e.nextUpdateTime===n?0:e.nextUpdateTime>n?1:-1})}var ac=(0,ec.oneOfType)([(0,ec.shape)({minTime:ec.number,formatAs:ec.string.isRequired}),(0,ec.shape)({test:ec.func,formatAs:ec.string.isRequired}),(0,ec.shape)({minTime:ec.number,format:ec.func.isRequired}),(0,ec.shape)({test:ec.func,format:ec.func.isRequired})]),al=(0,ec.oneOfType)([ec.string,(0,ec.shape)({steps:(0,ec.arrayOf)(ac).isRequired,labels:(0,ec.oneOfType)([ec.string,(0,ec.arrayOf)(ec.string)]).isRequired,round:ec.string})]),af=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ad=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(u){i=!0,a=u}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw TypeError("Invalid attempt to destructure non-iterable instance")}}();function ah(e,t){var n={};for(var r in e)!(t.indexOf(r)>=0)&&Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function ap(e){var t=e.date,n=e.future,r=e.timeStyle,i=e.round,a=e.minTimeLeft,o=e.tooltip,s=e.component,u=e.container,c=e.wrapperComponent,f=e.wrapperProps,d=e.locale,h=e.locales,p=e.formatVerboseDate,b=e.verboseDateFormat,m=e.updateInterval,g=e.tick,v=ah(e,["date","future","timeStyle","round","minTimeLeft","tooltip","component","container","wrapperComponent","wrapperProps","locale","locales","formatVerboseDate","verboseDateFormat","updateInterval","tick"]),y=(0,l.useMemo)(function(){return d&&(h=[d]),h.concat(iW.Z.getDefaultLocale())},[d,h]),w=(0,l.useMemo)(function(){return new iW.Z(y)},[y]);t=(0,l.useMemo)(function(){return i5(t)},[t]);var _=(0,l.useCallback)(function(){var e=Date.now(),o=void 0;if(n&&e>=t.getTime()&&(e=t.getTime(),o=!0),void 0!==a){var s=t.getTime()-1e3*a;e>s&&(e=s,o=!0)}var u=w.format(t,r,{getTimeToNextUpdate:!0,now:e,future:n,round:i}),c=ad(u,2),l=c[0],f=c[1];return f=o?ag:m||f||6e4,[l,e+f]},[t,n,r,m,i,a,w]),E=(0,l.useRef)();E.current=_;var S=(0,l.useMemo)(_,[]),k=ad(S,2),x=k[0],T=k[1],M=(0,l.useState)(x),O=ad(M,2),A=O[0],L=O[1],C=ad((0,l.useState)(),2),I=C[0],D=C[1],N=(0,l.useRef)();(0,l.useEffect)(function(){if(g)return N.current=ar.add({getNextValue:function(){return E.current()},setValue:L,nextUpdateTime:T}),function(){return N.current.stop()}},[g]),(0,l.useEffect)(function(){if(N.current)N.current.forceUpdate();else{var e=_(),t=ad(e,1)[0];L(t)}},[_]),(0,l.useEffect)(function(){D(!0)},[]);var P=(0,l.useMemo)(function(){if("undefined"!=typeof window)return i2(y,b)},[y,b]),R=(0,l.useMemo)(function(){if("undefined"!=typeof window)return p?p(t):P(t)},[t,p,P]),j=l.createElement(s,af({date:t,verboseDate:I?R:void 0,tooltip:o},v),A),F=c||u;return F?l.createElement(F,af({},f,{verboseDate:I?R:void 0}),j):j}ap.propTypes={date:el().oneOfType([el().instanceOf(Date),el().number]).isRequired,locale:el().string,locales:el().arrayOf(el().string),future:el().bool,timeStyle:al,round:el().string,minTimeLeft:el().number,component:el().elementType.isRequired,tooltip:el().bool.isRequired,formatVerboseDate:el().func,verboseDateFormat:el().object,updateInterval:el().oneOfType([el().number,el().arrayOf(el().shape({threshold:el().number,interval:el().number.isRequired}))]),tick:el().bool,wrapperComponent:el().func,wrapperProps:el().object},ap.defaultProps={locales:[],component:av,tooltip:!0,verboseDateFormat:{weekday:"long",day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},tick:!0},ap=l.memo(ap);let ab=ap;var am,ag=31536e9;function av(e){var t=e.date,n=e.verboseDate,r=e.tooltip,i=e.children,a=ah(e,["date","verboseDate","tooltip","children"]),o=(0,l.useMemo)(function(){return t.toISOString()},[t]);return l.createElement("time",af({},a,{dateTime:o,title:r?n:void 0}),i)}av.propTypes={date:el().instanceOf(Date).isRequired,verboseDate:el().string,tooltip:el().bool.isRequired,children:el().string.isRequired};var ay=n(30381),aw=n.n(ay),a_=n(31657);function aE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){aE(e,t,n[t])})}return e}var ak=function(e){var t=e.palette,n=e.shadows,r=e.typography;return(0,b.createStyles)({lightTooltip:aS({background:t.primary.contrastText,color:t.text.primary,boxShadow:n[24]},r.h6)})},ax=function(e){var t=e.title,n=e.children,r=e.classes;return l.createElement(a_.Z,{title:t,classes:{tooltip:r.lightTooltip}},n)},aT=(0,b.withStyles)(ak)(ax),aM=function(e){return e&&aw()(e).format()},aO=function(e){var t=e.children,n=e.tooltip,r=void 0!==n&&n,i=Date.parse(t),a=l.createElement(ab,{tooltip:!1,date:i});return r?l.createElement(aT,{title:aM(t)},l.createElement("span",null,a)):a},aA=n(1398);function aL(){return(aL=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var aC=function(e){return l.createElement("svg",aL({style:{cursor:"pointer"},width:"46",height:"46",viewBox:"0 0 46 46",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l.createElement("circle",{r:"22",transform:"matrix(1 0 0 -1 23 23)",stroke:"#364864"}),l.createElement("rect",{width:"1.4605",height:"18.6214",transform:"matrix(0.707107 0.707107 0.707107 -0.707107 16.1333 28.834)",fill:"#686F84"}),l.createElement("rect",{x:"30.3333",y:"28.834",width:"1.4605",height:"18.6214",transform:"rotate(135 30.3333 28.834)",fill:"#686F84"}))};let aI=aC;var aD=n(8330);function aN(e){return e.msg}function aP(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function aR(e){if(Array.isArray(e))return e}function aj(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function aF(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function aY(e,t){return aR(e)||aj(e,t)||aB(e,t)||aF()}function aB(e,t){if(e){if("string"==typeof e)return aP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return aP(e,t)}}var aU=function(e){return(0,b.createStyles)({container:{backgroundColor:e.palette.common.white,padding:5*e.spacing.unit,paddingBottom:0},mainRow:{marginBottom:2*e.spacing.unit},actions:{textAlign:"right"},regionalNavButton:{marginLeft:e.spacing.unit,marginRight:e.spacing.unit},horizontalNav:{paddingBottom:0},horizontalNavItem:{display:"inline",paddingLeft:0,paddingRight:0},horizontalNavLink:{padding:"".concat(4*e.spacing.unit,"px ").concat(4*e.spacing.unit,"px"),textDecoration:"none",display:"inline-block",borderBottom:"solid 1px",borderBottomColor:e.palette.common.white,"&:hover":{borderBottomColor:e.palette.primary.main}},activeNavLink:{color:e.palette.primary.main,borderBottomColor:e.palette.primary.main},chainId:{overflow:"hidden",textOverflow:"ellipsis"},badgePadding:{paddingLeft:2*e.spacing.unit,paddingRight:2*e.spacing.unit,marginLeft:-2*e.spacing.unit,marginRight:-2*e.spacing.unit,lineHeight:"1rem"},dialogPaper:{minHeight:"260px",maxHeight:"260px",minWidth:"670px",maxWidth:"670px",overflow:"hidden",borderRadius:3*e.spacing.unit},warningText:{fontWeight:500,marginLeft:3*e.spacing.unit,marginTop:3*e.spacing.unit,marginBottom:e.spacing.unit},closeButton:{marginRight:3*e.spacing.unit,marginTop:3*e.spacing.unit},infoText:{fontSize:2*e.spacing.unit,fontWeight:450,marginLeft:6*e.spacing.unit},modalTextarea:{marginLeft:2*e.spacing.unit},modalContent:{width:"inherit"},deleteButton:{marginTop:4*e.spacing.unit},runJobButton:{marginBottom:3*e.spacing.unit},runJobModalContent:{overflow:"hidden"}})},aH=function(e){var t=e.id;return l.createElement(l.Fragment,null,"Successfully deleted chain ",t)},a$=function(e){var t=e.classes,n=e.chainId,r=e.chain,i=e.deleteChain,a=aY((0,l.useState)(!1),2),o=a[0],s=a[1],u=aY((0,l.useState)(!1),2),c=u[0],f=u[1],p=(0,h.TH)(),b=p.pathname.endsWith("/config-overrides"),m=p.pathname.endsWith("/edit"),g=!b&&!m,v=function(e){i(e,function(){return aH({id:e})},aN),f(!0)};return l.createElement(l.Fragment,null,l.createElement(aD.Z,{open:o,classes:{paper:t.dialogPaper},onClose:function(){return s(!1)}},l.createElement(d.Z,{container:!0,spacing:0},l.createElement(d.Z,{item:!0,className:t.modalContent},l.createElement(d.Z,{container:!0,alignItems:"baseline",justify:"space-between"},l.createElement(d.Z,{item:!0},l.createElement(x.default,{variant:"h5",color:"secondary",className:t.warningText},"Warning: This Action Cannot Be Undone")),l.createElement(d.Z,{item:!0},l.createElement(aI,{className:t.closeButton,onClick:function(){return s(!1)}}))),l.createElement(d.Z,{container:!0,direction:"column"},l.createElement(d.Z,{item:!0},l.createElement(d.Z,{item:!0},l.createElement(x.default,{className:t.infoText,variant:"h5",color:"secondary"},"- Disabling the chain may be a safer option"),l.createElement(x.default,{className:t.infoText,variant:"h5",color:"secondary"},"- All associated RPC Nodes will be permanently deleted"),l.createElement(x.default,{className:t.infoText,variant:"h5",color:"secondary"},"- Access to this page will be lost"))),l.createElement(d.Z,{container:!0,spacing:0,alignItems:"center",justify:"center"},l.createElement(d.Z,{item:!0,className:t.deleteButton},l.createElement(aA.Z,{variant:"danger",onClick:function(){return v(n)}},"Delete ",n,c&&l.createElement(h.l_,{to:"/"})))))))),l.createElement(r5.Z,{className:t.container},l.createElement(d.Z,{container:!0,spacing:0},l.createElement(d.Z,{item:!0,xs:12},l.createElement(d.Z,{container:!0,spacing:0,alignItems:"center",className:t.mainRow},l.createElement(d.Z,{item:!0,xs:12},r&&l.createElement(x.default,{variant:"h5",color:"secondary",className:t.chainId},"Chain ",r.id||n)))),l.createElement(d.Z,{item:!0,xs:12},(null==r?void 0:r.attributes.createdAt)&&l.createElement(x.default,{variant:"subtitle2",color:"textSecondary"},"Created"," ",l.createElement(aO,{tooltip:!1},r.attributes.createdAt)," ","(",aM(r.attributes.createdAt),")")),l.createElement(d.Z,{item:!0,xs:12},l.createElement(w.default,{className:t.horizontalNav},l.createElement(_.default,{className:t.horizontalNavItem},l.createElement(ih,{href:"/chains/".concat(n),className:O()(t.horizontalNavLink,g&&t.activeNavLink)},"Nodes")))))))},az=(0,A.$j)(null,{deleteChain:ty.KL})(a$);let aG=(0,b.withStyles)(aU)(az);var aW=n(30060),aK=n(7554),aV=function(e){var t=e.children,n=e.divider,r=void 0!==n&&n;return l.createElement(l.Fragment,null,l.createElement(aW.Z,null,l.createElement(x.default,{variant:"h5",color:"secondary"},t)),r&&l.createElement(aK.Z,null))},aq=(0,b.withStyles)(iu)(function(e){var t=e.node,n=e.classes;return l.createElement(ir.Z,{className:n.row,hover:!0},l.createElement(r7.default,{className:n.cell,component:"th",scope:"row"},l.createElement(ih,{className:n.link,href:"/nodes/".concat(t.attributes.name)},t.attributes.name)),l.createElement(r7.default,null,t.attributes.chainID),l.createElement(r7.default,null,t.attributes.state))}),aZ=function(e){var t=e.nodes,n=e.nodeFilter,r=t.filter(n);return l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,l.createElement(x.default,{variant:"body1",color:"textSecondary"},"Name")),l.createElement(r7.default,null,l.createElement(x.default,{variant:"body1",color:"textSecondary"},"EVM Chain ID")),l.createElement(r7.default,null,l.createElement(x.default,{variant:"body1",color:"textSecondary"},"State")))),l.createElement(r9.Z,null,!r.length&&l.createElement(ir.Z,null,l.createElement(r7.default,{component:"th",scope:"row",colSpan:3},"No nodes found.")),r.map(function(e){return l.createElement(aq,{key:e.id,node:e})})))};let aX=aZ;var aJ=function(e){var t=e.nodes,n=e.chain,r=function(e){return e.attributes.chainID===n.id};return l.createElement(ig,null,n&&l.createElement(d.Z,{container:!0,spacing:40},l.createElement(d.Z,{item:!0,xs:12},l.createElement(r5.Z,null,l.createElement(aV,{divider:!0},"Nodes"),l.createElement(aX,{nodes:t,nodeFilter:r})))))};function aQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function a1(e){if(Array.isArray(e))return e}function a0(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function a2(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){a0(a,r,i,o,s,"next",e)}function s(e){a0(a,r,i,o,s,"throw",e)}o(void 0)})}}function a3(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function a4(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a6(e,t){return a1(e)||a3(e,t)||a5(e,t)||a4()}function a5(e,t){if(e){if("string"==typeof e)return aQ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return aQ(e,t)}}var a8=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},a9=function(){var e,t=(0,h.UO)().chainId,n=(0,h.$B)().path,r=a6(l.useState(),2),i=r[0],a=r[1],o=a6(l.useState([]),2),s=o[0],u=o[1],c=(e=a2(function(){var e;return a8(this,function(t){switch(t.label){case 0:return[4,iG.v2.nodes.getNodes()];case 1:return u((e=t.sent()).data),[2]}})}),function(){return e.apply(this,arguments)});return l.useEffect(function(){c()},[]),l.useEffect(function(){Promise.all([iG.v2.chains.getChains()]).then(function(e){return a6(e,1)[0].data.find(function(e){return e.id===t})}).then(a)},[t]),l.createElement(l.Fragment,null,l.createElement(aG,{chainId:t,chain:i}),l.createElement(h.rs,null,l.createElement(h.AW,{path:"".concat(n)},i&&l.createElement(aJ,{nodes:s,chain:i}))))};let a7=a9;function oe(){return(oe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ot=function(e){return l.createElement("svg",oe({id:"Layer_1","data-name":"Layer 1",width:"813px",height:"526.5px",viewBox:"0 0 780.98 512.82"},e),l.createElement("defs",null),l.createElement("path",{d:"M222.2 330.36l-76-43.9v-87.8l76-43.9 76 43.9v87.8zm-72-46.21l72 41.59 72-41.59V201l-72-41.6-72 41.6v83.18zm213.31-76.91l-40.07-23.14v-46.26l40.07-23.13 40.07 23.13v46.26zm-36.07-25.44l36.07 20.83 36.07-20.83v-41.66l-36.07-20.83-36.07 20.83v41.66zM222.2 125.66l-40.07-23.13V56.26l40.07-23.14 40.07 23.13v46.27zm-36.07-25.44L222.2 121l36.07-20.83V58.56L222.2 37.74l-36.07 20.82v41.65zM80.89 207.24L40.82 184.1v-46.26l40.07-23.14L121 137.84v46.26zM44.82 181.8l36.07 20.83L117 181.8v-41.66l-36.11-20.82-36.07 20.82v41.66zm36.07 188.61l-40.07-23.14V301l40.07-23.14L121 301v46.27zM44.82 345l36.07 20.83L117 345v-41.69l-36.11-20.82-36.07 20.82V345zM222.2 453.14L182.13 430v-46.26l40.07-23.14 40.07 23.14V430zm-36.07-25.44l36.07 20.82 36.07-20.82V386l-36.07-20.78L186.13 386v41.7z",fill:"#3c40c6",transform:"translate(-40.82 -33.12)"}),l.createElement("path",{d:"M216.86 182.36a8.31 8.31 0 0 1-4.75 1.26 9.88 9.88 0 0 1-5.08-1.53q-2.41-1.49-2.29-3.42t2.64-3.49l2.62-1.61a11.12 11.12 0 0 1 5.63-1.63 9.71 9.71 0 0 1 5.5 1.39q2.44 1.51 2.56 3.17t-2.08 3h-.08l-2.22-1.37a2.41 2.41 0 0 0 1.41-1.8 2.37 2.37 0 0 0-1.44-1.85 5.29 5.29 0 0 0-3.35-.7 8.23 8.23 0 0 0-3.62 1.21l-2.64 1.62a3.87 3.87 0 0 0-2 2.26 1.94 1.94 0 0 0 1.17 2.1 5.39 5.39 0 0 0 2.93.87 5.55 5.55 0 0 0 2.9-.87zm8.3 10.79l-2.29-1.42 5.87-3.62-6.16-3.81-5.87 3.62-2.29-1.42 13.77-8.5 2.29 1.42-6.05 3.73 6.16 3.81 6.05-3.73 2.29 1.42zm13.76 4.55l-5.38-3.33-4.31 1.3-2.32-1.44 18.82-5.36 2.17 1.35-8.77 11.58-2.33-1.44zm-2.8-4.11l4.07 2.52 3.89-4.86H244zm7.07 10.72l-2.29-1.42 13.76-8.49 2.29 1.42zm13.6 8.42l-2.29-1.42 3.95-10h-.08l-10 6.18-2.29-1.42 13.76-8.49 2.29 1.42-3.94 10h.08l10-6.18 2.29 1.42zm-73.62-19.15l6.32 3.91-1.84 1.14-8.65-5.34 13.76-8.49 2.29 1.42zm8.66 7.64l-2.29-1.42 13.76-8.49 2.29 1.42zm13.6 8.42l-2.29-1.42 4-10h-.08l-10 6.18-2.37-1.4 13.76-8.49 2.29 1.42-3.94 10h.08l10-6.18 2.29 1.42zm12.63.46l-1.59-1-6 3.67-2.29-1.42 13.82-8.47 2.29 1.42-5.83 3.6 1.31.81 10.15-.92 2.72 1.68-11.57 1-1.8 7.77-2.8-1.74zM485 545.94L353.63 470.1V318.44L485 242.6l131.34 75.83V470.1zm-103.35-92L485 513.6l103.34-59.67V334.6L485 274.94 381.63 334.6v119.34z",fill:"#3c40c6",transform:"translate(-40.82 -33.12)"}),l.createElement("path",{d:"M465.82 326.56a7.46 7.46 0 0 1-2 5.36 7 7 0 0 1-5.27 2.13 6.72 6.72 0 0 1-5.16-2.13 7.56 7.56 0 0 1-2-5.36v-3.18a7.57 7.57 0 0 1 2-5.36 6.7 6.7 0 0 1 5.14-2.13 7 7 0 0 1 5.27 2.11 7.45 7.45 0 0 1 2 5.36v3.18zm-2.93-3.2a5.47 5.47 0 0 0-1.18-3.62 3.94 3.94 0 0 0-3.19-1.42 3.71 3.71 0 0 0-3.07 1.42 5.65 5.65 0 0 0-1.13 3.62v3.2a5.71 5.71 0 0 0 1.13 3.65 3.71 3.71 0 0 0 3.08 1.42 3.92 3.92 0 0 0 3.19-1.42 5.56 5.56 0 0 0 1.17-3.66v-3.2zm5.11 3.76a7.15 7.15 0 0 1 1.6-4.8 6.12 6.12 0 0 1 8.65-.17l.17.17a7.08 7.08 0 0 1 1.61 4.8v.25a7.11 7.11 0 0 1-1.61 4.82 6.16 6.16 0 0 1-8.71.11l-.11-.11a7.13 7.13 0 0 1-1.6-4.81v-.25zm3 .25a5.84 5.84 0 0 0 .75 3.12 2.84 2.84 0 0 0 4.63 0 5.7 5.7 0 0 0 .78-3.12v-.25a5.63 5.63 0 0 0-.78-3.09 2.8 2.8 0 0 0-4.63 0 5.81 5.81 0 0 0-.75 3.09v.25zm23 .31a7.39 7.39 0 0 1-1.35 4.62 4.45 4.45 0 0 1-3.75 1.76 4.64 4.64 0 0 1-2-.4 4.06 4.06 0 0 1-1.48-1.18v6.36h-3v-18.16H485l.29 1.65a4.36 4.36 0 0 1 1.52-1.41 4.25 4.25 0 0 1 2.07-.49 4.35 4.35 0 0 1 3.78 1.92 8.61 8.61 0 0 1 1.35 5.06v.27zm-2.93-.26a6.38 6.38 0 0 0-.76-3.29 2.47 2.47 0 0 0-2.26-1.28 2.94 2.94 0 0 0-1.56.39 2.89 2.89 0 0 0-1 1.1v5.92a2.73 2.73 0 0 0 1 1.06 3.13 3.13 0 0 0 1.59.37 2.53 2.53 0 0 0 2.25-1.11 5.12 5.12 0 0 0 .75-2.91v-.25zm12.69 2.82a1.37 1.37 0 0 0-.58-1.13 5.81 5.81 0 0 0-2.17-.79 9 9 0 0 1-3.56-1.41 3 3 0 0 1-1.21-2.49 3.54 3.54 0 0 1 1.39-2.81 5.55 5.55 0 0 1 3.67-1.16 5.75 5.75 0 0 1 3.81 1.18 3.5 3.5 0 0 1 1.35 2.93v.07h-2.82a1.85 1.85 0 0 0-.62-1.39 2.38 2.38 0 0 0-1.7-.58 2.43 2.43 0 0 0-1.62.48 1.48 1.48 0 0 0-.56 1.17 1.31 1.31 0 0 0 .53 1.1 5.66 5.66 0 0 0 2.14.72 9 9 0 0 1 3.67 1.44 3 3 0 0 1 1.19 2.53 3.44 3.44 0 0 1-1.47 2.9 6.22 6.22 0 0 1-3.85 1.1 5.87 5.87 0 0 1-4-1.31 3.7 3.7 0 0 1-1.41-3v-.07h2.74a2 2 0 0 0 .82 1.66 3.31 3.31 0 0 0 1.89.52 3 3 0 0 0 1.76-.44 1.37 1.37 0 0 0 .61-1.22zm8.69 3.56h-2.93V331h2.93v2.8zm6.55 0h-2.93V331H519v2.8zm6.56 0h-2.93V331h2.93v2.8zm-84.97 59.71h-24.72l-1.81-7.88 27.75-32.16h9.39v31h6.8v9h-6.79v10.91h-10.62v-10.87zm0-9v-15.79l-13.44 15.75h13.44zm21.56-5.38c0-14.67 9.11-26.16 22.55-26.16s22.4 11.35 22.4 26.16-9 26.16-22.55 26.16-22.4-11.35-22.4-26.16zm33.53 0c0-9.18-4.48-16.12-11.13-16.12s-11 6.72-11 16.12 4.41 16.12 11.13 16.12 11-6.8 11-16.12zm41.43 14.38h-24.72l-1.81-7.88 27.75-32.16h9.39v31h6.79v9h-6.79v10.91h-10.61v-10.87zm0-9v-15.79l-13.44 15.75h13.44zm-135.29 48.08v6.69h-3v-17.65h6.9a6.54 6.54 0 0 1 4.58 1.51 5.6 5.6 0 0 1 .08 7.92l-.08.08a6.57 6.57 0 0 1-4.58 1.5h-4zm0-2.36h4a3.23 3.23 0 0 0 2.46-.87 3.1 3.1 0 0 0 .82-2.22 3 3 0 0 0-3.28-3.14h-4v6.23zm20.18 9.05a9.19 9.19 0 0 1-.26-1 6.86 6.86 0 0 1-.14-1 5.21 5.21 0 0 1-1.59 1.54 4.05 4.05 0 0 1-2.21.63 4.36 4.36 0 0 1-3.15-1 3.83 3.83 0 0 1-1.1-2.9 3.42 3.42 0 0 1 1.5-3 7.26 7.26 0 0 1 4.23-1.06h2.29v-1.15a2.13 2.13 0 0 0-.61-1.61 2.41 2.41 0 0 0-1.73-.58 2.46 2.46 0 0 0-1.6.49 1.54 1.54 0 0 0-.59 1.25h-2.84v-.07a3.25 3.25 0 0 1 1.39-2.75 5.88 5.88 0 0 1 3.84-1.2 5.61 5.61 0 0 1 3.7 1.16 4.1 4.1 0 0 1 1.41 3.35v5.83a10.8 10.8 0 0 0 .11 1.56 8.19 8.19 0 0 0 .35 1.46h-3zm-3.61-2.11a3.7 3.7 0 0 0 2-.56 2.8 2.8 0 0 0 1.18-1.27v-1.94h-2.34a3 3 0 0 0-2 .64 1.93 1.93 0 0 0-.73 1.5 1.53 1.53 0 0 0 .49 1.19 2 2 0 0 0 1.42.44zm8.61-4.27a8.54 8.54 0 0 1 1.37-5 4.41 4.41 0 0 1 3.81-1.93 4.14 4.14 0 0 1 2.07.5 4.37 4.37 0 0 1 1.51 1.45l.29-1.71h2.45v13.11a5 5 0 0 1-1.56 3.92 6.49 6.49 0 0 1-4.44 1.38 8.69 8.69 0 0 1-2.07-.27 9.65 9.65 0 0 1-2-.72l.63-2.31a7.13 7.13 0 0 0 1.61.59 7.68 7.68 0 0 0 1.81.21 3.36 3.36 0 0 0 2.34-.69 2.74 2.74 0 0 0 .74-2.1v-1.35a4.12 4.12 0 0 1-1.46 1.19 4.4 4.4 0 0 1-1.93.41 4.53 4.53 0 0 1-3.78-1.76 7.3 7.3 0 0 1-1.37-4.62v-.3zm3 .25a5.15 5.15 0 0 0 .72 2.89 2.5 2.5 0 0 0 2.24 1.08 3 3 0 0 0 1.59-.39 2.91 2.91 0 0 0 1-1.13v-5.75a3.16 3.16 0 0 0-1.06-1.12 2.88 2.88 0 0 0-1.56-.41 2.42 2.42 0 0 0-2.25 1.27 6.55 6.55 0 0 0-.73 3.3v.25h.05zm17.08 6.38a5.7 5.7 0 0 1-4.44-1.82A6.7 6.7 0 0 1 441 433v-.49a7 7 0 0 1 1.64-4.75 5.2 5.2 0 0 1 4.12-1.87 5.13 5.13 0 0 1 4.07 1.61 6.29 6.29 0 0 1 1.41 4.31v1.73H444v.06a4.1 4.1 0 0 0 .92 2.55 2.9 2.9 0 0 0 2.33 1 6.29 6.29 0 0 0 2-.29 6.67 6.67 0 0 0 1.64-.84l1 1.93a6.08 6.08 0 0 1-2 1.11 8.18 8.18 0 0 1-2.81.47zm-.34-11.25a2.21 2.21 0 0 0-1.79.87 4.26 4.26 0 0 0-.87 2.2v.06h5.2v-.3a3.14 3.14 0 0 0-.64-2 2.32 2.32 0 0 0-1.9-.83zm16.7-2.12l.17 1.89a4.68 4.68 0 0 1 1.62-1.57 4.32 4.32 0 0 1 2.2-.56 4.13 4.13 0 0 1 3.19 1.24 5.57 5.57 0 0 1 1.15 3.87v8.24h-3V431a2.94 2.94 0 0 0-.61-2.1 2.5 2.5 0 0 0-1.86-.62 3.09 3.09 0 0 0-1.54.38 3.18 3.18 0 0 0-1.12 1v9.51h-3v-13.01h2.7zm10.74 6.44a7.15 7.15 0 0 1 1.6-4.8 6.12 6.12 0 0 1 8.65-.17l.17.17a7.08 7.08 0 0 1 1.61 4.8v.25a7.11 7.11 0 0 1-1.61 4.82 6.16 6.16 0 0 1-8.71.11l-.11-.11a7.13 7.13 0 0 1-1.6-4.81v-.26zm3 .25a5.84 5.84 0 0 0 .75 3.12 2.84 2.84 0 0 0 4.63 0 5.7 5.7 0 0 0 .78-3.12v-.25a5.63 5.63 0 0 0-.78-3.09 2.8 2.8 0 0 0-4.63 0 5.81 5.81 0 0 0-.75 3.09v.25zM492.2 423v3.19h2.35v2.18h-2.35v7.25a1.58 1.58 0 0 0 .35 1.16 1.27 1.27 0 0 0 .93.35 2.53 2.53 0 0 0 .47 0 2.86 2.86 0 0 0 .44-.11l.31 2.16a3.38 3.38 0 0 1-.9.32 5 5 0 0 1-1.08.12 3.37 3.37 0 0 1-2.54-1 4.16 4.16 0 0 1-.92-3v-7.25h-2v-2.18h2V423h2.94zm12.1 16.28v-10.94h-2v-2.18h2v-1.53a4.1 4.1 0 0 1 4.5-4.52 5.76 5.76 0 0 1 .86.07l1 .19-.3 2.28-.54-.08a5.42 5.42 0 0 0-.64 0 1.81 1.81 0 0 0-1.44.55 2.3 2.3 0 0 0-.48 1.56v1.53h2.67v2.18h-2.67v10.93h-3zm6.81-6.68a7.15 7.15 0 0 1 1.6-4.8 6.12 6.12 0 0 1 8.65-.17l.17.17a7.08 7.08 0 0 1 1.61 4.8v.25a7.11 7.11 0 0 1-1.61 4.82 6.16 6.16 0 0 1-8.71.11l-.11-.11a7.13 7.13 0 0 1-1.6-4.81v-.26zm3 .25a5.84 5.84 0 0 0 .75 3.12 2.84 2.84 0 0 0 4.63 0 5.7 5.7 0 0 0 .78-3.12v-.25a5.63 5.63 0 0 0-.78-3.09 2.8 2.8 0 0 0-4.63 0 5.81 5.81 0 0 0-.75 3.09v.25zm19.67 4.51a4.49 4.49 0 0 1-1.56 1.61 4.63 4.63 0 0 1-5.48-.78 6.2 6.2 0 0 1-1.19-4.18v-7.84h2.93V434a3.93 3.93 0 0 0 .56 2.41 2 2 0 0 0 1.68.69 3.78 3.78 0 0 0 1.79-.38 2.78 2.78 0 0 0 1.13-1.11v-9.48h3v13.11H534zm8.53-11.2l.17 1.89a4.68 4.68 0 0 1 1.62-1.57 4.32 4.32 0 0 1 2.2-.56 4.13 4.13 0 0 1 3.19 1.24 5.57 5.57 0 0 1 1.15 3.87v8.24h-2.94V431a2.94 2.94 0 0 0-.61-2.1 2.5 2.5 0 0 0-1.86-.62 3.09 3.09 0 0 0-1.54.38 3.18 3.18 0 0 0-1.12 1v9.51h-3v-13.01h2.69zm10.82 6.74a8.64 8.64 0 0 1 1.35-5.06 4.35 4.35 0 0 1 3.78-1.92 4.13 4.13 0 0 1 1.91.43 4.33 4.33 0 0 1 1.46 1.23v-7.21h3v18.91h-2.53l-.29-1.62a4.32 4.32 0 0 1-1.52 1.4 4.26 4.26 0 0 1-2.06.48 4.46 4.46 0 0 1-3.76-1.76 7.39 7.39 0 0 1-1.35-4.62v-.26zm3 .25a5.28 5.28 0 0 0 .7 2.9 2.44 2.44 0 0 0 2.21 1.08 3 3 0 0 0 1.58-.4 3.05 3.05 0 0 0 1.06-1.14v-5.72a3.1 3.1 0 0 0-1.07-1.13 2.88 2.88 0 0 0-1.55-.41 2.38 2.38 0 0 0-2.22 1.27 6.69 6.69 0 0 0-.71 3.3v.25zm14.73 6.13h-2.93v-2.82h2.93v2.82z",fill:"#3c40c6",transform:"translate(-40.82 -33.12)"}),l.createElement("path",{d:"M596.13 301.41h92.43v4h-92.43z",fill:"#3c40c6",transform:"rotate(-29.99 560.23 363.065)"}),l.createElement("path",{d:"M329.93 264.69h4v82.44h-4z",fill:"#3c40c6",transform:"rotate(-60 282.825 324.693)"}),l.createElement("path",{d:"M168.58 153.15h4v119.21h-4z",fill:"#3c40c6",transform:"rotate(-60 121.498 231.54)"}),l.createElement("path",{d:"M179.38 90.23h4v33.71h-4z",fill:"#3c40c6"}),l.createElement("path",{d:"M214.22 210.75h119.21v4H214.22z",fill:"#3c40c6",transform:"rotate(-30 191.62 272.364)"}),l.createElement("path",{d:"M179.38 209.43h4v119.21h-4z",fill:"#3c40c6"}),l.createElement("path",{d:"M116.7 291.73h33.72v4H116.7z",fill:"#3c40c6",transform:"rotate(-29.99 51.364 353.4)"}),l.createElement("path",{d:"M85.48 156.18h10.91v2H85.48z",fill:"#3c40c6",transform:"rotate(-55.92 39.324 179.074)"}),l.createElement("path",{d:"M80.81 158.24h2v5.46h-2z",fill:"#3c40c6",transform:"rotate(-57.85 31.436 181.345)"}),l.createElement("path",{d:"M66.96 163.67h10.92v2H66.96z",fill:"#3c40c6",transform:"rotate(-53.86 19.414 188.284)"}),l.createElement("path",{d:"M67.63 174.87a3.65 3.65 0 1 1 3.65-3.65 3.65 3.65 0 0 1-3.65 3.65zm0-5.3a1.65 1.65 0 1 0 1.65 1.65 1.65 1.65 0 0 0-1.65-1.65zm9.61-7.77a3.65 3.65 0 1 1 3.65-3.65 3.65 3.65 0 0 1-3.65 3.65zm0-5.3a1.65 1.65 0 1 0 1.65 1.65 1.65 1.65 0 0 0-1.65-1.65zm9.11 11.01a3.65 3.65 0 1 1 3.65-3.65 3.65 3.65 0 0 1-3.65 3.65zm0-5.3a1.65 1.65 0 1 0 1.65 1.65 1.65 1.65 0 0 0-1.65-1.65zm9.13-8.09a3.65 3.65 0 1 1 3.65-3.65 3.65 3.65 0 0 1-3.65 3.65zm0-5.3a1.65 1.65 0 1 0 1.65 1.65 1.65 1.65 0 0 0-1.65-1.65z",fill:"#3c40c6",transform:"translate(-40.82 -33.12)"}),l.createElement("path",{d:"M60.63 147.44H19.25v-40.6h2v38.6h39.38v2z",fill:"#3c40c6"}),l.createElement("path",{d:"M380.57 172h-31.18a9.38 9.38 0 0 1-.45-18.74 12.86 12.86 0 0 1 23.89-4.81 8 8 0 0 1 8.7 7.23v.4a8 8 0 0 1-.96 15.92zm-31.18-16.7a7.38 7.38 0 0 0-.54 14.75h31.71a6 6 0 0 0 0-12h-1.09l.06-1.08v-.52a6 6 0 0 0-7.1-5.89l-.74.14-.34-.67a10.86 10.86 0 0 0-20.53 4.33v1l-1.15-.07h-.23z",fill:"#3c40c6",transform:"translate(-40.82 -33.12)"}),l.createElement("path",{d:"M362 165.22h-1.86l-.74-1.92H356l-.7 1.92h-1.81l3.3-8.47h1.81zm-3.15-3.35l-1.17-3.14-1.14 3.14h2.31zm4.07 3.35v-8.47h2.75a9.94 9.94 0 0 1 2 .13 2.22 2.22 0 0 1 1.22.83 2.63 2.63 0 0 1 .49 1.65 2.76 2.76 0 0 1-.28 1.31 2.32 2.32 0 0 1-.72.83 2.46 2.46 0 0 1-.89.4 9.76 9.76 0 0 1-1.77.12h-1.12v3.2h-1.68zm1.71-7v2.4h.94a4.41 4.41 0 0 0 1.35-.13 1.11 1.11 0 0 0 .54-.42 1.14 1.14 0 0 0 .19-.66 1.1 1.1 0 0 0-.27-.76 1.18 1.18 0 0 0-.69-.37 8.13 8.13 0 0 0-1.23-.06h-.83zm5.96 7v-8.47h1.71v8.47h-1.71zM222.2 430.56a8.89 8.89 0 0 1-6.2-15.28v-25.9a6.18 6.18 0 1 1 12.37 0v25.9a8.89 8.89 0 0 1-6.17 15.28zm0-45.37a4.19 4.19 0 0 0-4.18 4.19v26.8l-.34.3a6.9 6.9 0 1 0 9.05 0l-.34-.3v-26.8a4.19 4.19 0 0 0-4.19-4.19z",fill:"#3c40c6",transform:"translate(-40.82 -33.12)"}),l.createElement("path",{d:"M223.08 418.11v-16.3a.89.89 0 1 0-1.77 0v16.31a3.95 3.95 0 1 0 1.77-.01z",fill:"#3c40c6",transform:"translate(-40.82 -33.12)"}),l.createElement("path",{d:"M222.2 426.9a4.95 4.95 0 0 1-1.88-9.52v-15.57a1.89 1.89 0 1 1 3.77 0v15.58a5 5 0 0 1-1.89 9.51zm0-8l-.66.15a2.95 2.95 0 1 0 1.32 0zm4.13-320.98A22.57 22.57 0 0 1 210.65 91c-8.07-8-9.21-20-2.53-26.71l1.41 1.41c-5.9 5.9-4.76 16.63 2.53 23.92s18 8.43 23.92 2.53l1.41 1.41a15.39 15.39 0 0 1-11.06 4.36z",fill:"#3c40c6",transform:"translate(-40.82 -33.12)"}),l.createElement("path",{d:"M234.78 94.52c-4.3 0-11.41-4.83-17.1-10.51a49.49 49.49 0 0 1-8.75-11.37c-2.05-3.93-2.33-6.82-.81-8.34 2.81-2.81 9.63.93 15.08 5.37a1 1 0 0 1-1.26 1.55c-6.18-5-11.16-6.75-12.41-5.5-.62.62-.64 2.53 1.17 6a47.49 47.49 0 0 0 8.39 10.89c8.19 8.19 15.36 11.09 16.89 9.56 1.24-1.24-.48-6.22-5.5-12.41a1 1 0 1 1 1.52-1.27c4.43 5.45 8.17 12.27 5.37 15.08a3.55 3.55 0 0 1-2.59.95z",fill:"#3c40c6",transform:"translate(-40.82 -33.12)"}),l.createElement("path",{d:"M225.09 80.2a3.6 3.6 0 1 1 2.55-1.05 3.6 3.6 0 0 1-2.55 1.05zm0-5.2a1.6 1.6 0 1 0 1.13.47 1.6 1.6 0 0 0-1.13-.47z",fill:"#3c40c6",transform:"translate(-40.82 -33.12)"}),l.createElement("path",{d:"M225.53 83.51a1 1 0 0 1-1-1v-3.17a1 1 0 1 1 2 0v3.17a1 1 0 0 1-1 1zm-3-6.35h-3.34a1 1 0 0 1 0-2h3.34a1 1 0 0 1 0 2zm10.19-1.3a1 1 0 0 1-1-1 4.9 4.9 0 0 0-4.89-4.86 1 1 0 0 1 0-2 6.9 6.9 0 0 1 6.89 6.89 1 1 0 0 1-1 .97z",fill:"#3c40c6",transform:"translate(-40.82 -33.12)"}),l.createElement("path",{d:"M237.82 75.86a1 1 0 0 1-1-1 10 10 0 0 0-10-10 1 1 0 1 1 0-2 12 12 0 0 1 12 12 1 1 0 0 1-1 1zM80.89 342a17.84 17.84 0 1 1 17.84-17.84A17.86 17.86 0 0 1 80.89 342zm0-33.69a15.84 15.84 0 1 0 15.84 15.84 15.86 15.86 0 0 0-15.84-15.86z",fill:"#3c40c6",transform:"translate(-40.82 -33.12)"}),l.createElement("path",{d:"M80.89 342c-7.45 0-13.51-8-13.51-17.84s6.06-17.84 13.51-17.84 13.51 8 13.51 17.84S88.34 342 80.89 342zm0-33.69c-6.35 0-11.51 7.11-11.51 15.84S74.55 340 80.89 340s11.51-7.11 11.51-15.84-5.16-15.87-11.51-15.87z",fill:"#3c40c6",transform:"translate(-40.82 -33.12)"}),l.createElement("path",{d:"M80.89 342c-4.77 0-7.34-9.19-7.34-17.84s2.57-17.84 7.34-17.84 7.34 9.19 7.34 17.84S85.66 342 80.89 342zm0-33.69c-2.52 0-5.34 6.51-5.34 15.84S78.37 340 80.89 340s5.34-6.51 5.34-15.84-2.81-15.87-5.34-15.87z",fill:"#3c40c6",transform:"translate(-40.82 -33.12)"}),l.createElement("path",{d:"M80.89 342a1 1 0 0 1-1-1v-33.71a1 1 0 0 1 2 0V341a1 1 0 0 1-1 1z",fill:"#3c40c6",transform:"translate(-40.82 -33.12)"}),l.createElement("path",{d:"M97 325.14H64.25a1 1 0 0 1 0-2H97a1 1 0 0 1 0 2zm-2.54-9.98H67.32a1 1 0 0 1 0-2h27.14a1 1 0 0 1 0 2zm-.75 19.96h-25.9a1 1 0 0 1 0-2h25.9a1 1 0 0 1 0 2zm142.56-43.54v-29l23-28.4 22.3 1.69v30.62l-22.3 27.19zm22.81-10.7l12.7-15.48V248l-12.7-1L246 263.18v16.5zm-56.19-22.98a2 2 0 0 1-1-.27l-40.33-23.28a2 2 0 1 1 2-3.46l40.33 23.28a2 2 0 0 1-1 3.73zm-9.97 3.56a2 2 0 0 1-1-.27l-30.36-17.53a2 2 0 1 1 2-3.46l30.36 17.53a2 2 0 0 1-1 3.73zm9.97 15.07a2 2 0 0 1-1-.27L161.56 253a2 2 0 1 1 2-3.46l40.33 23.28a2 2 0 0 1-1 3.71zm-8.95 4.15a2 2 0 0 1-1-.27l-31.38-18.12a2 2 0 1 1 2-3.46l31.38 18.12a2 2 0 0 1-1 3.73zm-14.39 1a2 2 0 0 1-1-.27l-17-9.8a2 2 0 1 1 2-3.46l17 9.8a2 2 0 0 1-1 3.73z",fill:"#3c40c6",transform:"translate(-40.82 -33.12)"}),l.createElement(tz,{href:"/"},l.createElement("path",{d:"M706.94 294.93l-74.05-42.75v-85.49l74.05-42.75 74.04 42.75v85.49l-74.04 42.75z",fill:"#3c40c6"})),l.createElement("path",{d:"M706.67 222.71v-17.65h5.87a7.63 7.63 0 0 1 4.58 1.21 4.18 4.18 0 0 1 1.65 3.61 3.55 3.55 0 0 1-.69 2.15 4.09 4.09 0 0 1-1.92 1.41 3.94 3.94 0 0 1 2.42 1.51 4.47 4.47 0 0 1 .85 2.7 4.54 4.54 0 0 1-1.62 3.78 7 7 0 0 1-4.49 1.29h-6.65zm3-10.22h3.25a3.32 3.32 0 0 0 2.16-.65 2.24 2.24 0 0 0 .79-1.84 2.29 2.29 0 0 0-.87-2 4 4 0 0 0-2.45-.64h-2.92v5.07zm0 2.19v5.66h3.71a3.55 3.55 0 0 0 2.35-.7 2.49 2.49 0 0 0 .82-2 3.16 3.16 0 0 0-.69-2.18 2.75 2.75 0 0 0-2.16-.77h-4zm20.33 8.03a9.21 9.21 0 0 1-.26-1 6.86 6.86 0 0 1-.14-.95 5.21 5.21 0 0 1-1.6 1.54 4 4 0 0 1-2.21.63 4.36 4.36 0 0 1-3.15-1.05 3.83 3.83 0 0 1-1.1-2.9 3.42 3.42 0 0 1 1.5-3 7.26 7.26 0 0 1 4.23-1.06h2.29v-1.15a2.13 2.13 0 0 0-.61-1.61 2.41 2.41 0 0 0-1.73-.58 2.46 2.46 0 0 0-1.6.49 1.54 1.54 0 0 0-.59 1.25h-2.83a3.25 3.25 0 0 1 1.39-2.75 5.88 5.88 0 0 1 3.84-1.2 5.61 5.61 0 0 1 3.7 1.16 4.1 4.1 0 0 1 1.41 3.35v5.83a10.79 10.79 0 0 0 .11 1.56 8.19 8.19 0 0 0 .35 1.46h-3zm-3.61-2.11a3.7 3.7 0 0 0 2-.56 2.8 2.8 0 0 0 1.18-1.27v-1.94h-2.34a3 3 0 0 0-2 .64 1.93 1.93 0 0 0-.73 1.5 1.53 1.53 0 0 0 .49 1.19 2 2 0 0 0 1.39.44zm14.46 0a2.69 2.69 0 0 0 1.82-.63 2 2 0 0 0 .74-1.58h2.67v.07a3.87 3.87 0 0 1-1.5 3.17 5.57 5.57 0 0 1-3.75 1.33 5.44 5.44 0 0 1-4.44-1.87 7.16 7.16 0 0 1-1.55-4.73v-.42a7.17 7.17 0 0 1 1.55-4.72 6.13 6.13 0 0 1 8.28-.5 4.43 4.43 0 0 1 1.42 3.5v.07h-2.68a2.57 2.57 0 0 0-.71-1.83 2.42 2.42 0 0 0-1.85-.75 2.49 2.49 0 0 0-2.35 1.2 6 6 0 0 0-.69 3v.42a6 6 0 0 0 .69 3 2.49 2.49 0 0 0 2.35 1.27zm11.9-3.6h-1.32v5.73h-2.93V203.8h2.93v10.81h1.22l3.31-5h3.47l-4.33 6 5 7.15h-3.42zm18.57-10.6v3.19h2.35v2.18h-2.35V219a1.58 1.58 0 0 0 .35 1.16 1.27 1.27 0 0 0 .93.35 2.53 2.53 0 0 0 .47 0 2.86 2.86 0 0 0 .44-.11l.31 2.16a3.38 3.38 0 0 1-.9.32 5 5 0 0 1-1.08.12 3.37 3.37 0 0 1-2.54-1 4.16 4.16 0 0 1-.92-3v-7.25h-2v-2.18h2v-3.17h2.94zm3.79 9.6a7.15 7.15 0 0 1 1.6-4.8 6.12 6.12 0 0 1 8.65-.17l.17.17a7.08 7.08 0 0 1 1.61 4.8v.25a7.11 7.11 0 0 1-1.61 4.82 6.16 6.16 0 0 1-8.71.11l-.11-.11a7.13 7.13 0 0 1-1.6-4.81V216zm3 .25a5.84 5.84 0 0 0 .75 3.12 2.84 2.84 0 0 0 4.63 0 5.7 5.7 0 0 0 .78-3.12V216a5.63 5.63 0 0 0-.78-3.09 2.8 2.8 0 0 0-4.63 0 5.81 5.81 0 0 0-.75 3.09v.25zm-68.2 30.39v.07a5.56 5.56 0 0 1-1.74 4.36 6.79 6.79 0 0 1-4.84 1.68 6.55 6.55 0 0 1-5-2.08 7.49 7.49 0 0 1-1.93-5.31V242a7.58 7.58 0 0 1 1.91-5.32 6.41 6.41 0 0 1 5-2.09 7 7 0 0 1 4.93 1.64 5.55 5.55 0 0 1 1.75 4.42v.07h-2.85a3.42 3.42 0 0 0-3.81-3.77 3.38 3.38 0 0 0-2.87 1.43 5.85 5.85 0 0 0-1.06 3.62v3.38a5.8 5.8 0 0 0 1.08 3.61 3.48 3.48 0 0 0 2.93 1.43 3.69 3.69 0 0 0 2.78-1 3.82 3.82 0 0 0 1-2.77H710zm5.39-5.56a4.67 4.67 0 0 1 1.59-1.43 4.28 4.28 0 0 1 2.08-.51 4.13 4.13 0 0 1 3.25 1.32 6 6 0 0 1 1.17 4.05v8h-3v-8a3.32 3.32 0 0 0-.62-2.24 2.36 2.36 0 0 0-1.85-.69 3.29 3.29 0 0 0-1.54.36 3.19 3.19 0 0 0-1.13 1v9.6h-3v-19h3v7.49zm18.89 11.41a9.19 9.19 0 0 1-.26-1 6.86 6.86 0 0 1-.14-.95 5.21 5.21 0 0 1-1.59 1.54 4 4 0 0 1-2.21.63 4.36 4.36 0 0 1-3.15-1.05 3.83 3.83 0 0 1-1.1-2.9 3.42 3.42 0 0 1 1.5-3 7.26 7.26 0 0 1 4.23-1.06h2.29v-1.15a2.13 2.13 0 0 0-.61-1.61 2.41 2.41 0 0 0-1.73-.58 2.46 2.46 0 0 0-1.6.49 1.54 1.54 0 0 0-.59 1.25h-2.84v-.1a3.25 3.25 0 0 1 1.39-2.75 5.88 5.88 0 0 1 3.84-1.2 5.61 5.61 0 0 1 3.7 1.16 4.1 4.1 0 0 1 1.41 3.35v5.83a10.79 10.79 0 0 0 .11 1.56 8.19 8.19 0 0 0 .35 1.46h-3zm-3.61-2.11a3.7 3.7 0 0 0 2-.56 2.8 2.8 0 0 0 1.18-1.27v-1.94h-2.34a3 3 0 0 0-2 .64 1.93 1.93 0 0 0-.73 1.5 1.53 1.53 0 0 0 .49 1.19 2 2 0 0 0 1.39.44zm12.19-14.21h-3v-2.58h3v2.58zm0 16.33h-3v-13.12h3v13.11zm5.83-13.12l.17 1.89a4.68 4.68 0 0 1 1.62-1.57 4.32 4.32 0 0 1 2.2-.56 4.13 4.13 0 0 1 3.19 1.24 5.57 5.57 0 0 1 1.15 3.87v8.24H754v-8.22a2.94 2.94 0 0 0-.61-2.1 2.5 2.5 0 0 0-1.86-.62 3.09 3.09 0 0 0-1.54.38 3.18 3.18 0 0 0-1.12 1v9.51h-3v-13.06h2.68zm14.4 13.11h-3v-18.9h3v18.91zm6.18-16.32h-3v-2.58h3v2.58zm0 16.33h-3v-13.12h3v13.11zm5.82-13.12l.17 1.89a4.68 4.68 0 0 1 1.62-1.57 4.32 4.32 0 0 1 2.2-.56 4.13 4.13 0 0 1 3.19 1.24 5.57 5.57 0 0 1 1.15 3.87v8.24h-3v-8.22a2.94 2.94 0 0 0-.61-2.1 2.5 2.5 0 0 0-1.86-.62 3.09 3.09 0 0 0-1.54.38 3.18 3.18 0 0 0-1.12 1v9.51h-3v-13.06h2.8zm15.63 7.38h-1.33v5.73h-2.93v-18.9h2.93v10.81h1.22l3.31-5h3.47l-4.33 6 5 7.15h-3.42zm-25.15 32.07H736.6l5.66-6.11a2 2 0 0 0-2.84-2.81l-.09.09-8.67 9.35a2 2 0 0 0 0 2.72l8.88 9.58a2 2 0 0 0 3-2.63l-.09-.09-5.66-6.11h28.67a2 2 0 0 0 .02-3.99z",transform:"translate(-40.82 -33.12)",fill:"#fff"}))};let on=ot;var or=function(){return{logo:{top:"30%",left:"50%",transform:"translate(-50%, -30%)",position:"absolute"}}},oi=function(e){var t=e.classes;return l.createElement("div",{className:t.logo,"data-testid":"not-found-page"},l.createElement(on,null))};let oa=(0,b.withStyles)(or)(oi);function oo(e,t){var n=rh(null==t?void 0:t.client);rd(e,r.Mutation);var i=(0,l.useState)({called:!1,loading:!1,client:n}),a=i[0],o=i[1],s=(0,l.useRef)({result:a,mutationId:0,isMounted:!0,client:n,mutation:e,options:t});Object.assign(s.current,{client:n,options:t,mutation:e});var u=(0,l.useCallback)(function(e){void 0===e&&(e={});var t=s.current,n=t.options,r=t.mutation,i=(0,t0.pi)((0,t0.pi)({},n),{mutation:r}),a=e.client||s.current.client;s.current.result.loading||i.ignoreResults||!s.current.isMounted||o(s.current.result={loading:!0,error:void 0,data:void 0,called:!0,client:a});var u=++s.current.mutationId,c=(0,ra.J)(i,e);return a.mutate(c).then(function(t){var n,r=t.data,i=t.errors,l=i&&i.length>0?new rs.cA({graphQLErrors:i}):void 0;if(u===s.current.mutationId&&!c.ignoreResults){var f={called:!0,loading:!1,data:r,error:l,client:a};s.current.isMounted&&!(0,ri.D)(s.current.result,f)&&o(s.current.result=f)}var d=e.onCompleted||(null===(n=s.current.options)||void 0===n?void 0:n.onCompleted);return null==d||d(t.data,c),t}).catch(function(t){if(u===s.current.mutationId&&s.current.isMounted){var n,r={loading:!1,error:t,data:void 0,called:!0,client:a};(0,ri.D)(s.current.result,r)||o(s.current.result=r)}var i=e.onError||(null===(n=s.current.options)||void 0===n?void 0:n.onError);if(i)return i(t,c),{data:void 0,errors:t};throw t})},[]),c=(0,l.useCallback)(function(){s.current.isMounted&&o({called:!1,loading:!1,client:n})},[]);return(0,l.useEffect)(function(){return s.current.isMounted=!0,function(){s.current.isMounted=!1}},[]),[u,(0,t0.pi)({reset:c},a)]}var os=n(59067),ou=n(28428),oc=n(11186),ol=n(78513);function of(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var od=function(e){return(0,b.createStyles)({paper:{display:"flex",margin:"".concat(2.5*e.spacing.unit,"px 0"),padding:"".concat(3*e.spacing.unit,"px ").concat(3.5*e.spacing.unit,"px")},content:{flex:1,width:"100%"},actions:of({marginTop:-(1.5*e.spacing.unit),marginLeft:-(4*e.spacing.unit)},e.breakpoints.up("sm"),{marginLeft:0,marginRight:-(1.5*e.spacing.unit)}),itemBlock:{border:"1px solid rgba(224, 224, 224, 1)",borderRadius:e.shape.borderRadius,padding:2*e.spacing.unit,marginTop:e.spacing.unit},itemBlockText:{overflowWrap:"anywhere"}})},oh=(0,b.withStyles)(od)(function(e){var t=e.actions,n=e.children,r=e.classes;return l.createElement(ii.default,{className:r.paper},l.createElement("div",{className:r.content},n),t&&l.createElement("div",{className:r.actions},t))}),op=function(e){var t=e.title;return l.createElement(x.default,{variant:"subtitle2",gutterBottom:!0},t)},ob=function(e){var t=e.children,n=e.value;return l.createElement(x.default,{variant:"body1",noWrap:!0},t||n)},om=(0,b.withStyles)(od)(function(e){var t=e.children,n=e.classes,r=e.value;return l.createElement("div",{className:n.itemBlock},l.createElement(x.default,{variant:"body1",className:n.itemBlockText},t||r))});function og(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ov(e){if(Array.isArray(e))return e}function oy(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function ow(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o_(e,t){return ov(e)||oy(e,t)||oE(e,t)||ow()}function oE(e,t){if(e){if("string"==typeof e)return og(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return og(e,t)}}var oS=function(e){var t=e.bridge,n=e.onDelete,r=o_(l.useState(null),2),i=r[0],a=r[1],o=function(e){a(e.currentTarget)},s=function(){a(null)},u=function(){n(),a(null)};return l.createElement(oh,{actions:l.createElement("div",null,l.createElement(y.default,{onClick:o,"aria-label":"open-menu"},l.createElement(ol.Z,null)),l.createElement(t_.Z,{anchorEl:i,open:Boolean(i),onClose:s},l.createElement(tN,{to:"/bridges/".concat(t.id,"/edit")},l.createElement(oc.Z,null,l.createElement(os.Z,null)),l.createElement(E.Z,null,"Edit")),l.createElement(tE.default,{onClick:u},l.createElement(oc.Z,null,l.createElement(ou.Z,null)),l.createElement(E.Z,null,"Delete"))))},l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12,sm:4,md:4},l.createElement(op,{title:"Name"}),l.createElement(ob,{value:t.name})),l.createElement(d.Z,{item:!0,xs:12,sm:4,md:8},l.createElement(op,{title:"URL"}),l.createElement(ob,{value:t.url})),l.createElement(d.Z,{item:!0,xs:12,sm:4,md:4},l.createElement(op,{title:"Outgoing Token"}),l.createElement(ob,{value:t.outgoingToken})),l.createElement(d.Z,{item:!0,xs:12,sm:4,md:3},l.createElement(op,{title:"Confirmations"}),l.createElement(ob,{value:t.confirmations})),l.createElement(d.Z,{item:!0,xs:12,sm:4,md:3},l.createElement(op,{title:"Min. Contract Payment"}),l.createElement(ob,{value:t.minimumContractPayment}))))},ok=n(83638),ox=n(33084),oT=n(22693),oM=n(58742),oO=n(9887),oA=(0,b.withStyles)(function(e){return{root:{paddingTop:3*e.spacing.unit,paddingBottom:3*e.spacing.unit}}})(oO.Z),oL=(0,b.withStyles)(function(e){return{root:{paddingLeft:2*e.spacing.unit,paddingRight:2*e.spacing.unit,paddingBottom:2*e.spacing.unit,display:"flex",flexDirection:"row",alignItems:"center"}}})(ox.Z),oC=function(e){var t=e.body,n=e.cancelButtonText,r=e.confirmButtonText,i=e.confirmButtonEnabled,a=e.maxWidth,o=e.onClose,s=e.onCancel,u=e.onConfirm,c=e.open,f=e.title;return l.createElement(aD.Z,{open:c,onClose:o,maxWidth:a},l.createElement(oA,{disableTypography:!0},l.createElement(x.default,{variant:"h5"}," ",f)),l.createElement(oT.Z,null,"string"==typeof t?l.createElement(oM.Z,{color:"textPrimary"},t):t),l.createElement(oL,null,n&&s&&l.createElement(ok.default,{onClick:s,variant:"text"},n),l.createElement(ok.default,{onClick:u,variant:"contained",color:"primary",disabled:!!i},r||"Confirm")))};function oI(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function oD(e){if(Array.isArray(e))return e}function oN(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function oP(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function oR(e,t){return oD(e)||oN(e,t)||oF(e,t)||oP()}function oj(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function oF(e,t){if(e){if("string"==typeof e)return oI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oI(e,t)}}function oY(){var e=oj(["\n fragment BridgePayload_Fields on Bridge {\n id\n name\n url\n confirmations\n outgoingToken\n minimumContractPayment\n }\n"]);return oY=function(){return e},e}var oB=n0(oY()),oU=function(e){var t=e.bridge,n=e.onDelete,r=oR(l.useState(!1),2),i=r[0],a=r[1];return l.createElement(l.Fragment,null,l.createElement(ig,null,l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:12},l.createElement(iy,null,t.name)),l.createElement(d.Z,{item:!0,xs:12},l.createElement(oS,{bridge:t,onDelete:function(){return a(!0)}})))),l.createElement(oC,{open:i,title:"Delete Bridge",body:"Are you sure you want to delete this bridge?",confirmButtonText:"Confirm",onConfirm:n,cancelButtonText:"Cancel",onCancel:function(){return a(!1)}}))};function oH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function o$(e){if(Array.isArray(e))return e}function oz(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function oG(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function oW(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function oK(e,t){return o$(e)||oG(e,t)||oV(e,t)||oW()}function oV(e,t){if(e){if("string"==typeof e)return oH(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oH(e,t)}}var oq=function(){var e=oK(l.useState(),2),t=e[0],n=e[1],r=(0,h.k6)(),i=(0,A.I0)();return l.useEffect(function(){null!=t&&(oz(t,rs.cA)?(t.graphQLErrors.forEach(function(e){var t;if((null===(t=e.extensions)||void 0===t?void 0:t.code)=="UNAUTHORIZED"){i((0,ty.Jc)()),r.push("/signin");return}}),i((0,ty.LO)(t.message))):oz(t,Error)?i((0,ty.LO)(t.message)):i((0,ty.LO)("An error occured")))},[i,t,r]),{handleMutationError:n}};function oZ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function oX(e){if(Array.isArray(e))return e}function oJ(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function oQ(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){oJ(a,r,i,o,s,"next",e)}function s(e){oJ(a,r,i,o,s,"throw",e)}o(void 0)})}}function o1(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function o0(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o2(e,t){return oX(e)||o1(e,t)||o4(e,t)||o0()}function o3(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function o4(e,t){if(e){if("string"==typeof e)return oZ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oZ(e,t)}}var o6=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};function o5(){var e=o3(["\n ","\n query FetchBridge($id: ID!) {\n bridge(id: $id) {\n __typename\n ... on Bridge {\n ...BridgePayload_Fields\n }\n ... on NotFoundError {\n message\n }\n }\n }\n"]);return o5=function(){return e},e}function o8(){var e=o3(["\n mutation DeleteBridge($id: ID!) {\n deleteBridge(id: $id) {\n ... on DeleteBridgeSuccess {\n bridge {\n id\n }\n }\n ... on NotFoundError {\n message\n }\n ... on DeleteBridgeInvalidNameError {\n message\n }\n ... on DeleteBridgeConflictError {\n message\n }\n }\n }\n"]);return o8=function(){return e},e}var o9=n0(o5(),oB),o7=n0(o8()),se=function(){var e=(0,h.UO)().id,t=(0,h.k6)(),n=(0,A.I0)(),r=oq().handleMutationError,i=rv(o9,{variables:{id:e}}),a=i.data,o=i.loading,s=i.error,u=o2(oo(o7),1)[0];if(o)return l.createElement(iR,null);if(s)return l.createElement(iD,{error:s});var c,f=(c=oQ(function(){var i,a,o,s,c;return o6(this,function(l){switch(l.label){case 0:return l.trys.push([0,2,,3]),[4,u(((o={}).variables={id:e},o))];case 1:switch(null==(s=null===(i=(a=l.sent()).data)||void 0===i?void 0:i.deleteBridge)?void 0:s.__typename){case"DeleteBridgeSuccess":t.push("/bridges"),n((0,ty.qt)("Bridge Deleted"));break;case"NotFoundError":case"DeleteBridgeInvalidNameError":case"DeleteBridgeConflictError":n((0,ty.LO)(s.message))}return[3,3];case 2:return r(c=l.sent()),[3,3];case 3:return[2]}})}),function(){return c.apply(this,arguments)}),d=null==a?void 0:a.bridge;switch(null==d?void 0:d.__typename){case"Bridge":return l.createElement(oU,{bridge:d,onDelete:f});case"NotFoundError":return l.createElement(oa,null);default:return null}},st=(0,b.withStyles)(iu)(function(e){var t=e.bridge,n=e.classes;return l.createElement(ir.Z,{className:n.row,key:t.name,hover:!0},l.createElement(r7.default,{scope:"row",component:"th"},l.createElement(ih,{className:n.link,href:"/bridges/".concat(t.name)},t.name)),l.createElement(r7.default,null,l.createElement(x.default,{variant:"body1"},t.url)),l.createElement(r7.default,null,l.createElement(x.default,{variant:"body1"},t.confirmations)),l.createElement(r7.default,null,l.createElement(x.default,{variant:"body1"},t.minimumContractPayment)))});function sn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function sr(){var e=sn(["\n fragment BridgesPayload_ResultsFields on Bridge {\n id\n name\n url\n confirmations\n minimumContractPayment\n }\n"]);return sr=function(){return e},e}var si=n0(sr()),sa=function(e){var t=e.bridges,n=e.page,r=e.pageSize,i=e.total,a=(0,h.k6)();return l.createElement(ig,null,l.createElement(d.Z,{container:!0,spacing:32},l.createElement(d.Z,{item:!0,xs:9},l.createElement(iy,null,"Bridges")),l.createElement(d.Z,{item:!0,xs:3},l.createElement(d.Z,{container:!0,justify:"flex-end"},l.createElement(d.Z,{item:!0},l.createElement(aA.Z,{variant:"secondary",component:tz,href:"/bridges/new"},"New Bridge")))),l.createElement(d.Z,{item:!0,xs:12},l.createElement(r5.Z,null,l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,"Name"),l.createElement(r7.default,null,"URL"),l.createElement(r7.default,null,"Default Confirmations"),l.createElement(r7.default,null,"Minimum Contract Payment"))),l.createElement(r9.Z,null,t.map(function(e){return l.createElement(st,{bridge:e,key:e.name})}))),l.createElement(it.Z,{component:"div",count:i,rowsPerPage:r,rowsPerPageOptions:[r],page:n-1,onChangePage:function(e,t){a.push("/bridges?page=".concat(t+1,"&per=").concat(r))},onChangeRowsPerPage:function(){},backIconButtonProps:{"aria-label":"prev-page"},nextIconButtonProps:{"aria-label":"next-page"}})))))};function so(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ss(){var e=so(["\n ","\n query FetchBridges($offset: Int, $limit: Int) {\n bridges(offset: $offset, limit: $limit) {\n results {\n ...BridgesPayload_ResultsFields\n }\n metadata {\n total\n }\n }\n }\n"]);return ss=function(){return e},e}var su=n0(ss(),si),sc=function(){var e=ij(),t=parseInt(e.get("page")||"1",10),n=parseInt(e.get("per")||"10",10),r=rv(su,{variables:{offset:(t-1)*n,limit:n},fetchPolicy:"network-only"}),i=r.data,a=r.loading,o=r.error;return a?l.createElement(iR,null):o?l.createElement(iD,{error:o}):i?l.createElement(sa,{bridges:i.bridges.results,page:t,pageSize:n,total:i.bridges.metadata.total}):null},sl=n(52658),sf=n(69590),sd=n.n(sf),sh=function(e){return sp(e)&&!sb(e)};function sp(e){return!!e&&"object"==typeof e}function sb(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||sg(e)}var sm="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function sg(e){return e.$$typeof===sm}function sv(e){return Array.isArray(e)?[]:{}}function sy(e,t){return!1!==t.clone&&t.isMergeableObject(e)?sE(sv(e),e,t):e}function sw(e,t,n){return e.concat(t).map(function(e){return sy(e,n)})}function s_(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(t){r[t]=sy(e[t],n)}),Object.keys(t).forEach(function(i){n.isMergeableObject(t[i])&&e[i]?r[i]=sE(e[i],t[i],n):r[i]=sy(t[i],n)}),r}function sE(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||sw,n.isMergeableObject=n.isMergeableObject||sh;var r=Array.isArray(t);return r!==Array.isArray(e)?sy(t,n):r?n.arrayMerge(e,t,n):s_(e,t,n)}sE.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,n){return sE(e,n,t)},{})};var sS=sE;let sk=sS;function sx(e,t){return function(n){return e(t(n))}}let sT=sx;var sM=sT(Object.getPrototypeOf,Object);let sO=sM;var sA="[object Object]",sL=Function.prototype,sC=Object.prototype,sI=sL.toString,sD=sC.hasOwnProperty,sN=sI.call(Object);function sP(e){if(!eD(e)||eC(e)!=sA)return!1;var t=sO(e);if(null===t)return!0;var n=sD.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&sI.call(n)==sN}let sR=sP;function sj(){this.__data__=[],this.size=0}let sF=sj;function sY(e,t){return e===t||e!=e&&t!=t}let sB=sY;function sU(e,t){for(var n=e.length;n--;)if(sB(e[n][0],t))return n;return -1}let sH=sU;var s$=Array.prototype.splice;function sz(e){var t=this.__data__,n=sH(t,e);return!(n<0)&&(n==t.length-1?t.pop():s$.call(t,n,1),--this.size,!0)}let sG=sz;function sW(e){var t=this.__data__,n=sH(t,e);return n<0?void 0:t[n][1]}let sK=sW;function sV(e){return sH(this.__data__,e)>-1}let sq=sV;function sZ(e,t){var n=this.__data__,r=sH(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}let sX=sZ;function sJ(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}sJ.prototype.clear=sF,sJ.prototype.delete=sG,sJ.prototype.get=sK,sJ.prototype.has=sq,sJ.prototype.set=sX;let sQ=sJ;function s1(){this.__data__=new sQ,this.size=0}let s0=s1;function s2(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}let s3=s2;function s4(e){return this.__data__.get(e)}let s6=s4;function s5(e){return this.__data__.has(e)}let s8=s5;var s9="[object AsyncFunction]",s7="[object Function]",ue="[object GeneratorFunction]",ut="[object Proxy]";function un(e){if(!ed(e))return!1;var t=eC(e);return t==s7||t==ue||t==s9||t==ut}let ur=un;var ui=eh.Z["__core-js_shared__"];let ua=ui;var uo,us=(uo=/[^.]+$/.exec(ua&&ua.keys&&ua.keys.IE_PROTO||""))?"Symbol(src)_1."+uo:"";function uu(e){return!!us&&us in e}let uc=uu;var ul=Function.prototype.toString;function uf(e){if(null!=e){try{return ul.call(e)}catch(t){}try{return e+""}catch(n){}}return""}let ud=uf;var uh=/[\\^$.*+?()[\]{}|]/g,up=/^\[object .+?Constructor\]$/,ub=Function.prototype,um=Object.prototype,ug=ub.toString,uv=um.hasOwnProperty,uy=RegExp("^"+ug.call(uv).replace(uh,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function uw(e){return!(!ed(e)||uc(e))&&(ur(e)?uy:up).test(ud(e))}let u_=uw;function uE(e,t){return null==e?void 0:e[t]}let uS=uE;function uk(e,t){var n=uS(e,t);return u_(n)?n:void 0}let ux=uk;var uT=ux(eh.Z,"Map");let uM=uT;var uO=ux(Object,"create");let uA=uO;function uL(){this.__data__=uA?uA(null):{},this.size=0}let uC=uL;function uI(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}let uD=uI;var uN="__lodash_hash_undefined__",uP=Object.prototype.hasOwnProperty;function uR(e){var t=this.__data__;if(uA){var n=t[e];return n===uN?void 0:n}return uP.call(t,e)?t[e]:void 0}let uj=uR;var uF=Object.prototype.hasOwnProperty;function uY(e){var t=this.__data__;return uA?void 0!==t[e]:uF.call(t,e)}let uB=uY;var uU="__lodash_hash_undefined__";function uH(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=uA&&void 0===t?uU:t,this}let u$=uH;function uz(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}uz.prototype.clear=uC,uz.prototype.delete=uD,uz.prototype.get=uj,uz.prototype.has=uB,uz.prototype.set=u$;let uG=uz;function uW(){this.size=0,this.__data__={hash:new uG,map:new(uM||sQ),string:new uG}}let uK=uW;function uV(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}let uq=uV;function uZ(e,t){var n=e.__data__;return uq(t)?n["string"==typeof t?"string":"hash"]:n.map}let uX=uZ;function uJ(e){var t=uX(this,e).delete(e);return this.size-=t?1:0,t}let uQ=uJ;function u1(e){return uX(this,e).get(e)}let u0=u1;function u2(e){return uX(this,e).has(e)}let u3=u2;function u4(e,t){var n=uX(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}let u6=u4;function u5(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u5.prototype.clear=uK,u5.prototype.delete=uQ,u5.prototype.get=u0,u5.prototype.has=u3,u5.prototype.set=u6;let u8=u5;var u9=200;function u7(e,t){var n=this.__data__;if(n instanceof sQ){var r=n.__data__;if(!uM||r.length<u9-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new u8(r)}return n.set(e,t),this.size=n.size,this}let ce=u7;function ct(e){var t=this.__data__=new sQ(e);this.size=t.size}ct.prototype.clear=s0,ct.prototype.delete=s3,ct.prototype.get=s6,ct.prototype.has=s8,ct.prototype.set=ce;let cn=ct;function cr(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}let ci=cr;var ca=function(){try{var e=ux(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();let co=ca;function cs(e,t,n){"__proto__"==t&&co?co(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}let cu=cs;var cc=Object.prototype.hasOwnProperty;function cl(e,t,n){var r=e[t];cc.call(e,t)&&sB(r,n)&&(void 0!==n||t in e)||cu(e,t,n)}let cf=cl;function cd(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var s=t[a],u=r?r(n[s],e[s],s,n,e):void 0;void 0===u&&(u=e[s]),i?cu(n,s,u):cf(n,s,u)}return n}let ch=cd;function cp(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}let cb=cp;var cm="[object Arguments]";function cg(e){return eD(e)&&eC(e)==cm}let cv=cg;var cy=Object.prototype,cw=cy.hasOwnProperty,c_=cy.propertyIsEnumerable,cE=cv(function(){return arguments}())?cv:function(e){return eD(e)&&cw.call(e,"callee")&&!c_.call(e,"callee")};let cS=cE;var ck=Array.isArray;let cx=ck;var cT=n(29710),cM=9007199254740991,cO=/^(?:0|[1-9]\d*)$/;function cA(e,t){var n=typeof e;return!!(t=null==t?cM:t)&&("number"==n||"symbol"!=n&&cO.test(e))&&e>-1&&e%1==0&&e<t}let cL=cA;var cC=9007199254740991;function cI(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=cC}let cD=cI;var cN="[object Arguments]",cP="[object Array]",cR="[object Boolean]",cj="[object Date]",cF="[object Error]",cY="[object Function]",cB="[object Map]",cU="[object Number]",cH="[object Object]",c$="[object RegExp]",cz="[object Set]",cG="[object String]",cW="[object WeakMap]",cK="[object ArrayBuffer]",cV="[object DataView]",cq="[object Float64Array]",cZ="[object Int8Array]",cX="[object Int16Array]",cJ="[object Int32Array]",cQ="[object Uint8Array]",c1="[object Uint8ClampedArray]",c0="[object Uint16Array]",c2="[object Uint32Array]",c3={};function c4(e){return eD(e)&&cD(e.length)&&!!c3[eC(e)]}c3["[object Float32Array]"]=c3[cq]=c3[cZ]=c3[cX]=c3[cJ]=c3[cQ]=c3[c1]=c3[c0]=c3[c2]=!0,c3[cN]=c3[cP]=c3[cK]=c3[cR]=c3[cV]=c3[cj]=c3[cF]=c3[cY]=c3[cB]=c3[cU]=c3[cH]=c3[c$]=c3[cz]=c3[cG]=c3[cW]=!1;let c6=c4;function c5(e){return function(t){return e(t)}}let c8=c5;var c9=n(79730),c7=c9.Z&&c9.Z.isTypedArray,le=c7?c8(c7):c6;let lt=le;var ln=Object.prototype.hasOwnProperty;function lr(e,t){var n=cx(e),r=!n&&cS(e),i=!n&&!r&&(0,cT.Z)(e),a=!n&&!r&&!i&<(e),o=n||r||i||a,s=o?cb(e.length,String):[],u=s.length;for(var c in e)(t||ln.call(e,c))&&!(o&&("length"==c||i&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||cL(c,u)))&&s.push(c);return s}let li=lr;var la=Object.prototype;function lo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||la)}let ls=lo;var lu=sT(Object.keys,Object);let lc=lu;var ll=Object.prototype.hasOwnProperty;function lf(e){if(!ls(e))return lc(e);var t=[];for(var n in Object(e))ll.call(e,n)&&"constructor"!=n&&t.push(n);return t}let ld=lf;function lh(e){return null!=e&&cD(e.length)&&!ur(e)}let lp=lh;function lb(e){return lp(e)?li(e):ld(e)}let lm=lb;function lg(e,t){return e&&ch(t,lm(t),e)}let lv=lg;function ly(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}let lw=ly;var l_=Object.prototype.hasOwnProperty;function lE(e){if(!ed(e))return lw(e);var t=ls(e),n=[];for(var r in e)"constructor"==r&&(t||!l_.call(e,r))||n.push(r);return n}let lS=lE;function lk(e){return lp(e)?li(e,!0):lS(e)}let lx=lk;function lT(e,t){return e&&ch(t,lx(t),e)}let lM=lT;var lO=n(42896);function lA(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}let lL=lA;function lC(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}let lI=lC;function lD(){return[]}let lN=lD;var lP=Object.prototype.propertyIsEnumerable,lR=Object.getOwnPropertySymbols,lj=lR?function(e){return null==e?[]:lI(lR(e=Object(e)),function(t){return lP.call(e,t)})}:lN;let lF=lj;function lY(e,t){return ch(e,lF(e),t)}let lB=lY;function lU(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}let lH=lU;var l$=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)lH(t,lF(e)),e=sO(e);return t}:lN;let lz=l$;function lG(e,t){return ch(e,lz(e),t)}let lW=lG;function lK(e,t,n){var r=t(e);return cx(e)?r:lH(r,n(e))}let lV=lK;function lq(e){return lV(e,lm,lF)}let lZ=lq;function lX(e){return lV(e,lx,lz)}let lJ=lX;var lQ=ux(eh.Z,"DataView");let l1=lQ;var l0=ux(eh.Z,"Promise");let l2=l0;var l3=ux(eh.Z,"Set");let l4=l3;var l6=ux(eh.Z,"WeakMap");let l5=l6;var l8="[object Map]",l9="[object Object]",l7="[object Promise]",fe="[object Set]",ft="[object WeakMap]",fn="[object DataView]",fr=ud(l1),fi=ud(uM),fa=ud(l2),fo=ud(l4),fs=ud(l5),fu=eC;(l1&&fu(new l1(new ArrayBuffer(1)))!=fn||uM&&fu(new uM)!=l8||l2&&fu(l2.resolve())!=l7||l4&&fu(new l4)!=fe||l5&&fu(new l5)!=ft)&&(fu=function(e){var t=eC(e),n=t==l9?e.constructor:void 0,r=n?ud(n):"";if(r)switch(r){case fr:return fn;case fi:return l8;case fa:return l7;case fo:return fe;case fs:return ft}return t});let fc=fu;var fl=Object.prototype.hasOwnProperty;function ff(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&fl.call(e,"index")&&(n.index=e.index,n.input=e.input),n}let fd=ff;var fh=eh.Z.Uint8Array;let fp=fh;function fb(e){var t=new e.constructor(e.byteLength);return new fp(t).set(new fp(e)),t}let fm=fb;function fg(e,t){var n=t?fm(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}let fv=fg;var fy=/\w*$/;function fw(e){var t=new e.constructor(e.source,fy.exec(e));return t.lastIndex=e.lastIndex,t}let f_=fw;var fE=eg?eg.prototype:void 0,fS=fE?fE.valueOf:void 0;function fk(e){return fS?Object(fS.call(e)):{}}let fx=fk;function fT(e,t){var n=t?fm(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}let fM=fT;var fO="[object Boolean]",fA="[object Date]",fL="[object Map]",fC="[object Number]",fI="[object RegExp]",fD="[object Set]",fN="[object String]",fP="[object Symbol]",fR="[object ArrayBuffer]",fj="[object DataView]",fF="[object Float32Array]",fY="[object Float64Array]",fB="[object Int8Array]",fU="[object Int16Array]",fH="[object Int32Array]",f$="[object Uint8Array]",fz="[object Uint8ClampedArray]",fG="[object Uint16Array]",fW="[object Uint32Array]";function fK(e,t,n){var r=e.constructor;switch(t){case fR:return fm(e);case fO:case fA:return new r(+e);case fj:return fv(e,n);case fF:case fY:case fB:case fU:case fH:case f$:case fz:case fG:case fW:return fM(e,n);case fL:return new r;case fC:case fN:return new r(e);case fI:return f_(e);case fD:return new r;case fP:return fx(e)}}let fV=fK;var fq=Object.create,fZ=function(){function e(){}return function(t){if(!ed(t))return{};if(fq)return fq(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();let fX=fZ;function fJ(e){return"function"!=typeof e.constructor||ls(e)?{}:fX(sO(e))}let fQ=fJ;var f1="[object Map]";function f0(e){return eD(e)&&fc(e)==f1}let f2=f0;var f3=c9.Z&&c9.Z.isMap,f4=f3?c8(f3):f2;let f6=f4;var f5="[object Set]";function f8(e){return eD(e)&&fc(e)==f5}let f9=f8;var f7=c9.Z&&c9.Z.isSet,de=f7?c8(f7):f9;let dt=de;var dn=1,dr=2,di=4,da="[object Arguments]",ds="[object Array]",du="[object Boolean]",dc="[object Date]",dl="[object Error]",df="[object Function]",dd="[object GeneratorFunction]",dh="[object Map]",dp="[object Number]",db="[object Object]",dm="[object RegExp]",dg="[object Set]",dv="[object String]",dy="[object Symbol]",dw="[object WeakMap]",d_="[object ArrayBuffer]",dE="[object DataView]",dS="[object Float32Array]",dk="[object Float64Array]",dx="[object Int8Array]",dT="[object Int16Array]",dM="[object Int32Array]",dO="[object Uint8Array]",dA="[object Uint8ClampedArray]",dL="[object Uint16Array]",dC="[object Uint32Array]",dI={};function dD(e,t,n,r,i,a){var o,s=t&dn,u=t&dr,c=t&di;if(n&&(o=i?n(e,r,i,a):n(e)),void 0!==o)return o;if(!ed(e))return e;var l=cx(e);if(l){if(o=fd(e),!s)return lL(e,o)}else{var f=fc(e),d=f==df||f==dd;if((0,cT.Z)(e))return(0,lO.Z)(e,s);if(f==db||f==da||d&&!i){if(o=u||d?{}:fQ(e),!s)return u?lW(e,lM(o,e)):lB(e,lv(o,e))}else{if(!dI[f])return i?e:{};o=fV(e,f,s)}}a||(a=new cn);var h=a.get(e);if(h)return h;a.set(e,o),dt(e)?e.forEach(function(r){o.add(dD(r,t,n,r,e,a))}):f6(e)&&e.forEach(function(r,i){o.set(i,dD(r,t,n,i,e,a))});var p=c?u?lJ:lZ:u?keysIn:lm,b=l?void 0:p(e);return ci(b||e,function(r,i){b&&(r=e[i=r]),cf(o,i,dD(r,t,n,i,e,a))}),o}dI[da]=dI[ds]=dI[d_]=dI[dE]=dI[du]=dI[dc]=dI[dS]=dI[dk]=dI[dx]=dI[dT]=dI[dM]=dI[dh]=dI[dp]=dI[db]=dI[dm]=dI[dg]=dI[dv]=dI[dy]=dI[dO]=dI[dA]=dI[dL]=dI[dC]=!0,dI[dl]=dI[df]=dI[dw]=!1;let dN=dD;var dP=4;function dR(e){return dN(e,dP)}let dj=dR;function dF(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}let dY=dF;var dB="Expected a function";function dU(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError(dB);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(dU.Cache||u8),n}dU.Cache=u8;let dH=dU;var d$=500;function dz(e){var t=dH(e,function(e){return n.size===d$&&n.clear(),e}),n=t.cache;return t}let dG=dz;var dW=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,dK=/\\(\\)?/g,dV=dG(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(dW,function(e,n,r,i){t.push(r?i.replace(dK,"$1"):n||e)}),t});let dq=dV;var dZ=1/0;function dX(e){if("string"==typeof e||eR(e))return e;var t=e+"";return"0"==t&&1/e==-dZ?"-0":t}let dJ=dX;var dQ=1/0,d1=eg?eg.prototype:void 0,d0=d1?d1.toString:void 0;function d2(e){if("string"==typeof e)return e;if(cx(e))return dY(e,d2)+"";if(eR(e))return d0?d0.call(e):"";var t=e+"";return"0"==t&&1/e==-dQ?"-0":t}let d3=d2;function d4(e){return null==e?"":d3(e)}let d6=d4;function d5(e){return cx(e)?dY(e,dJ):eR(e)?[e]:lL(dq(d6(e)))}let d8=d5;var d9=!0;function d7(e,t){if(!d9&&!e){var n="Warning: "+t;"undefined"!=typeof console&&console.warn(n);try{throw Error(n)}catch(r){}}}let he=d7;n(8679);var ht=1,hn=4;function hr(e){return dN(e,ht|hn)}let hi=hr;function ha(){return(ha=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ho(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function hs(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function hu(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var hc=function(e){return Array.isArray(e)&&0===e.length},hl=function(e){return"function"==typeof e},hf=function(e){return null!==e&&"object"==typeof e},hd=function(e){return String(Math.floor(Number(e)))===e},hh=function(e){return"[object String]"===Object.prototype.toString.call(e)},hp=function(e){return 0===l.Children.count(e)},hb=function(e){return hf(e)&&hl(e.then)};function hm(e,t,n,r){void 0===r&&(r=0);for(var i=d8(t);e&&r<i.length;)e=e[i[r++]];return void 0===e?n:e}function hg(e,t,n){for(var r=dj(e),i=r,a=0,o=d8(t);a<o.length-1;a++){var s=o[a],u=hm(e,o.slice(0,a+1));if(u&&(hf(u)||Array.isArray(u)))i=i[s]=dj(u);else{var c=o[a+1];i=i[s]=hd(c)&&Number(c)>=0?[]:{}}}return(0===a?e:i)[o[a]]===n?e:(void 0===n?delete i[o[a]]:i[o[a]]=n,0===a&&void 0===n&&delete r[o[a]],r)}function hv(e,t,n,r){void 0===n&&(n=new WeakMap),void 0===r&&(r={});for(var i=0,a=Object.keys(e);i<a.length;i++){var o=a[i],s=e[o];hf(s)?n.get(s)||(n.set(s,!0),r[o]=Array.isArray(s)?[]:{},hv(s,t,n,r[o])):r[o]=t}return r}var hy=(0,l.createContext)(void 0),hw=hy.Provider;function h_(){var e=(0,l.useContext)(hy);return e||he(!1),e}function hE(e,t){switch(t.type){case"SET_VALUES":return ha({},e,{values:t.payload});case"SET_TOUCHED":return ha({},e,{touched:t.payload});case"SET_ERRORS":if(sd()(e.errors,t.payload))return e;return ha({},e,{errors:t.payload});case"SET_STATUS":return ha({},e,{status:t.payload});case"SET_ISSUBMITTING":return ha({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return ha({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return ha({},e,{values:hg(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return ha({},e,{touched:hg(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return ha({},e,{errors:hg(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return ha({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return ha({},e,{touched:hv(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":case"SUBMIT_SUCCESS":return ha({},e,{isSubmitting:!1});default:return e}}hy.Consumer;var hS={},hk={};function hx(e){var t=e.validateOnChange,n=void 0===t||t,r=e.validateOnBlur,i=void 0===r||r,a=e.validateOnMount,o=void 0!==a&&a,s=e.isInitialValid,u=e.enableReinitialize,c=void 0!==u&&u,f=e.onSubmit,d=hs(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),h=ha({validateOnChange:n,validateOnBlur:i,validateOnMount:o,onSubmit:f},d),p=(0,l.useRef)(h.initialValues),b=(0,l.useRef)(h.initialErrors||hS),m=(0,l.useRef)(h.initialTouched||hk),g=(0,l.useRef)(h.initialStatus),v=(0,l.useRef)(!1),y=(0,l.useRef)({});(0,l.useEffect)(function(){return v.current=!0,function(){v.current=!1}},[]);var w=(0,l.useReducer)(hE,{values:h.initialValues,errors:h.initialErrors||hS,touched:h.initialTouched||hk,status:h.initialStatus,isSubmitting:!1,isValidating:!1,submitCount:0}),_=w[0],E=w[1],S=(0,l.useCallback)(function(e,t){return new Promise(function(n,r){var i=h.validate(e,t);null==i?n(hS):hb(i)?i.then(function(e){n(e||hS)},function(e){r(e)}):n(i)})},[h.validate]),k=(0,l.useCallback)(function(e,t){var n=h.validationSchema,r=hl(n)?n(t):n,i=t&&r.validateAt?r.validateAt(t,e):hO(e,r);return new Promise(function(e,t){i.then(function(){e(hS)},function(n){"ValidationError"===n.name?e(hM(n)):t(n)})})},[h.validationSchema]),x=(0,l.useCallback)(function(e,t){return new Promise(function(n){return n(y.current[e].validate(t))})},[]),T=(0,l.useCallback)(function(e){var t=Object.keys(y.current).filter(function(e){return hl(y.current[e].validate)});return Promise.all(t.length>0?t.map(function(t){return x(t,hm(e,t))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")]).then(function(e){return e.reduce(function(e,n,r){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===n||n&&(e=hg(e,t[r],n)),e},{})})},[x]),M=(0,l.useCallback)(function(e){return Promise.all([T(e),h.validationSchema?k(e):{},h.validate?S(e):{}]).then(function(e){var t=e[0],n=e[1],r=e[2];return sk.all([t,n,r],{arrayMerge:hL})})},[h.validate,h.validationSchema,T,S,k]),O=hN(function(e){return void 0===e&&(e=_.values),E({type:"SET_ISVALIDATING",payload:!0}),M(e).then(function(e){return v.current&&(E({type:"SET_ISVALIDATING",payload:!1}),sd()(_.errors,e)||E({type:"SET_ERRORS",payload:e})),e})});(0,l.useEffect)(function(){o&&!0===v.current&&sd()(p.current,h.initialValues)&&O(p.current)},[o,O]);var A=(0,l.useCallback)(function(e){var t=e&&e.values?e.values:p.current,n=e&&e.errors?e.errors:b.current?b.current:h.initialErrors||{},r=e&&e.touched?e.touched:m.current?m.current:h.initialTouched||{},i=e&&e.status?e.status:g.current?g.current:h.initialStatus;p.current=t,b.current=n,m.current=r,g.current=i;var a=function(){E({type:"RESET_FORM",payload:{isSubmitting:!!e&&!!e.isSubmitting,errors:n,touched:r,status:i,values:t,isValidating:!!e&&!!e.isValidating,submitCount:e&&e.submitCount&&"number"==typeof e.submitCount?e.submitCount:0}})};if(h.onReset){var o=h.onReset(_.values,V);hb(o)?o.then(a):a()}else a()},[h.initialErrors,h.initialStatus,h.initialTouched]);(0,l.useEffect)(function(){!0===v.current&&!sd()(p.current,h.initialValues)&&(c&&(p.current=h.initialValues,A()),o&&O(p.current))},[c,h.initialValues,A,o,O]),(0,l.useEffect)(function(){c&&!0===v.current&&!sd()(b.current,h.initialErrors)&&(b.current=h.initialErrors||hS,E({type:"SET_ERRORS",payload:h.initialErrors||hS}))},[c,h.initialErrors]),(0,l.useEffect)(function(){c&&!0===v.current&&!sd()(m.current,h.initialTouched)&&(m.current=h.initialTouched||hk,E({type:"SET_TOUCHED",payload:h.initialTouched||hk}))},[c,h.initialTouched]),(0,l.useEffect)(function(){c&&!0===v.current&&!sd()(g.current,h.initialStatus)&&(g.current=h.initialStatus,E({type:"SET_STATUS",payload:h.initialStatus}))},[c,h.initialStatus,h.initialTouched]);var L=hN(function(e){if(y.current[e]&&hl(y.current[e].validate)){var t=hm(_.values,e),n=y.current[e].validate(t);return hb(n)?(E({type:"SET_ISVALIDATING",payload:!0}),n.then(function(e){return e}).then(function(t){E({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),E({type:"SET_ISVALIDATING",payload:!1})})):(E({type:"SET_FIELD_ERROR",payload:{field:e,value:n}}),Promise.resolve(n))}return h.validationSchema?(E({type:"SET_ISVALIDATING",payload:!0}),k(_.values,e).then(function(e){return e}).then(function(t){E({type:"SET_FIELD_ERROR",payload:{field:e,value:t[e]}}),E({type:"SET_ISVALIDATING",payload:!1})})):Promise.resolve()}),C=(0,l.useCallback)(function(e,t){var n=t.validate;y.current[e]={validate:n}},[]),I=(0,l.useCallback)(function(e){delete y.current[e]},[]),D=hN(function(e,t){return E({type:"SET_TOUCHED",payload:e}),(void 0===t?i:t)?O(_.values):Promise.resolve()}),N=(0,l.useCallback)(function(e){E({type:"SET_ERRORS",payload:e})},[]),P=hN(function(e,t){var r=hl(e)?e(_.values):e;return E({type:"SET_VALUES",payload:r}),(void 0===t?n:t)?O(r):Promise.resolve()}),R=(0,l.useCallback)(function(e,t){E({type:"SET_FIELD_ERROR",payload:{field:e,value:t}})},[]),j=hN(function(e,t,r){return E({type:"SET_FIELD_VALUE",payload:{field:e,value:t}}),(void 0===r?n:r)?O(hg(_.values,e,t)):Promise.resolve()}),F=(0,l.useCallback)(function(e,t){var n,r=t,i=e;if(!hh(e)){e.persist&&e.persist();var a=e.target?e.target:e.currentTarget,o=a.type,s=a.name,u=a.id,c=a.value,l=a.checked,f=(a.outerHTML,a.options),d=a.multiple;r=t||s||u,i=/number|range/.test(o)?(n=parseFloat(c),isNaN(n)?"":n):/checkbox/.test(o)?hI(hm(_.values,r),l,c):d?hC(f):c}r&&j(r,i)},[j,_.values]),Y=hN(function(e){if(hh(e))return function(t){return F(t,e)};F(e)}),B=hN(function(e,t,n){return void 0===t&&(t=!0),E({type:"SET_FIELD_TOUCHED",payload:{field:e,value:t}}),(void 0===n?i:n)?O(_.values):Promise.resolve()}),U=(0,l.useCallback)(function(e,t){e.persist&&e.persist();var n,r=e.target,i=r.name,a=r.id;r.outerHTML,B(t||i||a,!0)},[B]),H=hN(function(e){if(hh(e))return function(t){return U(t,e)};U(e)}),$=(0,l.useCallback)(function(e){hl(e)?E({type:"SET_FORMIK_STATE",payload:e}):E({type:"SET_FORMIK_STATE",payload:function(){return e}})},[]),z=(0,l.useCallback)(function(e){E({type:"SET_STATUS",payload:e})},[]),G=(0,l.useCallback)(function(e){E({type:"SET_ISSUBMITTING",payload:e})},[]),W=hN(function(){return E({type:"SUBMIT_ATTEMPT"}),O().then(function(e){var t,n=e instanceof Error;if(!n&&0===Object.keys(e).length){try{if(void 0===(t=q()))return}catch(r){throw r}return Promise.resolve(t).then(function(e){return v.current&&E({type:"SUBMIT_SUCCESS"}),e}).catch(function(e){if(v.current)throw E({type:"SUBMIT_FAILURE"}),e})}if(v.current&&(E({type:"SUBMIT_FAILURE"}),n))throw e})}),K=hN(function(e){e&&e.preventDefault&&hl(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&hl(e.stopPropagation)&&e.stopPropagation(),W().catch(function(e){console.warn("Warning: An unhandled error was caught from submitForm()",e)})}),V={resetForm:A,validateForm:O,validateField:L,setErrors:N,setFieldError:R,setFieldTouched:B,setFieldValue:j,setStatus:z,setSubmitting:G,setTouched:D,setValues:P,setFormikState:$,submitForm:W},q=hN(function(){return f(_.values,V)}),Z=hN(function(e){e&&e.preventDefault&&hl(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&hl(e.stopPropagation)&&e.stopPropagation(),A()}),X=(0,l.useCallback)(function(e){return{value:hm(_.values,e),error:hm(_.errors,e),touched:!!hm(_.touched,e),initialValue:hm(p.current,e),initialTouched:!!hm(m.current,e),initialError:hm(b.current,e)}},[_.errors,_.touched,_.values]),J=(0,l.useCallback)(function(e){return{setValue:function(t,n){return j(e,t,n)},setTouched:function(t,n){return B(e,t,n)},setError:function(t){return R(e,t)}}},[j,B,R]),Q=(0,l.useCallback)(function(e){var t=hf(e),n=t?e.name:e,r=hm(_.values,n),i={name:n,value:r,onChange:Y,onBlur:H};if(t){var a=e.type,o=e.value,s=e.as,u=e.multiple;"checkbox"===a?void 0===o?i.checked=!!r:(i.checked=!!(Array.isArray(r)&&~r.indexOf(o)),i.value=o):"radio"===a?(i.checked=r===o,i.value=o):"select"===s&&u&&(i.value=i.value||[],i.multiple=!0)}return i},[H,Y,_.values]),ee=(0,l.useMemo)(function(){return!sd()(p.current,_.values)},[p.current,_.values]),et=(0,l.useMemo)(function(){return void 0!==s?ee?_.errors&&0===Object.keys(_.errors).length:!1!==s&&hl(s)?s(h):s:_.errors&&0===Object.keys(_.errors).length},[s,ee,_.errors,h]);return ha({},_,{initialValues:p.current,initialErrors:b.current,initialTouched:m.current,initialStatus:g.current,handleBlur:H,handleChange:Y,handleReset:Z,handleSubmit:K,resetForm:A,setErrors:N,setFormikState:$,setFieldTouched:B,setFieldValue:j,setFieldError:R,setStatus:z,setSubmitting:G,setTouched:D,setValues:P,submitForm:W,validateForm:O,validateField:L,isValid:et,dirty:ee,unregisterField:I,registerField:C,getFieldProps:Q,getFieldMeta:X,getFieldHelpers:J,validateOnBlur:i,validateOnChange:n,validateOnMount:o})}function hT(e){var t=hx(e),n=e.component,r=e.children,i=e.render,a=e.innerRef;return(0,l.useImperativeHandle)(a,function(){return t}),(0,l.createElement)(hw,{value:t},n?(0,l.createElement)(n,t):i?i(t):r?hl(r)?r(t):hp(r)?null:l.Children.only(r):null)}function hM(e){var t={};if(e.inner){if(0===e.inner.length)return hg(t,e.path,e.message);for(var n=e.inner,r=Array.isArray(n),i=0,n=r?n:n[Symbol.iterator]();;){if(r){if(i>=n.length)break;a=n[i++]}else{if((i=n.next()).done)break;a=i.value}var a,o=a;hm(t,o.path)||(t=hg(t,o.path,o.message))}}return t}function hO(e,t,n,r){void 0===n&&(n=!1),void 0===r&&(r={});var i=hA(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:r})}function hA(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);!0===Array.isArray(e[r])?t[r]=e[r].map(function(e){return!0===Array.isArray(e)||sR(e)?hA(e):""!==e?e:void 0}):sR(e[r])?t[r]=hA(e[r]):t[r]=""!==e[r]?e[r]:void 0}return t}function hL(e,t,n){var r=e.slice();return t.forEach(function(t,i){if(void 0===r[i]){var a=!1!==n.clone&&n.isMergeableObject(t);r[i]=a?sk(Array.isArray(t)?[]:{},t,n):t}else n.isMergeableObject(t)?r[i]=sk(e[i],t,n):-1===e.indexOf(t)&&r.push(t)}),r}function hC(e){return Array.from(e).filter(function(e){return e.selected}).map(function(e){return e.value})}function hI(e,t,n){if("boolean"==typeof e)return Boolean(t);var r=[],i=!1,a=-1;if(Array.isArray(e))r=e,i=(a=e.indexOf(n))>=0;else if(!n||"true"==n||"false"==n)return Boolean(t);return t&&n&&!i?r.concat(n):i?r.slice(0,a).concat(r.slice(a+1)):r}var hD="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?l.useLayoutEffect:l.useEffect;function hN(e){var t=(0,l.useRef)(e);return hD(function(){t.current=e}),(0,l.useCallback)(function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.current.apply(void 0,n)},[])}function hP(e){var t=e.validate,n=e.name,r=e.render,i=e.children,a=e.as,o=e.component,s=hs(e,["validate","name","render","children","as","component"]),u=h_(),c=hs(u,["validate","validationSchema"]),f=c.registerField,d=c.unregisterField;(0,l.useEffect)(function(){return f(n,{validate:t}),function(){d(n)}},[f,d,n,t]);var h=c.getFieldProps(ha({name:n},s)),p=c.getFieldMeta(n),b={field:h,form:c};if(r)return r(ha({},b,{meta:p}));if(hl(i))return i(ha({},b,{meta:p}));if(o){if("string"==typeof o){var m=s.innerRef,g=hs(s,["innerRef"]);return(0,l.createElement)(o,ha({ref:m},h,g),i)}return(0,l.createElement)(o,ha({field:h,form:c},s),i)}var v=a||"input";if("string"==typeof v){var y=s.innerRef,w=hs(s,["innerRef"]);return(0,l.createElement)(v,ha({ref:y},h,w),i)}return(0,l.createElement)(v,ha({},h,s),i)}var hR=(0,l.forwardRef)(function(e,t){var n=e.action,r=hs(e,["action"]),i=n||"#",a=h_(),o=a.handleReset,s=a.handleSubmit;return(0,l.createElement)("form",Object.assign({onSubmit:s,ref:t,onReset:o,action:i},r))});hR.displayName="Form";var hj=function(e,t,n){var r=hU(e),i=r[t];return r.splice(t,1),r.splice(n,0,i),r},hF=function(e,t,n){var r=hU(e),i=r[t];return r[t]=r[n],r[n]=i,r},hY=function(e,t,n){var r=hU(e);return r.splice(t,0,n),r},hB=function(e,t,n){var r=hU(e);return r[t]=n,r},hU=function(e){if(!e)return[];if(Array.isArray(e))return[].concat(e);var t=Object.keys(e).map(function(e){return parseInt(e)}).reduce(function(e,t){return t>e?t:e},0);return Array.from(ha({},e,{length:t+1}))};(function(e){function t(t){var n;return(n=e.call(this,t)||this).updateArrayField=function(e,t,r){var i=n.props,a=i.name;(0,i.formik.setFormikState)(function(n){var i="function"==typeof r?r:e,o="function"==typeof t?t:e,s=hg(n.values,a,e(hm(n.values,a))),u=r?i(hm(n.errors,a)):void 0,c=t?o(hm(n.touched,a)):void 0;return hc(u)&&(u=void 0),hc(c)&&(c=void 0),ha({},n,{values:s,errors:r?hg(n.errors,a,u):n.errors,touched:t?hg(n.touched,a,c):n.touched})})},n.push=function(e){return n.updateArrayField(function(t){return[].concat(hU(t),[hi(e)])},!1,!1)},n.handlePush=function(e){return function(){return n.push(e)}},n.swap=function(e,t){return n.updateArrayField(function(n){return hF(n,e,t)},!0,!0)},n.handleSwap=function(e,t){return function(){return n.swap(e,t)}},n.move=function(e,t){return n.updateArrayField(function(n){return hj(n,e,t)},!0,!0)},n.handleMove=function(e,t){return function(){return n.move(e,t)}},n.insert=function(e,t){return n.updateArrayField(function(n){return hY(n,e,t)},function(t){return hY(t,e,null)},function(t){return hY(t,e,null)})},n.handleInsert=function(e,t){return function(){return n.insert(e,t)}},n.replace=function(e,t){return n.updateArrayField(function(n){return hB(n,e,t)},!1,!1)},n.handleReplace=function(e,t){return function(){return n.replace(e,t)}},n.unshift=function(e){var t=-1;return n.updateArrayField(function(n){var r=n?[e].concat(n):[e];return t<0&&(t=r.length),r},function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n},function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n}),t},n.handleUnshift=function(e){return function(){return n.unshift(e)}},n.handleRemove=function(e){return function(){return n.remove(e)}},n.handlePop=function(){return function(){return n.pop()}},n.remove=n.remove.bind(hu(n)),n.pop=n.pop.bind(hu(n)),n}ho(t,e);var n=t.prototype;return n.componentDidUpdate=function(e){this.props.validateOnChange&&this.props.formik.validateOnChange&&!sd()(hm(e.formik.values,e.name),hm(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},n.remove=function(e){var t;return this.updateArrayField(function(n){var r=n?hU(n):[];return t||(t=r[e]),hl(r.splice)&&r.splice(e,1),r},!0,!0),t},n.pop=function(){var e;return this.updateArrayField(function(t){var n=t;return e||(e=n&&n.pop&&n.pop()),n},!0,!0),e},n.render=function(){var e={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},t=this.props,n=t.component,r=t.render,i=t.children,a=t.name,o=hs(t.formik,["validate","validationSchema"]),s=ha({},e,{form:o,name:a});return n?(0,l.createElement)(n,s):r?r(s):i?"function"==typeof i?i(s):hp(i)?null:l.Children.only(i):null},t})(l.Component).defaultProps={validateOnChange:!0},l.Component,l.Component;var hH=n(24802),h$=n(71209),hz=n(91750),hG=n(11970),hW=n(4689),hK=n(67598),hV=function(){return(hV=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function hq(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&(n[r[i]]=e[r[i]]);return n}function hZ(e){var t=e.disabled,n=e.field,r=n.onBlur,i=hq(n,["onBlur"]),a=e.form,o=a.isSubmitting,s=a.touched,u=a.errors,c=e.onBlur,l=e.helperText,f=hq(e,["disabled","field","form","onBlur","helperText"]),d=hm(u,i.name),h=hm(s,i.name)&&!!d;return hV(hV({variant:f.variant,error:h,helperText:h?d:l,disabled:null!=t?t:o,onBlur:null!=c?c:function(e){r(null!=e?e:i.name)}},i),f)}function hX(e){var t=e.children,n=hq(e,["children"]);return(0,l.createElement)(iw.Z,hV({},hZ(n)),t)}function hJ(e){var t=e.disabled,n=e.field,r=n.onBlur,i=hq(n,["onBlur"]),a=e.form.isSubmitting,o=(e.type,e.onBlur),s=hq(e,["disabled","field","form","type","onBlur"]);return hV(hV({disabled:null!=t?t:a,onBlur:null!=o?o:function(e){r(null!=e?e:i.name)}},i),s)}function hQ(e){return(0,l.createElement)(hH.Z,hV({},hJ(e)))}function h1(e){var t,n=e.disabled,r=e.field,i=r.onBlur,a=hq(r,["onBlur"]),o=e.form.isSubmitting,s=(e.type,e.onBlur),u=hq(e,["disabled","field","form","type","onBlur"]);return hV(hV({disabled:null!=n?n:o,indeterminate:!Array.isArray(a.value)&&null==a.value,onBlur:null!=s?s:function(e){i(null!=e?e:a.name)}},a),u)}function h0(e){return(0,l.createElement)(h$.Z,hV({},h1(e)))}function h2(e){var t=e.Label,n=hq(e,["Label"]);return(0,l.createElement)(hz.Z,hV({control:(0,l.createElement)(h$.Z,hV({},h1(n)))},t))}function h3(e){var t=e.disabled,n=e.field,r=n.onBlur,i=hq(n,["onBlur"]),a=e.form.isSubmitting,o=e.onBlur,s=hq(e,["disabled","field","form","onBlur"]);return hV(hV({disabled:null!=t?t:a,onBlur:null!=o?o:function(e){r(null!=e?e:i.name)}},i),s)}function h4(e){return(0,l.createElement)(hG.default,hV({},h3(e)))}function h6(e){var t=e.field,n=t.onBlur,r=hq(t,["onBlur"]),i=(e.form,e.onBlur),a=hq(e,["field","form","onBlur"]);return hV(hV({onBlur:null!=i?i:function(e){n(null!=e?e:r.name)}},r),a)}function h5(e){return(0,l.createElement)(hW.Z,hV({},h6(e)))}function h8(e){var t=e.disabled,n=e.field,r=n.onBlur,i=hq(n,["onBlur"]),a=e.form.isSubmitting,o=e.onBlur,s=hq(e,["disabled","field","form","onBlur"]);return hV(hV({disabled:null!=t?t:a,onBlur:null!=o?o:function(e){r(null!=e?e:i.name)}},i),s)}function h9(e){return(0,l.createElement)(hK.default,hV({},h8(e)))}hX.displayName="FormikMaterialUITextField",hQ.displayName="FormikMaterialUISwitch",h0.displayName="FormikMaterialUICheckbox",h2.displayName="FormikMaterialUICheckboxWithLabel",h4.displayName="FormikMaterialUISelect",h5.displayName="FormikMaterialUIRadioGroup",h9.displayName="FormikMaterialUIInputBase";try{a=Map}catch(h7){}try{o=Set}catch(pe){}function pt(e,t,n){if(!e||"object"!=typeof e||"function"==typeof e)return e;if(e.nodeType&&"cloneNode"in e)return e.cloneNode(!0);if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return RegExp(e);if(Array.isArray(e))return e.map(pn);if(a&&e instanceof a)return new Map(Array.from(e.entries()));if(o&&e instanceof o)return new Set(Array.from(e.values()));if(e instanceof Object){t.push(e);var r=Object.create(e);for(var i in n.push(r),e){var s=t.findIndex(function(t){return t===e[i]});r[i]=s>-1?n[s]:pt(e[i],t,n)}return r}return e}function pn(e){return pt(e,[],[])}let pr=Object.prototype.toString,pi=Error.prototype.toString,pa=RegExp.prototype.toString,po="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",ps=/^Symbol\((.*)\)(.*)$/;function pu(e){if(e!=+e)return"NaN";let t=0===e&&1/e<0;return t?"-0":""+e}function pc(e,t=!1){if(null==e||!0===e||!1===e)return""+e;let n=typeof e;if("number"===n)return pu(e);if("string"===n)return t?`"${e}"`:e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return po.call(e).replace(ps,"Symbol($1)");let r=pr.call(e).slice(8,-1);return"Date"===r?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===r||e instanceof Error?"["+pi.call(e)+"]":"RegExp"===r?pa.call(e):null}function pl(e,t){let n=pc(e,t);return null!==n?n:JSON.stringify(e,function(e,n){let r=pc(this[e],t);return null!==r?r:n},2)}let pf={default:"${path} is invalid",required:"${path} is a required field",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType({path:e,type:t,value:n,originalValue:r}){let i=null!=r&&r!==n,a=`${e} must be a \`${t}\` type, but the final value was: \`${pl(n,!0)}\``+(i?` (cast from the value \`${pl(r,!0)}\`).`:".");return null===n&&(a+='\n If "null" is intended as an empty value be sure to mark the schema as `.nullable()`'),a},defined:"${path} must be defined"},pd={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},ph={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},pp={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},pb={isValue:"${path} field must be ${value}"},pm={noUnknown:"${path} field has unspecified keys: ${unknown}"},pg={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must be have ${length} items"};Object.assign(Object.create(null),{mixed:pf,string:pd,number:ph,date:pp,object:pm,array:pg,boolean:pb});var pv=n(18721),py=n.n(pv);let pw=e=>e&&e.__isYupSchema__;class p_{constructor(e,t){if(this.refs=e,this.refs=e,"function"==typeof t){this.fn=t;return}if(!py()(t,"is"))throw TypeError("`is:` is required for `when()` conditions");if(!t.then&&!t.otherwise)throw TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:r,otherwise:i}=t,a="function"==typeof n?n:(...e)=>e.every(e=>e===n);this.fn=function(...e){let t=e.pop(),n=e.pop(),o=a(...e)?r:i;if(o)return"function"==typeof o?o(n):n.concat(o.resolve(t))}}resolve(e,t){let n=this.refs.map(e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context)),r=this.fn.apply(e,n.concat(e,t));if(void 0===r||r===e)return e;if(!pw(r))throw TypeError("conditions must return a schema object");return r.resolve(t)}}let pE=p_;function pS(e){return null==e?[]:[].concat(e)}function pk(){return(pk=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}let px=/\$\{\s*(\w+)\s*\}/g;class pT extends Error{static formatError(e,t){let n=t.label||t.path||"this";return(n!==t.path&&(t=pk({},t,{path:n})),"string"==typeof e)?e.replace(px,(e,n)=>pl(t[n])):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,n,r){super(),this.name="ValidationError",this.value=t,this.path=n,this.type=r,this.errors=[],this.inner=[],pS(e).forEach(e=>{pT.isError(e)?(this.errors.push(...e.errors),this.inner=this.inner.concat(e.inner.length?e.inner:e)):this.errors.push(e)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,pT)}}let pM=e=>{let t=!1;return(...n)=>{t||(t=!0,e(...n))}};function pO(e,t){let{endEarly:n,tests:r,args:i,value:a,errors:o,sort:s,path:u}=e,c=pM(t),l=r.length,f=[];if(o=o||[],!l)return o.length?c(new pT(o,a,u)):c(null,a);for(let d=0;d<r.length;d++){let h=r[d];h(i,function(e){if(e){if(!pT.isError(e))return c(e,a);if(n)return e.value=a,c(e,a);f.push(e)}if(--l<=0){if(f.length&&(s&&f.sort(s),o.length&&f.push(...o),o=f),o.length){c(new pT(o,a,u),a);return}c(null,a)}})}}var pA=n(66604),pL=n.n(pA),pC=n(55760);let pI={context:"$",value:"."};class pD{constructor(e,t={}){if("string"!=typeof e)throw TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw TypeError("ref must be a non-empty string");this.isContext=this.key[0]===pI.context,this.isValue=this.key[0]===pI.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?pI.context:this.isValue?pI.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&(0,pC.getter)(this.path,!0),this.map=t.map}getValue(e,t,n){let r=this.isContext?n:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}function pN(){return(pN=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function pP(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function pR(e){function t(t,n){let{value:r,path:i="",label:a,options:o,originalValue:s,sync:u}=t,c=pP(t,["value","path","label","options","originalValue","sync"]),{name:l,test:f,params:d,message:h}=e,{parent:p,context:b}=o;function m(e){return pD.isRef(e)?e.getValue(r,p,b):e}function g(e={}){let t=pL()(pN({value:r,originalValue:s,label:a,path:e.path||i},d,e.params),m),n=new pT(pT.formatError(e.message||h,t),r,t.path,e.type||l);return n.params=t,n}let v=pN({path:i,parent:p,type:l,createError:g,resolve:m,options:o,originalValue:s},c);if(!u){try{Promise.resolve(f.call(v,r,v)).then(e=>{pT.isError(e)?n(e):e?n(null,e):n(g())})}catch(y){n(y)}return}let w;try{var _;if(w=f.call(v,r,v),"function"==typeof(null==(_=w)?void 0:_.then))throw Error(`Validation test of type: "${v.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`)}catch(E){n(E);return}pT.isError(w)?n(w):w?n(null,w):n(g())}return t.OPTIONS=e,t}pD.prototype.__isYupRef=!0;let pj=e=>e.substr(0,e.length-1).substr(1);function pF(e,t,n,r=n){let i,a,o;return t?((0,pC.forEach)(t,(s,u,c)=>{let l=u?pj(s):s;if((e=e.resolve({context:r,parent:i,value:n})).innerType){let f=c?parseInt(l,10):0;if(n&&f>=n.length)throw Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${t}. because there is no value at that index. `);i=n,n=n&&n[f],e=e.innerType}if(!c){if(!e.fields||!e.fields[l])throw Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e._type}")`);i=n,n=n&&n[l],e=e.fields[l]}a=l,o=u?"["+s+"]":"."+s}),{schema:e,parent:i,parentPath:a}):{parent:i,parentPath:t,schema:e}}class pY{constructor(){this.list=new Set,this.refs=new Map}get size(){return this.list.size+this.refs.size}describe(){let e=[];for(let t of this.list)e.push(t);for(let[,n]of this.refs)e.push(n.describe());return e}toArray(){return Array.from(this.list).concat(Array.from(this.refs.values()))}add(e){pD.isRef(e)?this.refs.set(e.key,e):this.list.add(e)}delete(e){pD.isRef(e)?this.refs.delete(e.key):this.list.delete(e)}has(e,t){if(this.list.has(e))return!0;let n,r=this.refs.values();for(;!(n=r.next()).done;)if(t(n.value)===e)return!0;return!1}clone(){let e=new pY;return e.list=new Set(this.list),e.refs=new Map(this.refs),e}merge(e,t){let n=this.clone();return e.list.forEach(e=>n.add(e)),e.refs.forEach(e=>n.add(e)),t.list.forEach(e=>n.delete(e)),t.refs.forEach(e=>n.delete(e)),n}}function pB(){return(pB=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}class pU{constructor(e){this.deps=[],this.conditions=[],this._whitelist=new pY,this._blacklist=new pY,this.exclusiveTests=Object.create(null),this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(pf.notType)}),this.type=(null==e?void 0:e.type)||"mixed",this.spec=pB({strip:!1,strict:!1,abortEarly:!0,recursive:!0,nullable:!1,presence:"optional"},null==e?void 0:e.spec)}get _type(){return this.type}_typeCheck(e){return!0}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;let t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeError=this._typeError,t._whitelistError=this._whitelistError,t._blacklistError=this._blacklistError,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.exclusiveTests=pB({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=pn(pB({},this.spec,e)),t}label(e){var t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=t,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,n=e.clone(),r=pB({},t.spec,n.spec);return n.spec=r,n._typeError||(n._typeError=t._typeError),n._whitelistError||(n._whitelistError=t._whitelistError),n._blacklistError||(n._blacklistError=t._blacklistError),n._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),n.tests=t.tests,n.exclusiveTests=t.exclusiveTests,n.withMutation(t=>{e.tests.forEach(e=>{t.test(e.OPTIONS)})}),n}isType(e){return!!this.spec.nullable&&null===e||this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let n=t.conditions;(t=t.clone()).conditions=[],t=(t=n.reduce((t,n)=>n.resolve(t,e),t)).resolve(e)}return t}cast(e,t={}){let n=this.resolve(pB({value:e},t)),r=n._cast(e,t);if(void 0!==e&&!1!==t.assert&&!0!==n.isType(r)){let i=pl(e),a=pl(r);throw TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${n._type}". + */ Object.defineProperty(t,"__esModule",{value:!0}),"undefined"==typeof window||"function"!=typeof MessageChannel){var n,r,i,a,o,s=null,u=null,c=function(){if(null!==s)try{var e=t.unstable_now();s(!0,e),s=null}catch(n){throw setTimeout(c,0),n}},l=Date.now();t.unstable_now=function(){return Date.now()-l},n=function(e){null!==s?setTimeout(n,0,e):(s=e,setTimeout(c,0))},r=function(e,t){u=setTimeout(e,t)},i=function(){clearTimeout(u)},a=function(){return!1},o=t.unstable_forceFrameRate=function(){}}else{var f=window.performance,d=window.Date,h=window.setTimeout,p=window.clearTimeout;if("undefined"!=typeof console){var b=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof b&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof f&&"function"==typeof f.now)t.unstable_now=function(){return f.now()};else{var m=d.now();t.unstable_now=function(){return d.now()-m}}var g=!1,v=null,y=-1,w=5,_=0;a=function(){return t.unstable_now()>=_},o=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):w=0<e?Math.floor(1e3/e):5};var E=new MessageChannel,S=E.port2;E.port1.onmessage=function(){if(null!==v){var e=t.unstable_now();_=e+w;try{v(!0,e)?S.postMessage(null):(g=!1,v=null)}catch(n){throw S.postMessage(null),n}}else g=!1},n=function(e){v=e,g||(g=!0,S.postMessage(null))},r=function(e,n){y=h(function(){e(t.unstable_now())},n)},i=function(){p(y),y=-1}}function k(e,t){var n=e.length;e.push(t);a:for(;;){var r=Math.floor((n-1)/2),i=e[r];if(void 0!==i&&0<M(i,t))e[r]=t,e[n]=i,n=r;else break a}}function x(e){return void 0===(e=e[0])?null:e}function T(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,i=e.length;r<i;){var a=2*(r+1)-1,o=e[a],s=a+1,u=e[s];if(void 0!==o&&0>M(o,n))void 0!==u&&0>M(u,o)?(e[r]=u,e[s]=n,r=s):(e[r]=o,e[a]=n,r=a);else if(void 0!==u&&0>M(u,n))e[r]=u,e[s]=n,r=s;else break a}}return t}return null}function M(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var O=[],A=[],L=1,C=null,I=3,D=!1,N=!1,P=!1;function R(e){for(var t=x(A);null!==t;){if(null===t.callback)T(A);else if(t.startTime<=e)T(A),t.sortIndex=t.expirationTime,k(O,t);else break;t=x(A)}}function j(e){if(P=!1,R(e),!N){if(null!==x(O))N=!0,n(F);else{var t=x(A);null!==t&&r(j,t.startTime-e)}}}function F(e,n){N=!1,P&&(P=!1,i()),D=!0;var o=I;try{for(R(n),C=x(O);null!==C&&(!(C.expirationTime>n)||e&&!a());){var s=C.callback;if(null!==s){C.callback=null,I=C.priorityLevel;var u=s(C.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?C.callback=u:C===x(O)&&T(O),R(n)}else T(O);C=x(O)}if(null!==C)var c=!0;else{var l=x(A);null!==l&&r(j,l.startTime-n),c=!1}return c}finally{C=null,I=o,D=!1}}function Y(e){switch(e){case 1:return -1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var B=o;t.unstable_ImmediatePriority=1,t.unstable_UserBlockingPriority=2,t.unstable_NormalPriority=3,t.unstable_IdlePriority=5,t.unstable_LowPriority=4,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=I;I=e;try{return t()}finally{I=n}},t.unstable_next=function(e){switch(I){case 1:case 2:case 3:var t=3;break;default:t=I}var n=I;I=t;try{return e()}finally{I=n}},t.unstable_scheduleCallback=function(e,a,o){var s=t.unstable_now();if("object"==typeof o&&null!==o){var u=o.delay;u="number"==typeof u&&0<u?s+u:s,o="number"==typeof o.timeout?o.timeout:Y(e)}else o=Y(e),u=s;return o=u+o,e={id:L++,callback:a,priorityLevel:e,startTime:u,expirationTime:o,sortIndex:-1},u>s?(e.sortIndex=u,k(A,e),null===x(O)&&e===x(A)&&(P?i():P=!0,r(j,u-s))):(e.sortIndex=o,k(O,e),N||D||(N=!0,n(F))),e},t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_wrapCallback=function(e){var t=I;return function(){var n=I;I=t;try{return e.apply(this,arguments)}finally{I=n}}},t.unstable_getCurrentPriorityLevel=function(){return I},t.unstable_shouldYield=function(){var e=t.unstable_now();R(e);var n=x(O);return n!==C&&null!==C&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<C.expirationTime||a()},t.unstable_requestPaint=B,t.unstable_continueExecution=function(){N||D||(N=!0,n(F))},t.unstable_pauseExecution=function(){},t.unstable_getFirstCallbackNode=function(){return x(O)},t.unstable_Profiling=null},63840(e,t,n){"use strict";e.exports=n(60053)},36582(e,t){"use strict";t.Q=o,n=s;var n,r="",i=" ",a=/[ \t\n\r\f]+/g;function o(e){var t=String(e||r).trim();return t===r?[]:t.split(a)}function s(e){return e.join(i).trim()}},42830(e,t,n){e.exports=i;var r=n(17187).EventEmitter;function i(){r.call(this)}n(35717)(i,r),i.Readable=n(79481),i.Writable=n(64229),i.Duplex=n(56753),i.Transform=n(74605),i.PassThrough=n(82725),i.finished=n(8610),i.pipeline=n(59946),i.Stream=i,i.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function a(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",a),e._isStdio||t&&!1===t.end||(n.on("end",s),n.on("close",u));var o=!1;function s(){o||(o=!0,e.end())}function u(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(l(),0===r.listenerCount(this,"error"))throw e}function l(){n.removeListener("data",i),e.removeListener("drain",a),n.removeListener("end",s),n.removeListener("close",u),n.removeListener("error",c),e.removeListener("error",c),n.removeListener("end",l),n.removeListener("close",l),e.removeListener("close",l)}return n.on("error",c),e.on("error",c),n.on("end",l),n.on("close",l),e.on("close",l),e.emit("pipe",n),e}},32553(e,t,n){"use strict";var r=n(40396).Buffer,i=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(e){var t;if(!e)return"utf8";for(;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function o(e){var t=a(e);if("string"!=typeof t&&(r.isEncoding===i||!i(e)))throw Error("Unknown encoding: "+e);return t||e}function s(e){var t;switch(this.encoding=o(e),this.encoding){case"utf16le":this.text=p,this.end=b,t=4;break;case"utf8":this.fillLast=f,t=4;break;case"base64":this.text=m,this.end=g,t=3;break;default:this.write=v,this.end=y;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function u(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function c(e,t,n){var r=t.length-1;if(r<n)return 0;var i=u(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||-2===i?0:(i=u(t[r]))>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||-2===i?0:(i=u(t[r]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}function l(e,t,n){if((192&t[0])!=128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((192&t[1])!=128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(192&t[2])!=128)return e.lastNeed=2,"�"}}function f(e){var t=this.lastTotal-this.lastNeed,n=l(this,e,t);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length)}function d(e,t){var n=c(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function p(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function b(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function m(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function g(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function v(e){return e.toString(this.encoding)}function y(e){return e&&e.length?this.write(e):""}t.s=s,s.prototype.write=function(e){var t,n;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},s.prototype.end=h,s.prototype.text=d,s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},40396(e,t,n){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ var r=n(48764),i=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(a(r,t),t.Buffer=o),o.prototype=Object.create(i.prototype),a(i,o),o.from=function(e,t,n){if("number"==typeof e)throw TypeError("Argument must not be a number");return i(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},o.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return r.SlowBuffer(e)}},93379(e,t,n){"use strict";var r,i,a=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},o=(i={},function(e){if(void 0===i[e]){var t=document.querySelector(e);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(n){t=null}i[e]=t}return i[e]}),s=[];function u(e){for(var t=-1,n=0;n<s.length;n++)if(s[n].identifier===e){t=n;break}return t}function c(e,t){for(var n={},r=[],i=0;i<e.length;i++){var a=e[i],o=t.base?a[0]+t.base:a[0],c=n[o]||0,l="".concat(o," ").concat(c);n[o]=c+1;var f=u(l),d={css:a[1],media:a[2],sourceMap:a[3]};-1!==f?(s[f].references++,s[f].updater(d)):s.push({identifier:l,updater:v(d,t),references:1}),r.push(l)}return r}function l(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var i=n.nc;i&&(r.nonce=i)}if(Object.keys(r).forEach(function(e){t.setAttribute(e,r[e])}),"function"==typeof e.insert)e.insert(t);else{var a=o(e.insert||"head");if(!a)throw Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}function f(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}var d,h=(d=[],function(e,t){return d[e]=t,d.filter(Boolean).join("\n")});function p(e,t,n,r){var i=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=h(t,i);else{var a=document.createTextNode(i),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}function b(e,t,n){var r=n.css,i=n.media,a=n.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var m=null,g=0;function v(e,t){if(t.singleton){var n,r,i,a=g++;n=m||(m=l(t)),r=p.bind(null,n,a,!1),i=p.bind(null,n,a,!0)}else n=l(t),r=b.bind(null,n,t),i=function(){f(n)};return r(e),function(t){t?(t.css!==e.css||t.media!==e.media||t.sourceMap!==e.sourceMap)&&r(e=t):i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=a()),e=e||[];var n=c(e,t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var i=u(n[r]);s[i].references--}for(var a=c(e,t),o=0;o<n.length;o++){var l=u(n[o]);0===s[l].references&&(s[l].updater(),s.splice(l,1))}n=a}}}},78577(e,t,n){"use strict";n.d(t,{Z:()=>Al});var r,i,a,o,s,u,c,l=n(67294),f=n.t(l,2),d=n(39814),h=n(5977),p=n(57209),b=n(32316),m=n(95880),g=n(17051),v=n(71381),y=n(81701),w=n(3022),_=n(60323),E=n(87591),S=n(25649),k=n(28902),x=n(71426),T=n(48884),M=n(94184),O=n.n(M),A=n(37703),L=n(73935),C=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];e.call(t,i[1],i[0])}},t}()}(),I="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,D=void 0!==n.g&&n.g.Math===Math?n.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),N="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(D):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)},P=2;function R(e,t){var n=!1,r=!1,i=0;function a(){n&&(n=!1,e()),r&&s()}function o(){N(a)}function s(){var e=Date.now();if(n){if(e-i<P)return;r=!0}else n=!0,r=!1,setTimeout(o,t);i=e}return s}var j=20,F=["top","right","bottom","left","width","height","size","weight"],Y="undefined"!=typeof MutationObserver,B=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=R(this.refresh.bind(this),j)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},e.prototype.connect_=function(){I&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Y?(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)},e.prototype.disconnect_=function(){I&&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)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;F.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),U=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},H=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||D},$=Q(0,0,0,0);function z(e){return parseFloat(e)||0}function G(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(t,n){return t+z(e["border-"+n+"-width"])},0)}function W(e){for(var t=["top","right","bottom","left"],n={},r=0,i=t;r<i.length;r++){var a=i[r],o=e["padding-"+a];n[a]=z(o)}return n}function K(e){var t=e.getBBox();return Q(0,0,t.width,t.height)}function V(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return $;var r=H(e).getComputedStyle(e),i=W(r),a=i.left+i.right,o=i.top+i.bottom,s=z(r.width),u=z(r.height);if("border-box"===r.boxSizing&&(Math.round(s+a)!==t&&(s-=G(r,"left","right")+a),Math.round(u+o)!==n&&(u-=G(r,"top","bottom")+o)),!Z(e)){var c=Math.round(s+a)-t,l=Math.round(u+o)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(l)&&(u-=l)}return Q(i.left,i.top,s,u)}var q="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof H(e).SVGGraphicsElement}:function(e){return e instanceof H(e).SVGElement&&"function"==typeof e.getBBox};function Z(e){return e===H(e).document.documentElement}function X(e){return I?q(e)?K(e):V(e):$}function J(e){var t=e.x,n=e.y,r=e.width,i=e.height,a=Object.create(("undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object).prototype);return U(a,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),a}function Q(e,t,n,r){return{x:e,y:t,width:n,height:r}}var ee=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Q(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=X(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),et=function(){function e(e,t){var n=J(t);U(this,{target:e,contentRect:n})}return e}(),en=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new C,"function"!=typeof e)throw TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof H(e).Element))throw TypeError('parameter 1 is not of type "Element".');var t=this.observations_;!t.has(e)&&(t.set(e,new ee(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof H(e).Element))throw TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new et(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),er="undefined"!=typeof WeakMap?new WeakMap:new C,ei=function(){function e(t){if(!(this instanceof e))throw TypeError("Cannot call a class as a function.");if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");var n=B.getInstance(),r=new en(t,n,this);er.set(this,r)}return e}();["observe","unobserve","disconnect"].forEach(function(e){ei.prototype[e]=function(){var t;return(t=er.get(this))[e].apply(t,arguments)}});var ea=void 0!==D.ResizeObserver?D.ResizeObserver:ei;let eo=ea;var es=function(e){var t=[],n=null,r=function(){for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];t=i,!n&&(n=requestAnimationFrame(function(){n=null,e.apply(void 0,t)}))};return r.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},r};let eu=es;var ec=n(45697),el=n.n(ec);function ef(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}let ed=ef;var eh=n(56169),ep=function(){return eh.Z.Date.now()};let eb=ep;var em=eh.Z.Symbol;let eg=em;var ev=Object.prototype,ey=ev.hasOwnProperty,ew=ev.toString,e_=eg?eg.toStringTag:void 0;function eE(e){var t=ey.call(e,e_),n=e[e_];try{e[e_]=void 0;var r=!0}catch(i){}var a=ew.call(e);return r&&(t?e[e_]=n:delete e[e_]),a}let eS=eE;var ek=Object.prototype.toString;function ex(e){return ek.call(e)}let eT=ex;var eM="[object Null]",eO="[object Undefined]",eA=eg?eg.toStringTag:void 0;function eL(e){return null==e?void 0===e?eO:eM:eA&&eA in Object(e)?eS(e):eT(e)}let eC=eL;function eI(e){return null!=e&&"object"==typeof e}let eD=eI;var eN="[object Symbol]";function eP(e){return"symbol"==typeof e||eD(e)&&eC(e)==eN}let eR=eP;var ej=0/0,eF=/^\s+|\s+$/g,eY=/^[-+]0x[0-9a-f]+$/i,eB=/^0b[01]+$/i,eU=/^0o[0-7]+$/i,eH=parseInt;function e$(e){if("number"==typeof e)return e;if(eR(e))return ej;if(ed(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ed(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(eF,"");var n=eB.test(e);return n||eU.test(e)?eH(e.slice(2),n?2:8):eY.test(e)?ej:+e}let ez=e$;var eG="Expected a function",eW=Math.max,eK=Math.min;function eV(e,t,n){var r,i,a,o,s,u,c=0,l=!1,f=!1,d=!0;if("function"!=typeof e)throw TypeError(eG);function h(t){var n=r,a=i;return r=i=void 0,c=t,o=e.apply(a,n)}function p(e){return c=e,s=setTimeout(g,t),l?h(e):o}function b(e){var n=e-u,r=e-c,i=t-n;return f?eK(i,a-r):i}function m(e){var n=e-u,r=e-c;return void 0===u||n>=t||n<0||f&&r>=a}function g(){var e=eb();if(m(e))return v(e);s=setTimeout(g,b(e))}function v(e){return(s=void 0,d&&r)?h(e):(r=i=void 0,o)}function y(){void 0!==s&&clearTimeout(s),c=0,r=u=i=s=void 0}function w(){return void 0===s?o:v(eb())}function _(){var e=eb(),n=m(e);if(r=arguments,i=this,u=e,n){if(void 0===s)return p(u);if(f)return clearTimeout(s),s=setTimeout(g,t),h(u)}return void 0===s&&(s=setTimeout(g,t)),o}return t=ez(t)||0,ed(n)&&(l=!!n.leading,a=(f="maxWait"in n)?eW(ez(n.maxWait)||0,t):a,d="trailing"in n?!!n.trailing:d),_.cancel=y,_.flush=w,_}let eq=eV;var eZ="Expected a function";function eX(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw TypeError(eZ);return ed(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),eq(e,t,{leading:r,maxWait:t,trailing:i})}let eJ=eX;var eQ={debounce:eq,throttle:eJ},e1=function(e){return eQ[e]},e0=function(e){return"function"==typeof e},e2=function(){return"undefined"==typeof window},e3=function(e){return e instanceof Element||e instanceof HTMLDocument};function e4(e){return(e4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function e6(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function e5(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function e8(e,t,n){return t&&e5(e.prototype,t),n&&e5(e,n),e}function e9(e,t){return t&&("object"===e4(t)||"function"==typeof t)?t:e7(e)}function e7(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function te(e){return(te=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tt(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&tn(e,t)}function tn(e,t){return(tn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var tr=function(e){function t(){return e6(this,t),e9(this,te(t).apply(this,arguments))}return tt(t,e),e8(t,[{key:"render",value:function(){return this.props.children}}]),t}(l.PureComponent);let ti=tr;function ta(e){return(ta="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function to(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function ts(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tu(e,t,n){return t&&ts(e.prototype,t),n&&ts(e,n),e}function tc(e,t){return t&&("object"===ta(t)||"function"==typeof t)?t:tf(e)}function tl(e){return(tl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tf(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function td(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&th(e,t)}function th(e,t){return(th=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var tb=function(e){function t(e){to(this,t),n=tc(this,tl(t).call(this,e)),tp(tf(n),"cancelHandler",function(){n.resizeHandler&&n.resizeHandler.cancel&&(n.resizeHandler.cancel(),n.resizeHandler=null)}),tp(tf(n),"rafClean",function(){n.raf&&n.raf.cancel&&(n.raf.cancel(),n.raf=null)}),tp(tf(n),"toggleObserver",function(e){var t=n.getElement();t&&n.resizeObserver[e]&&n.resizeObserver[e](t)}),tp(tf(n),"getElement",function(){var e=n.props,t=e.querySelector,r=e.targetDomEl;if(!e2()){if(t)return document.querySelector(t);if(r&&e3(r))return r;var i=n.element&&(0,L.findDOMNode)(n.element);if(i)return i.parentElement}}),tp(tf(n),"createUpdater",function(){return n.rafClean(),n.raf=eu(function(e){var t=e.width,r=e.height,i=n.props.onResize;e0(i)&&i(t,r),n.setState({width:t,height:r})}),n.raf}),tp(tf(n),"createResizeHandler",function(e){var t=n.state,r=t.width,i=t.height,a=n.props,o=a.handleWidth,s=a.handleHeight;if(o||s){var u=n.createUpdater();e.forEach(function(e){var t=e&&e.contentRect||{},a=t.width,c=t.height,l=o&&r!==a,f=s&&i!==c,d=l||f;n.skipOnMount||!d||e2()||u({width:a,height:c}),n.skipOnMount=!1})}}),tp(tf(n),"onRef",function(e){n.element=e}),tp(tf(n),"getRenderType",function(){var e=n.props,t=e.render,r=e.children;return e0(t)?"renderProp":e0(r)?"childFunction":(0,l.isValidElement)(r)?"child":Array.isArray(r)?"childArray":"parent"}),tp(tf(n),"getTargetComponent",function(){var e,t=n.props,r=t.render,i=t.children,a=t.nodeType,o=n.state,s={width:o.width,height:o.height},u=n.getRenderType();switch(u){case"renderProp":return(0,l.cloneElement)(r(s),{key:"resize-detector"});case"childFunction":return(0,l.cloneElement)(i(s));case"child":return(0,l.cloneElement)(i,s);case"childArray":return i.map(function(e){return!!e&&(0,l.cloneElement)(e,s)});default:return(0,l.createElement)(a)}});var n,r=e.skipOnMount,i=e.refreshMode,a=e.refreshRate,o=e.refreshOptions;n.state={width:void 0,height:void 0},n.skipOnMount=r,n.raf=null,n.element=null,n.unmounted=!1;var s=e1(i);return n.resizeHandler=s?s(n.createResizeHandler,a,o):n.createResizeHandler,n.resizeObserver=new eo(n.resizeHandler),n}return td(t,e),tu(t,[{key:"componentDidMount",value:function(){this.toggleObserver("observe")}},{key:"componentWillUnmount",value:function(){this.toggleObserver("unobserve"),this.rafClean(),this.cancelHandler(),this.unmounted=!0}},{key:"render",value:function(){return l.createElement(ti,{ref:this.onRef},this.getTargetComponent())}}]),t}(l.PureComponent);tb.propTypes={handleWidth:ec.bool,handleHeight:ec.bool,skipOnMount:ec.bool,refreshRate:ec.number,refreshMode:ec.string,refreshOptions:(0,ec.shape)({leading:ec.bool,trailing:ec.bool}),querySelector:ec.string,targetDomEl:ec.any,onResize:ec.func,render:ec.func,children:ec.any,nodeType:ec.node},tb.defaultProps={handleWidth:!1,handleHeight:!1,skipOnMount:!1,refreshRate:1e3,refreshMode:void 0,refreshOptions:void 0,querySelector:null,targetDomEl:null,onResize:null,render:void 0,children:null,nodeType:"div"};let tm=tb,tg=tm;var tv=n(97779),ty=n(26842),tw=n(82067),t_=n(70087),tE=n(31126);function tS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tk(e){if(Array.isArray(e))return e}function tx(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function tT(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function tM(e,t){return tk(e)||tx(e,t)||tO(e,t)||tT()}function tO(e,t){if(e){if("string"==typeof e)return tS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tS(e,t)}}var tA=function(e){return{accountButton:{fontSize:32,color:e.palette.primary.main},menuList:{paddingTop:0,paddingBottom:0}}},tL=(0,b.withStyles)(tA)(function(e){var t=e.classes,n=(0,A.I0)(),r=tM(l.useState(null),2),i=r[0],a=r[1],o=function(e){a(e.currentTarget)},s=function(){a(null)},u=function(){n((0,ty.EO)()),s()},c=function(){n((0,ty.iw)()),s()};return l.createElement(l.Fragment,null,l.createElement(y.default,{disableRipple:!0,onClick:o},l.createElement(tw.Z,{className:t.accountButton})),l.createElement(t_.Z,{id:"account-menu",anchorEl:i,getContentAnchorEl:null,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:8,horizontal:64},open:Boolean(i),onClose:s,disableAutoFocusItem:!0,MenuListProps:{className:t.menuList}},l.createElement(tE.default,{onClick:c},"Register MFA Token"),l.createElement(tE.default,{onClick:u},"Log out")))}),tC=n(9969),tI=n(73727);function tD(){return(tD=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var tN=function(e){return l.createElement(tE.default,tD({button:!0},e,{component:tI.rU}),e.children)};function tP(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tR(e){if(Array.isArray(e))return e}function tj(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function tF(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function tY(e,t){return tR(e)||tj(e,t)||tB(e,t)||tF()}function tB(e,t){if(e){if("string"==typeof e)return tP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tP(e,t)}}var tU=function(e){return{iconButton:{fontSize:32,color:e.palette.primary.main},menuList:{paddingTop:0,paddingBottom:0}}},tH=(0,b.withStyles)(tU)(function(e){var t=e.classes,n=tY(l.useState(null),2),r=n[0],i=n[1],a=function(e){i(e.currentTarget)},o=function(){i(null)};return l.createElement(l.Fragment,null,l.createElement(y.default,{disableRipple:!0,onClick:a},l.createElement(tC.Z,{className:t.iconButton})),l.createElement(t_.Z,{id:"settings-menu",anchorEl:r,getContentAnchorEl:null,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:8,horizontal:128},open:Boolean(r),onClose:o,disableAutoFocusItem:!0,MenuListProps:{className:t.menuList}},l.createElement(tN,{onClick:o,to:"/keys"},"Key Management"),l.createElement(tN,{onClick:o,to:"/config"},"Configuration")))}),t$=function(e){var t=e.children,n=e.href,r=e.id,i=e.className,a=e.onClick;return l.createElement(tI.rU,{to:n,id:r,className:i,onClick:a},t)};let tz=t$;var tG=n(79424),tW=function(e){return{root:{flexGrow:1,height:3,overflow:"hidden"},colorPrimary:{backgroundColor:e.palette.background.default},barColorPrimary:{backgroundColor:e.palette.primary.main}}},tK=function(e){var t=e.classes,n=e.fetchCount,r={colorPrimary:t.colorPrimary,barColorPrimary:t.barColorPrimary};return l.createElement("div",{className:t.root},n>0&&l.createElement(tG.Z,{variant:"indeterminate",classes:r}))};tK.propTypes={fetchCount:el().number.isRequired};let tV=(0,b.withStyles)(tW)(tK);var tq=n(5536);let tZ=n.p+"ba8bbf16ebf8e1d05bef.svg";function tX(){return(tX=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var tJ=function(e){return l.createElement(tq.T,tX({src:tZ,alt:"Chainlink Operator"},e))};tJ.propTypes={width:el().number,height:el().number};let tQ=tJ;function t1(e){return e.fetching.count}var t0=n(70655);function t2(e){return(t2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function t3(e){return"object"==t2(e)&&null!==e}var t4=n(99763);function t6(e,t){for(var n,r=/\r\n|[\n\r]/g,i=1,a=t+1;(n=r.exec(e.body))&&n.index<t;)i+=1,a=t+1-(n.index+n[0].length);return{line:i,column:a}}function t5(e){return t8(e.source,t6(e.source,e.start))}function t8(e,t){var n=e.locationOffset.column-1,r=t7(n)+e.body,i=t.line-1,a=e.locationOffset.line-1,o=t.line+a,s=1===t.line?n:0,u=t.column+s,c="".concat(e.name,":").concat(o,":").concat(u,"\n"),l=r.split(/\r\n|[\n\r]/g),f=l[i];if(f.length>120){for(var d=Math.floor(u/80),h=u%80,p=[],b=0;b<f.length;b+=80)p.push(f.slice(b,b+80));return c+t9([["".concat(o),p[0]]].concat(p.slice(1,d+1).map(function(e){return["",e]}),[[" ",t7(h-1)+"^"],["",p[d+1]]]))}return c+t9([["".concat(o-1),l[i-1]],["".concat(o),f],["",t7(u-1)+"^"],["".concat(o+1),l[i+1]]])}function t9(e){var t=e.filter(function(e){return e[0],void 0!==e[1]}),n=Math.max.apply(Math,t.map(function(e){return e[0].length}));return t.map(function(e){var t=e[0],r=e[1];return ne(n,t)+(r?" | "+r:" |")}).join("\n")}function t7(e){return Array(e+1).join(" ")}function ne(e,t){return t7(e-t.length)+t}function nt(e){return(nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function nr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nn(Object(n),!0).forEach(function(t){ni(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ni(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function na(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function no(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ns(e,t,n){return t&&no(e.prototype,t),n&&no(e,n),e}function nu(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&nm(e,t)}function nc(e){var t=np();return function(){var n,r=ng(e);if(t){var i=ng(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return nl(this,n)}}function nl(e,t){return t&&("object"===nt(t)||"function"==typeof t)?t:nf(e)}function nf(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nd(e){var t="function"==typeof Map?new Map:void 0;return(nd=function(e){if(null===e||!nb(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return nh(e,arguments,ng(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),nm(n,e)})(e)}function nh(e,t,n){return(nh=np()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&nm(i,n.prototype),i}).apply(null,arguments)}function np(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function nb(e){return -1!==Function.toString.call(e).indexOf("[native code]")}function nm(e,t){return(nm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ng(e){return(ng=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var nv=function(e){nu(n,e);var t=nc(n);function n(e,r,i,a,o,s,u){na(this,n),(b=t.call(this,e)).name="GraphQLError",b.originalError=null!=s?s:void 0,b.nodes=ny(Array.isArray(r)?r:r?[r]:void 0);for(var c=[],l=0,f=null!==(m=b.nodes)&&void 0!==m?m:[];l<f.length;l++){var d,h,p,b,m,g=f[l].loc;null!=g&&c.push(g)}c=ny(c),b.source=null!=i?i:null===(d=c)||void 0===d?void 0:d[0].source,b.positions=null!=a?a:null===(h=c)||void 0===h?void 0:h.map(function(e){return e.start}),b.locations=a&&i?a.map(function(e){return t6(i,e)}):null===(p=c)||void 0===p?void 0:p.map(function(e){return t6(e.source,e.start)}),b.path=null!=o?o:void 0;var v=null==s?void 0:s.extensions;return(null==u&&t3(v)?b.extensions=nr({},v):b.extensions=null!=u?u:{},Object.defineProperties(nf(b),{message:{enumerable:!0},locations:{enumerable:null!=b.locations},path:{enumerable:null!=b.path},extensions:{enumerable:null!=b.extensions&&Object.keys(b.extensions).length>0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=s&&s.stack)?(Object.defineProperty(nf(b),"stack",{value:s.stack,writable:!0,configurable:!0}),nl(b)):(Error.captureStackTrace?Error.captureStackTrace(nf(b),n):Object.defineProperty(nf(b),"stack",{value:Error().stack,writable:!0,configurable:!0}),b)}return ns(n,[{key:"toString",value:function(){return nw(this)}},{key:t4.YF,get:function(){return"Object"}}]),n}(nd(Error));function ny(e){return void 0===e||0===e.length?void 0:e}function nw(e){var t=e.message;if(e.nodes)for(var n=0,r=e.nodes;n<r.length;n++){var i=r[n];i.loc&&(t+="\n\n"+t5(i.loc))}else if(e.source&&e.locations)for(var a=0,o=e.locations;a<o.length;a++){var s=o[a];t+="\n\n"+t8(e.source,s)}return t}function n_(e,t,n){return new nv("Syntax Error: ".concat(n),void 0,e,[t])}var nE=n(97359),nS=n(25217),nk=Object.freeze({SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"}),nx=n(10143),nT=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"}),nM=n(87392),nO=function(){function e(e){var t=new nS.WU(nk.SOF,0,0,0,0,null);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}var t=e.prototype;return t.advance=function(){return this.lastToken=this.token,this.token=this.lookahead()},t.lookahead=function(){var e,t=this.token;if(t.kind!==nk.EOF)do t=null!==(e=t.next)&&void 0!==e?e:t.next=nC(this,t);while(t.kind===nk.COMMENT)return t},e}();function nA(e){return e===nk.BANG||e===nk.DOLLAR||e===nk.AMP||e===nk.PAREN_L||e===nk.PAREN_R||e===nk.SPREAD||e===nk.COLON||e===nk.EQUALS||e===nk.AT||e===nk.BRACKET_L||e===nk.BRACKET_R||e===nk.BRACE_L||e===nk.PIPE||e===nk.BRACE_R}function nL(e){return isNaN(e)?nk.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function nC(e,t){for(var n=e.source,r=n.body,i=r.length,a=t.end;a<i;){var o=r.charCodeAt(a),s=e.line,u=1+a-e.lineStart;switch(o){case 65279:case 9:case 32:case 44:++a;continue;case 10:++a,++e.line,e.lineStart=a;continue;case 13:10===r.charCodeAt(a+1)?a+=2:++a,++e.line,e.lineStart=a;continue;case 33:return new nS.WU(nk.BANG,a,a+1,s,u,t);case 35:return nD(n,a,s,u,t);case 36:return new nS.WU(nk.DOLLAR,a,a+1,s,u,t);case 38:return new nS.WU(nk.AMP,a,a+1,s,u,t);case 40:return new nS.WU(nk.PAREN_L,a,a+1,s,u,t);case 41:return new nS.WU(nk.PAREN_R,a,a+1,s,u,t);case 46:if(46===r.charCodeAt(a+1)&&46===r.charCodeAt(a+2))return new nS.WU(nk.SPREAD,a,a+3,s,u,t);break;case 58:return new nS.WU(nk.COLON,a,a+1,s,u,t);case 61:return new nS.WU(nk.EQUALS,a,a+1,s,u,t);case 64:return new nS.WU(nk.AT,a,a+1,s,u,t);case 91:return new nS.WU(nk.BRACKET_L,a,a+1,s,u,t);case 93:return new nS.WU(nk.BRACKET_R,a,a+1,s,u,t);case 123:return new nS.WU(nk.BRACE_L,a,a+1,s,u,t);case 124:return new nS.WU(nk.PIPE,a,a+1,s,u,t);case 125:return new nS.WU(nk.BRACE_R,a,a+1,s,u,t);case 34:if(34===r.charCodeAt(a+1)&&34===r.charCodeAt(a+2))return nj(n,a,s,u,t,e);return nR(n,a,s,u,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return nN(n,a,o,s,u,t);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return nB(n,a,s,u,t)}throw n_(n,a,nI(o))}var c=e.line,l=1+a-e.lineStart;return new nS.WU(nk.EOF,i,i,c,l,t)}function nI(e){return e<32&&9!==e&&10!==e&&13!==e?"Cannot contain the invalid character ".concat(nL(e),"."):39===e?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character ".concat(nL(e),".")}function nD(e,t,n,r,i){var a,o=e.body,s=t;do a=o.charCodeAt(++s);while(!isNaN(a)&&(a>31||9===a))return new nS.WU(nk.COMMENT,t,s,n,r,i,o.slice(t+1,s))}function nN(e,t,n,r,i,a){var o=e.body,s=n,u=t,c=!1;if(45===s&&(s=o.charCodeAt(++u)),48===s){if((s=o.charCodeAt(++u))>=48&&s<=57)throw n_(e,u,"Invalid number, unexpected digit after 0: ".concat(nL(s),"."))}else u=nP(e,u,s),s=o.charCodeAt(u);if(46===s&&(c=!0,s=o.charCodeAt(++u),u=nP(e,u,s),s=o.charCodeAt(u)),(69===s||101===s)&&(c=!0,(43===(s=o.charCodeAt(++u))||45===s)&&(s=o.charCodeAt(++u)),u=nP(e,u,s),s=o.charCodeAt(u)),46===s||nU(s))throw n_(e,u,"Invalid number, expected digit but got: ".concat(nL(s),"."));return new nS.WU(c?nk.FLOAT:nk.INT,t,u,r,i,a,o.slice(t,u))}function nP(e,t,n){var r=e.body,i=t,a=n;if(a>=48&&a<=57){do a=r.charCodeAt(++i);while(a>=48&&a<=57)return i}throw n_(e,i,"Invalid number, expected digit but got: ".concat(nL(a),"."))}function nR(e,t,n,r,i){for(var a=e.body,o=t+1,s=o,u=0,c="";o<a.length&&!isNaN(u=a.charCodeAt(o))&&10!==u&&13!==u;){if(34===u)return c+=a.slice(s,o),new nS.WU(nk.STRING,t,o+1,n,r,i,c);if(u<32&&9!==u)throw n_(e,o,"Invalid character within String: ".concat(nL(u),"."));if(++o,92===u){switch(c+=a.slice(s,o-1),u=a.charCodeAt(o)){case 34:c+='"';break;case 47:c+="/";break;case 92:c+="\\";break;case 98:c+="\b";break;case 102:c+="\f";break;case 110:c+="\n";break;case 114:c+="\r";break;case 116:c+=" ";break;case 117:var l=nF(a.charCodeAt(o+1),a.charCodeAt(o+2),a.charCodeAt(o+3),a.charCodeAt(o+4));if(l<0){var f=a.slice(o+1,o+5);throw n_(e,o,"Invalid character escape sequence: \\u".concat(f,"."))}c+=String.fromCharCode(l),o+=4;break;default:throw n_(e,o,"Invalid character escape sequence: \\".concat(String.fromCharCode(u),"."))}s=++o}}throw n_(e,o,"Unterminated string.")}function nj(e,t,n,r,i,a){for(var o=e.body,s=t+3,u=s,c=0,l="";s<o.length&&!isNaN(c=o.charCodeAt(s));){if(34===c&&34===o.charCodeAt(s+1)&&34===o.charCodeAt(s+2))return l+=o.slice(u,s),new nS.WU(nk.BLOCK_STRING,t,s+3,n,r,i,(0,nM.W7)(l));if(c<32&&9!==c&&10!==c&&13!==c)throw n_(e,s,"Invalid character within String: ".concat(nL(c),"."));10===c?(++s,++a.line,a.lineStart=s):13===c?(10===o.charCodeAt(s+1)?s+=2:++s,++a.line,a.lineStart=s):92===c&&34===o.charCodeAt(s+1)&&34===o.charCodeAt(s+2)&&34===o.charCodeAt(s+3)?(l+=o.slice(u,s)+'"""',s+=4,u=s):++s}throw n_(e,s,"Unterminated string.")}function nF(e,t,n,r){return nY(e)<<12|nY(t)<<8|nY(n)<<4|nY(r)}function nY(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function nB(e,t,n,r,i){for(var a=e.body,o=a.length,s=t+1,u=0;s!==o&&!isNaN(u=a.charCodeAt(s))&&(95===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122);)++s;return new nS.WU(nk.NAME,t,s,n,r,i,a.slice(t,s))}function nU(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}function nH(e,t){return new n$(e,t).parseDocument()}var n$=function(){function e(e,t){var n=(0,nx.T)(e)?e:new nx.H(e);this._lexer=new nO(n),this._options=t}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(nk.NAME);return{kind:nE.h.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:nE.h.DOCUMENT,definitions:this.many(nk.SOF,this.parseDefinition,nk.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(nk.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else if(this.peek(nk.BRACE_L))return this.parseOperationDefinition();else if(this.peekDescription())return this.parseTypeSystemDefinition();throw this.unexpected()},t.parseOperationDefinition=function(){var e,t=this._lexer.token;if(this.peek(nk.BRACE_L))return{kind:nE.h.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(t)};var n=this.parseOperationType();return this.peek(nk.NAME)&&(e=this.parseName()),{kind:nE.h.OPERATION_DEFINITION,operation:n,name:e,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseOperationType=function(){var e=this.expectToken(nk.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},t.parseVariableDefinitions=function(){return this.optionalMany(nk.PAREN_L,this.parseVariableDefinition,nk.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:nE.h.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(nk.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(nk.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},t.parseVariable=function(){var e=this._lexer.token;return this.expectToken(nk.DOLLAR),{kind:nE.h.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:nE.h.SELECTION_SET,selections:this.many(nk.BRACE_L,this.parseSelection,nk.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(nk.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,n=this._lexer.token,r=this.parseName();return this.expectOptionalToken(nk.COLON)?(e=r,t=this.parseName()):t=r,{kind:nE.h.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(nk.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(n)}},t.parseArguments=function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(nk.PAREN_L,t,nk.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(nk.COLON),{kind:nE.h.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:nE.h.ARGUMENT,name:this.parseName(),value:(this.expectToken(nk.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(nk.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(nk.NAME)?{kind:nE.h.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:nE.h.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseFragmentDefinition=function(){var e,t=this._lexer.token;return(this.expectKeyword("fragment"),(null===(e=this._options)||void 0===e?void 0:e.experimentalFragmentVariables)===!0)?{kind:nE.h.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:nE.h.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(e){var t=this._lexer.token;switch(t.kind){case nk.BRACKET_L:return this.parseList(e);case nk.BRACE_L:return this.parseObject(e);case nk.INT:return this._lexer.advance(),{kind:nE.h.INT,value:t.value,loc:this.loc(t)};case nk.FLOAT:return this._lexer.advance(),{kind:nE.h.FLOAT,value:t.value,loc:this.loc(t)};case nk.STRING:case nk.BLOCK_STRING:return this.parseStringLiteral();case nk.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:nE.h.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:nE.h.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:nE.h.NULL,loc:this.loc(t)};default:return{kind:nE.h.ENUM,value:t.value,loc:this.loc(t)}}case nk.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:nE.h.STRING,value:e.value,block:e.kind===nk.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,n=this._lexer.token,r=function(){return t.parseValueLiteral(e)};return{kind:nE.h.LIST,values:this.any(nk.BRACKET_L,r,nk.BRACKET_R),loc:this.loc(n)}},t.parseObject=function(e){var t=this,n=this._lexer.token,r=function(){return t.parseObjectField(e)};return{kind:nE.h.OBJECT,fields:this.any(nk.BRACE_L,r,nk.BRACE_R),loc:this.loc(n)}},t.parseObjectField=function(e){var t=this._lexer.token,n=this.parseName();return this.expectToken(nk.COLON),{kind:nE.h.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(nk.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(nk.AT),{kind:nE.h.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return(this.expectOptionalToken(nk.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(nk.BRACKET_R),e={kind:nE.h.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(nk.BANG))?{kind:nE.h.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:nE.h.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},t.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===nk.NAME)switch(e.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(e)},t.peekDescription=function(){return this.peek(nk.STRING)||this.peek(nk.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var n=this.parseDirectives(!0),r=this.many(nk.BRACE_L,this.parseOperationTypeDefinition,nk.BRACE_R);return{kind:nE.h.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(nk.COLON);var n=this.parseNamedType();return{kind:nE.h.OPERATION_TYPE_DEFINITION,operation:t,type:n,loc:this.loc(e)}},t.parseScalarTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var n=this.parseName(),r=this.parseDirectives(!0);return{kind:nE.h.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),a=this.parseFieldsDefinition();return{kind:nE.h.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:a,loc:this.loc(e)}},t.parseImplementsInterfaces=function(){var e;if(!this.expectOptionalKeyword("implements"))return[];if((null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLImplementsInterfaces)===!0){var t=[];this.expectOptionalToken(nk.AMP);do t.push(this.parseNamedType());while(this.expectOptionalToken(nk.AMP)||this.peek(nk.NAME))return t}return this.delimitedMany(nk.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var e;return(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)===!0&&this.peek(nk.BRACE_L)&&this._lexer.lookahead().kind===nk.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(nk.BRACE_L,this.parseFieldDefinition,nk.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(nk.COLON);var i=this.parseTypeReference(),a=this.parseDirectives(!0);return{kind:nE.h.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:a,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(nk.PAREN_L,this.parseInputValueDef,nk.PAREN_R)},t.parseInputValueDef=function(){var e,t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(nk.COLON);var i=this.parseTypeReference();this.expectOptionalToken(nk.EQUALS)&&(e=this.parseValueLiteral(!0));var a=this.parseDirectives(!0);return{kind:nE.h.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:e,directives:a,loc:this.loc(t)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),a=this.parseFieldsDefinition();return{kind:nE.h.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:a,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseUnionMemberTypes();return{kind:nE.h.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(nk.EQUALS)?this.delimitedMany(nk.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseEnumValuesDefinition();return{kind:nE.h.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(nk.BRACE_L,this.parseEnumValueDefinition,nk.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseDirectives(!0);return{kind:nE.h.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseInputFieldsDefinition();return{kind:nE.h.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(nk.BRACE_L,this.parseInputValueDef,nk.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===nk.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)},t.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),n=this.optionalMany(nk.BRACE_L,this.parseOperationTypeDefinition,nk.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return{kind:nE.h.SCHEMA_EXTENSION,directives:t,operationTypes:n,loc:this.loc(e)}},t.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),n=this.parseDirectives(!0);if(0===n.length)throw this.unexpected();return{kind:nE.h.SCALAR_TYPE_EXTENSION,name:t,directives:n,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:nE.h.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:nE.h.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:nE.h.UNION_TYPE_EXTENSION,name:t,directives:n,types:r,loc:this.loc(e)}},t.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:nE.h.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r,loc:this.loc(e)}},t.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:nE.h.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r,loc:this.loc(e)}},t.parseDirectiveDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(nk.AT);var n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var a=this.parseDirectiveLocations();return{kind:nE.h.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:a,loc:this.loc(e)}},t.parseDirectiveLocations=function(){return this.delimitedMany(nk.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==nT[t.value])return t;throw this.unexpected(e)},t.loc=function(e){var t;if((null===(t=this._options)||void 0===t?void 0:t.noLocation)!==!0)return new nS.Ye(e,this._lexer.lastToken,this._lexer.source)},t.peek=function(e){return this._lexer.token.kind===e},t.expectToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw n_(this._lexer.source,t.start,"Expected ".concat(nG(e),", found ").concat(nz(t),"."))},t.expectOptionalToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t},t.expectKeyword=function(e){var t=this._lexer.token;if(t.kind===nk.NAME&&t.value===e)this._lexer.advance();else throw n_(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(nz(t),"."))},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===nk.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=null!=e?e:this._lexer.token;return n_(this._lexer.source,t.start,"Unexpected ".concat(nz(t),"."))},t.any=function(e,t,n){this.expectToken(e);for(var r=[];!this.expectOptionalToken(n);)r.push(t.call(this));return r},t.optionalMany=function(e,t,n){if(this.expectOptionalToken(e)){var r=[];do r.push(t.call(this));while(!this.expectOptionalToken(n))return r}return[]},t.many=function(e,t,n){this.expectToken(e);var r=[];do r.push(t.call(this));while(!this.expectOptionalToken(n))return r},t.delimitedMany=function(e,t){this.expectOptionalToken(e);var n=[];do n.push(t.call(this));while(this.expectOptionalToken(e))return n},e}();function nz(e){var t=e.value;return nG(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function nG(e){return nA(e)?'"'.concat(e,'"'):e}var nW=new Map,nK=new Map,nV=!0,nq=!1;function nZ(e){return e.replace(/[\s,]+/g," ").trim()}function nX(e){return nZ(e.source.body.substring(e.start,e.end))}function nJ(e){var t=new Set,n=[];return e.definitions.forEach(function(e){if("FragmentDefinition"===e.kind){var r=e.name.value,i=nX(e.loc),a=nK.get(r);a&&!a.has(i)?nV&&console.warn("Warning: fragment with name "+r+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):a||nK.set(r,a=new Set),a.add(i),t.has(i)||(t.add(i),n.push(e))}else n.push(e)}),(0,t0.pi)((0,t0.pi)({},e),{definitions:n})}function nQ(e){var t=new Set(e.definitions);t.forEach(function(e){e.loc&&delete e.loc,Object.keys(e).forEach(function(n){var r=e[n];r&&"object"==typeof r&&t.add(r)})});var n=e.loc;return n&&(delete n.startToken,delete n.endToken),e}function n1(e){var t=nZ(e);if(!nW.has(t)){var n=nH(e,{experimentalFragmentVariables:nq,allowLegacyFragmentVariables:nq});if(!n||"Document"!==n.kind)throw Error("Not a valid GraphQL document.");nW.set(t,nQ(nJ(n)))}return nW.get(t)}function n0(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];"string"==typeof e&&(e=[e]);var r=e[0];return t.forEach(function(t,n){t&&"Document"===t.kind?r+=t.loc.source.body:r+=t,r+=e[n+1]}),n1(r)}function n2(){nW.clear(),nK.clear()}function n3(){nV=!1}function n4(){nq=!0}function n6(){nq=!1}var n5,n8={gql:n0,resetCaches:n2,disableFragmentWarnings:n3,enableExperimentalFragmentVariables:n4,disableExperimentalFragmentVariables:n6};(n5=n0||(n0={})).gql=n8.gql,n5.resetCaches=n8.resetCaches,n5.disableFragmentWarnings=n8.disableFragmentWarnings,n5.enableExperimentalFragmentVariables=n8.enableExperimentalFragmentVariables,n5.disableExperimentalFragmentVariables=n8.disableExperimentalFragmentVariables,n0.default=n0;var n9=n(83952),n7=n(30320),re=!1,rt=f.useSyncExternalStore||function(e,t,n){var r=t();__DEV__&&!re&&r!==t()&&(re=!0,__DEV__&&n9.kG.error("The result of getSnapshot should be cached to avoid an infinite loop"));var i=l.useState({inst:{value:r,getSnapshot:t}}),a=i[0].inst,o=i[1];return n7.JC?l.useLayoutEffect(function(){Object.assign(a,{value:r,getSnapshot:t}),rn(a)&&o({inst:a})},[e,r,t]):Object.assign(a,{value:r,getSnapshot:t}),l.useEffect(function(){return rn(a)&&o({inst:a}),e(function(){rn(a)&&o({inst:a})})},[e]),r};function rn(e){var t=e.value,n=e.getSnapshot;try{return t!==n()}catch(r){return!0}}var rr,ri=n(82152),ra=n(14012),ro=n(85317),rs=n(30990),ru=n(1644);(rr=r||(r={}))[rr.Query=0]="Query",rr[rr.Mutation=1]="Mutation",rr[rr.Subscription=2]="Subscription";var rc=new Map;function rl(e){var t;switch(e){case r.Query:t="Query";break;case r.Mutation:t="Mutation";break;case r.Subscription:t="Subscription"}return t}function rf(e){var t,n,i,a=rc.get(e);if(a)return a;__DEV__?(0,n9.kG)(!!e&&!!e.kind,"Argument of ".concat(e," passed to parser was not a valid GraphQL ")+"DocumentNode. You may need to use 'graphql-tag' or another method to convert your operation into a document"):(0,n9.kG)(!!e&&!!e.kind,33);for(var o=[],s=[],u=[],c=[],l=0,f=e.definitions;l<f.length;l++){var d=f[l];if("FragmentDefinition"===d.kind){o.push(d);continue}if("OperationDefinition"===d.kind)switch(d.operation){case"query":s.push(d);break;case"mutation":u.push(d);break;case"subscription":c.push(d)}}__DEV__?(0,n9.kG)(!o.length||s.length||u.length||c.length,"Passing only a fragment to 'graphql' is not yet supported. You must include a query, subscription or mutation as well"):(0,n9.kG)(!o.length||s.length||u.length||c.length,34),__DEV__?(0,n9.kG)(s.length+u.length+c.length<=1,"react-apollo only supports a query, subscription, or a mutation per HOC. "+"".concat(e," had ").concat(s.length," queries, ").concat(c.length," ")+"subscriptions and ".concat(u.length," mutations. ")+"You can use 'compose' to join multiple operation types to a component"):(0,n9.kG)(s.length+u.length+c.length<=1,35),n=s.length?r.Query:r.Mutation,s.length||u.length||(n=r.Subscription);var h=s.length?s:u.length?u:c;__DEV__?(0,n9.kG)(1===h.length,"react-apollo only supports one definition per HOC. ".concat(e," had ")+"".concat(h.length," definitions. ")+"You can use 'compose' to join multiple operation types to a component"):(0,n9.kG)(1===h.length,36);var p=h[0];t=p.variableDefinitions||[];var b={name:i=p.name&&"Name"===p.name.kind?p.name.value:"data",type:n,variables:t};return rc.set(e,b),b}function rd(e,t){var n=rf(e),r=rl(t),i=rl(n.type);__DEV__?(0,n9.kG)(n.type===t,"Running a ".concat(r," requires a graphql ")+"".concat(r,", but a ").concat(i," was used instead.")):(0,n9.kG)(n.type===t,37)}function rh(e){var t=(0,l.useContext)((0,ro.K)()),n=e||t.client;return __DEV__?(0,n9.kG)(!!n,'Could not find "client" in the context or passed in as an option. Wrap the root component in an <ApolloProvider>, or pass an ApolloClient instance in via options.'):(0,n9.kG)(!!n,32),n}var rp=n(10542),rb=n(53712),rm=n(21436),rg=Object.prototype.hasOwnProperty;function rv(e,t){return void 0===t&&(t=Object.create(null)),ry(rh(t.client),e).useQuery(t)}function ry(e,t){var n=(0,l.useRef)();n.current&&e===n.current.client&&t===n.current.query||(n.current=new rw(e,t,n.current));var r=n.current,i=(0,l.useState)(0),a=(i[0],i[1]);return r.forceUpdate=function(){a(function(e){return e+1})},r}var rw=function(){function e(e,t,n){this.client=e,this.query=t,this.ssrDisabledResult=(0,rp.J)({loading:!0,data:void 0,error:void 0,networkStatus:ru.I.loading}),this.skipStandbyResult=(0,rp.J)({loading:!1,data:void 0,error:void 0,networkStatus:ru.I.ready}),this.toQueryResultCache=new(n7.mr?WeakMap:Map),rd(t,r.Query);var i=n&&n.result,a=i&&i.data;a&&(this.previousData=a)}return e.prototype.forceUpdate=function(){__DEV__&&n9.kG.warn("Calling default no-op implementation of InternalState#forceUpdate")},e.prototype.executeQuery=function(e){var t,n=this;e.query&&Object.assign(this,{query:e.query}),this.watchQueryOptions=this.createWatchQueryOptions(this.queryHookOptions=e);var r=this.observable.reobserveAsConcast(this.getObsQueryOptions());return this.previousData=(null===(t=this.result)||void 0===t?void 0:t.data)||this.previousData,this.result=void 0,this.forceUpdate(),new Promise(function(e){var t;r.subscribe({next:function(e){t=e},error:function(){e(n.toQueryResult(n.observable.getCurrentResult()))},complete:function(){e(n.toQueryResult(t))}})})},e.prototype.useQuery=function(e){var t=this;this.renderPromises=(0,l.useContext)((0,ro.K)()).renderPromises,this.useOptions(e);var n=this.useObservableQuery(),r=rt((0,l.useCallback)(function(){if(t.renderPromises)return function(){};var e=function(){var e=t.result,r=n.getCurrentResult();!(e&&e.loading===r.loading&&e.networkStatus===r.networkStatus&&(0,ri.D)(e.data,r.data))&&t.setResult(r)},r=function(a){var o=n.last;i.unsubscribe();try{n.resetLastResults(),i=n.subscribe(e,r)}finally{n.last=o}if(!rg.call(a,"graphQLErrors"))throw a;var s=t.result;(!s||s&&s.loading||!(0,ri.D)(a,s.error))&&t.setResult({data:s&&s.data,error:a,loading:!1,networkStatus:ru.I.error})},i=n.subscribe(e,r);return function(){return setTimeout(function(){return i.unsubscribe()})}},[n,this.renderPromises,this.client.disableNetworkFetches,]),function(){return t.getCurrentResult()},function(){return t.getCurrentResult()});return this.unsafeHandlePartialRefetch(r),this.toQueryResult(r)},e.prototype.useOptions=function(t){var n,r=this.createWatchQueryOptions(this.queryHookOptions=t),i=this.watchQueryOptions;!(0,ri.D)(r,i)&&(this.watchQueryOptions=r,i&&this.observable&&(this.observable.reobserve(this.getObsQueryOptions()),this.previousData=(null===(n=this.result)||void 0===n?void 0:n.data)||this.previousData,this.result=void 0)),this.onCompleted=t.onCompleted||e.prototype.onCompleted,this.onError=t.onError||e.prototype.onError,(this.renderPromises||this.client.disableNetworkFetches)&&!1===this.queryHookOptions.ssr&&!this.queryHookOptions.skip?this.result=this.ssrDisabledResult:this.queryHookOptions.skip||"standby"===this.watchQueryOptions.fetchPolicy?this.result=this.skipStandbyResult:(this.result===this.ssrDisabledResult||this.result===this.skipStandbyResult)&&(this.result=void 0)},e.prototype.getObsQueryOptions=function(){var e=[],t=this.client.defaultOptions.watchQuery;return t&&e.push(t),this.queryHookOptions.defaultOptions&&e.push(this.queryHookOptions.defaultOptions),e.push((0,rb.o)(this.observable&&this.observable.options,this.watchQueryOptions)),e.reduce(ra.J)},e.prototype.createWatchQueryOptions=function(e){void 0===e&&(e={});var t,n=e.skip,r=Object.assign((e.ssr,e.onCompleted,e.onError,e.defaultOptions,(0,t0._T)(e,["skip","ssr","onCompleted","onError","defaultOptions"])),{query:this.query});if(this.renderPromises&&("network-only"===r.fetchPolicy||"cache-and-network"===r.fetchPolicy)&&(r.fetchPolicy="cache-first"),r.variables||(r.variables={}),n){var i=r.fetchPolicy,a=void 0===i?this.getDefaultFetchPolicy():i,o=r.initialFetchPolicy;Object.assign(r,{initialFetchPolicy:void 0===o?a:o,fetchPolicy:"standby"})}else r.fetchPolicy||(r.fetchPolicy=(null===(t=this.observable)||void 0===t?void 0:t.options.initialFetchPolicy)||this.getDefaultFetchPolicy());return r},e.prototype.getDefaultFetchPolicy=function(){var e,t;return(null===(e=this.queryHookOptions.defaultOptions)||void 0===e?void 0:e.fetchPolicy)||(null===(t=this.client.defaultOptions.watchQuery)||void 0===t?void 0:t.fetchPolicy)||"cache-first"},e.prototype.onCompleted=function(e){},e.prototype.onError=function(e){},e.prototype.useObservableQuery=function(){var e=this.observable=this.renderPromises&&this.renderPromises.getSSRObservable(this.watchQueryOptions)||this.observable||this.client.watchQuery(this.getObsQueryOptions());this.obsQueryFields=(0,l.useMemo)(function(){return{refetch:e.refetch.bind(e),reobserve:e.reobserve.bind(e),fetchMore:e.fetchMore.bind(e),updateQuery:e.updateQuery.bind(e),startPolling:e.startPolling.bind(e),stopPolling:e.stopPolling.bind(e),subscribeToMore:e.subscribeToMore.bind(e)}},[e]);var t=!(!1===this.queryHookOptions.ssr||this.queryHookOptions.skip);return this.renderPromises&&t&&(this.renderPromises.registerSSRObservable(e),e.getCurrentResult().loading&&this.renderPromises.addObservableQueryPromise(e)),e},e.prototype.setResult=function(e){var t=this.result;t&&t.data&&(this.previousData=t.data),this.result=e,this.forceUpdate(),this.handleErrorOrCompleted(e)},e.prototype.handleErrorOrCompleted=function(e){var t=this;if(!e.loading){var n=this.toApolloError(e);Promise.resolve().then(function(){n?t.onError(n):e.data&&t.onCompleted(e.data)}).catch(function(e){__DEV__&&n9.kG.warn(e)})}},e.prototype.toApolloError=function(e){return(0,rm.O)(e.errors)?new rs.cA({graphQLErrors:e.errors}):e.error},e.prototype.getCurrentResult=function(){return this.result||this.handleErrorOrCompleted(this.result=this.observable.getCurrentResult()),this.result},e.prototype.toQueryResult=function(e){var t=this.toQueryResultCache.get(e);if(t)return t;var n=e.data,r=(e.partial,(0,t0._T)(e,["data","partial"]));return this.toQueryResultCache.set(e,t=(0,t0.pi)((0,t0.pi)((0,t0.pi)({data:n},r),this.obsQueryFields),{client:this.client,observable:this.observable,variables:this.observable.variables,called:!this.queryHookOptions.skip,previousData:this.previousData})),!t.error&&(0,rm.O)(e.errors)&&(t.error=new rs.cA({graphQLErrors:e.errors})),t},e.prototype.unsafeHandlePartialRefetch=function(e){e.partial&&this.queryHookOptions.partialRefetch&&!e.loading&&(!e.data||0===Object.keys(e.data).length)&&"cache-only"!==this.observable.options.fetchPolicy&&(Object.assign(e,{loading:!0,networkStatus:ru.I.refetch}),this.observable.refetch())},e}();function r_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function rE(e){if(Array.isArray(e))return e}function rS(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function rk(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function rx(e,t){return rE(e)||rS(e,t)||rM(e,t)||rk()}function rT(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function rM(e,t){if(e){if("string"==typeof e)return r_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r_(e,t)}}function rO(){var e=rT(["\n query FetchFeatures {\n features {\n ... on Features {\n __typename\n csa\n feedsManager\n }\n }\n }\n"]);return rO=function(){return e},e}(am=i||(i={})).CSA="csa",am.FeedsManager="feeds_manager";var rA=n0(rO());function rL(e){var t=rv(rA,{fetchPolicy:"network-only"}).data,n=rx(l.useState(!1),2),r=n[0],a=n[1];return l.useEffect(function(){if((null==t?void 0:t.features.__typename)=="Features")switch(e){case i.CSA:a(null==t?void 0:t.features.csa);break;case i.FeedsManager:a(null==t?void 0:t.features.feedsManager);break;default:a(!1)}},[t,e]),r}function rC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function rI(e){if(Array.isArray(e))return e}function rD(e){if(Array.isArray(e))return rC(e)}function rN(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function rP(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function rR(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function rj(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function rF(e,t){return rI(e)||rP(e,t)||rB(e,t)||rR()}function rY(e){return rD(e)||rN(e)||rB(e)||rj()}function rB(e,t){if(e){if("string"==typeof e)return rC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rC(e,t)}}var rU=[["/jobs","Jobs"],["/runs","Runs"],["/chains","Chains"],["/nodes","Nodes"],["/bridges","Bridges"],["/transactions","Transactions"],],rH=rY(rU).concat([["/keys","Keys"],["/config","Configuration"],]),r$=240,rz=function(e){var t=e.palette,n=e.spacing;return(0,b.createStyles)({menuitem:{padding:3*n.unit,display:"block"},drawerPaper:{backgroundColor:t.common.white,paddingTop:7*n.unit,width:r$},drawerList:{padding:0}})},rG=(0,b.withStyles)(rz)(function(e){var t=e.drawerOpen,n=e.toggleDrawer,r=e.authenticated,i=e.classes,a=e.submitSignOut,o=e.isFeedsManagerFeatureEnabled;return l.createElement(g.Z,{anchor:"right",open:t,classes:{paper:i.drawerPaper},onClose:n},l.createElement("div",{tabIndex:0,role:"button",onClick:n},l.createElement(w.default,{className:i.drawerList},rH.map(function(e){var t=rF(e,2),n=t[0],r=t[1];return l.createElement(_.default,{key:n,button:!0,component:function(){return l.createElement(tz,{href:n},l.createElement(E.Z,{primary:r}))},className:i.menuitem})}),o&&l.createElement(_.default,{button:!0,component:function(){return l.createElement(tz,{href:"/job_distributors"},l.createElement(E.Z,{primary:"Job Distributors"}))},className:i.menuitem}),r&&l.createElement(_.default,{button:!0,onClick:a,className:i.menuitem},l.createElement(E.Z,{primary:"Sign Out"})))))}),rW=function(e){var t=e.palette,n=e.spacing;return(0,b.createStyles)({horizontalNav:{paddingTop:0,paddingBottom:0},horizontalNavItem:{display:"inline"},horizontalNavLink:{color:t.secondary.main,paddingTop:3*n.unit,paddingBottom:3*n.unit,textDecoration:"none",display:"inline-block",borderBottom:"solid 1px",borderBottomColor:t.common.white,"&:hover":{borderBottomColor:t.primary.main}},activeNavLink:{color:t.primary.main,borderBottomColor:t.primary.main}})},rK=(0,b.withStyles)(rW)(function(e){var t=e.authenticated,n=e.classes,r=e.isFeedsManagerFeatureEnabled,i=(0,h.TH)().pathname;return l.createElement(x.default,{variant:"body1",component:"div"},l.createElement(w.default,{className:n.horizontalNav},rU.map(function(e){var t=rF(e,2),r=t[0],a=t[1];return l.createElement(_.default,{key:r,className:n.horizontalNavItem},l.createElement(tz,{key:r,href:r,className:O()(n.horizontalNavLink,i.startsWith(r)&&n.activeNavLink)},a))}),r&&l.createElement(_.default,{className:n.horizontalNavItem},l.createElement(tz,{href:"/job_distributors",className:O()(n.horizontalNavLink,i.includes("/job_distributors")&&n.activeNavLink)},"Job Distributors")),t&&l.createElement(l.Fragment,null,l.createElement(_.default,{className:n.horizontalNavItem},l.createElement(tH,null),l.createElement(tL,null)))))}),rV=function(e){var t=e.palette,n=e.spacing,r=e.zIndex;return(0,b.createStyles)({appBar:{backgroundColor:t.common.white,zIndex:r.modal-1},toolbar:{paddingLeft:5*n.unit,paddingRight:5*n.unit}})},rq=(0,b.withStyles)(rV)(function(e){var t=e.authenticated,n=e.classes,r=e.fetchCount,a=e.drawerContainer,o=e.onResize,s=e.submitSignOut,u=rF(l.useState(!1),2),c=u[0],f=u[1],h=rL(i.FeedsManager),p=function(){f(!c)};return l.createElement(m.Z,{className:n.appBar,color:"default",position:"absolute"},l.createElement(tg,{refreshMode:"debounce",refreshRate:200,onResize:o,handleHeight:!0},l.createElement(tV,{fetchCount:r}),l.createElement(k.default,{className:n.toolbar},l.createElement(d.Z,{container:!0,alignItems:"center"},l.createElement(d.Z,{item:!0,xs:11,sm:6,md:4},l.createElement(tz,{href:"/"},l.createElement(tQ,{width:200}))),l.createElement(d.Z,{item:!0,xs:1,sm:6,md:8},l.createElement(d.Z,{container:!0,justify:"flex-end"},l.createElement(d.Z,{item:!0},l.createElement(v.Z,{mdUp:!0},l.createElement(y.default,{"aria-label":"open drawer",onClick:p},l.createElement(T.Z,null))),l.createElement(v.Z,{smDown:!0},l.createElement(rK,{authenticated:t,isFeedsManagerFeatureEnabled:h})))))))),l.createElement(S.default,{container:a},l.createElement(rG,{isFeedsManagerFeatureEnabled:h,toggleDrawer:p,drawerOpen:c,authenticated:t,submitSignOut:s})))}),rZ=function(e){return{authenticated:e.authentication.allowed,fetchCount:t1(e),url:e.notifications.currentUrl}},rX=function(e){return(0,tv.DE)({submitSignOut:ty.EO},e)},rJ=(0,A.$j)(rZ,rX)(rq);let rQ=(0,b.withStyles)(rV)(rJ);var r1=n(3950),r0=n(16353),r2=n(19084);function r3(){return(r3=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var r4=function(e){var t=(0,A.I0)(),n=(0,h.TH)().pathname;return(l.useEffect(function(){t({type:r2.di.MATCH_ROUTE,pathname:n})},[t,n]),(0,r0.rH)(function(e){return e.authentication.allowed}))?l.createElement(h.AW,r3({},e)):l.createElement(h.l_,{to:"/signin"})};let r6=r4;var r5=n(82204),r8=n(15417),r9=n(90070),r7=n(72883),ie=n(51531),it=n(18217),ir=n(17175),ii=n(68821),ia=n(21727),io=function(e){return(0,b.createStyles)({paper:{backgroundColor:e.palette.primary.light,padding:2*e.spacing.unit,display:"flex"},icon:{marginRight:e.spacing.unit}})},is=(0,b.withStyles)(io)(function(e){var t=e.classes;return l.createElement(ii.default,{className:t.paper},l.createElement(ia.Z,{className:t.icon}),l.createElement(x.default,null,"Multi-chain functionality is in Beta"))}),iu=function(e){return(0,b.createStyles)({cell:{paddingTop:2*e.spacing.unit,paddingBottom:2*e.spacing.unit},row:{transform:"scale(1)"},link:{"&::before":{content:"''",position:"absolute",top:0,left:0,width:"100%",height:"100%"}}})},ic=n(19350),il=function(){return(0,b.createStyles)({link:{color:ic.BA[900],textDecoration:"none"},linkContent:{display:"inline-block"}})},id=function(e){var t=e.children,n=e.classes,r=e.className,i=e.href,a=e.variant,o=e.color,s=a||"body1",u=o||"inherit";return l.createElement(tz,{href:i,className:O()(n.link,r)},l.createElement(x.default,{variant:s,color:u,className:n.linkContent},t))};let ih=(0,b.withStyles)(il)(id);var ip=(0,b.withStyles)(iu)(function(e){var t=e.chain,n=e.classes;return l.createElement(ir.Z,{className:n.row,hover:!0},l.createElement(r7.default,{className:n.cell,component:"th",scope:"row"},l.createElement(ih,{className:n.link,href:"/chains/".concat(t.id)},t.id)),l.createElement(r7.default,null,t.enabled.toString()))}),ib=function(e){return{content:{padding:5*e.spacing.unit}}},im=function(e){var t=e.children,n=e.classes;return l.createElement("div",{className:n.content},t)};let ig=(0,b.withStyles)(ib)(im);var iv=function(){return(0,b.createStyles)({root:{fontSize:30}})},iy=(0,b.withStyles)(iv)(function(e){var t=e.children,n=e.classes;return l.createElement(x.default,{variant:"h1",className:n.root},t)}),iw=n(60520),i_=function(e){return(0,b.createStyles)({textField:{marginBottom:2*e.spacing.unit},input:{padding:14,backgroundColor:"white",borderRadius:4}})},iE=(0,b.withStyles)(i_)(function(e){var t=e.classes,n=e.onChange,r=e.placeholder,i=e.value;return l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(iw.Z,{className:t.textField,inputProps:{className:t.input},InputLabelProps:{shrink:!0},placeholder:r||"Search",value:i,name:"search",onChange:function(e){return n(e.target.value)},variant:"outlined",fullWidth:!0})))});function iS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ik(e){if(Array.isArray(e))return e}function ix(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function iT(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function iM(e,t){return ik(e)||ix(e,t)||iO(e,t)||iT()}function iO(e,t){if(e){if("string"==typeof e)return iS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iS(e,t)}}var iA=function(e){var t=e.toLowerCase();return function(e){return e.toLowerCase().includes(t)}},iL=function(e){return function(t){return""===e||iC(t,e)}};function iC(e,t){var n;return[e.id].some(iA(t))}var iI=function(e){var t=e.chains,n=e.page,r=e.pageSize,i=e.total,a=(0,h.k6)(),o=iM(l.useState(""),2),s=o[0],u=o[1],c=(0,l.useMemo)(function(){return t.filter(iL(s.trim()))},[s,t]);return l.createElement(ig,null,l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12},l.createElement(is,null)),l.createElement(d.Z,{item:!0,xs:12},l.createElement(iy,null,"Chains")),l.createElement(d.Z,{item:!0,xs:12},l.createElement(iE,{value:s,onChange:u,placeholder:"Search chains"}),l.createElement(r5.Z,null,l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,"Chain ID"),l.createElement(r7.default,null,"Enabled"))),l.createElement(r9.Z,null,0===c.length&&l.createElement(ir.Z,null,l.createElement(r7.default,{component:"th",scope:"row",colSpan:3},"No chains found")),c.map(function(e){return l.createElement(ip,{key:e.id,chain:e})}))),l.createElement(it.Z,{component:"div",count:i,rowsPerPage:r,rowsPerPageOptions:[r],page:n-1,onChangePage:function(e,t){a.push("/chains?page=".concat(t+1,"&per=").concat(r))},onChangeRowsPerPage:function(){},backIconButtonProps:{"aria-label":"prev-page"},nextIconButtonProps:{"aria-label":"next-page"}})))))},iD=function(e){var t=e.error,n=(0,h.k6)(),r=(0,A.I0)();return t?(t.graphQLErrors.forEach(function(e){var t;(null===(t=e.extensions)||void 0===t?void 0:t.code)=="UNAUTHORIZED"&&(r((0,ty.Jc)()),n.push("/signin"))}),l.createElement("div",null,"Error: ",t.message)):null},iN=n(30866),iP=function(e){return{root:{margin:2*e.spacing.unit},gridItem:{display:"flex",justifyContent:"center"}}},iR=(0,b.withStyles)(iP)(function(e){var t=e.classes;return l.createElement(d.Z,{container:!0,className:t.root},l.createElement(d.Z,{item:!0,xs:12,className:t.gridItem},l.createElement(iN.Z,{"data-testid":"loading-spinner"})))}),ij=function(){var e=(0,h.TH)().search;return l.useMemo(function(){return new URLSearchParams(e)},[e])};function iF(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function iY(){var e=iF(["\n fragment ChainsPayload_ResultsFields on Chain {\n id\n enabled\n network\n }\n"]);return iY=function(){return e},e}function iB(){var e=iF(["\n ","\n query FetchChains($offset: Int, $limit: Int) {\n chains(offset: $offset, limit: $limit) {\n results {\n ...ChainsPayload_ResultsFields\n }\n metadata {\n total\n }\n }\n }\n"]);return iB=function(){return e},e}var iU=n0(iY()),iH=n0(iB(),iU),i$=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return rv(iH,e)},iz=function(){var e=ij(),t=parseInt(e.get("page")||"1",10),n=parseInt(e.get("per")||"50",10),r=i$({variables:{offset:(t-1)*n,limit:n},fetchPolicy:"network-only"}),i=r.data,a=r.loading,o=r.error;return a?l.createElement(iR,null):o?l.createElement(iD,{error:o}):i?l.createElement(iI,{chains:i.chains.results,page:t,pageSize:n,total:i.chains.metadata.total}):null},iG=n(67932),iW=n(8126),iK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function iV(e){if(iq())return Intl.DateTimeFormat.supportedLocalesOf(e)[0]}function iq(){return("undefined"==typeof Intl?"undefined":iK(Intl))==="object"&&"function"==typeof Intl.DateTimeFormat}var iZ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},iX=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function iJ(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var iQ=function(){function e(){iJ(this,e),this.cache={}}return iX(e,[{key:"get",value:function(){for(var e=this.cache,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var i=n,a=Array.isArray(i),o=0,i=a?i:i[Symbol.iterator]();;){if(a){if(o>=i.length)break;s=i[o++]}else{if((o=i.next()).done)break;s=o.value}var s,u=s;if((void 0===e?"undefined":iZ(e))!=="object")return;e=e[u]}return e}},{key:"put",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=t.pop(),i=t.pop(),a=this.cache,o=t,s=Array.isArray(o),u=0,o=s?o:o[Symbol.iterator]();;){if(s){if(u>=o.length)break;c=o[u++]}else{if((u=o.next()).done)break;c=u.value}var c,l=c;"object"!==iZ(a[l])&&(a[l]={}),a=a[l]}return a[i]=r}}]),e}();let i1=iQ;var i0=new i1;function i2(e,t){if(!iq())return function(e){return e.toString()};var n=i4(e),r=JSON.stringify(t),i=i0.get(String(n),r)||i0.put(String(n),r,new Intl.DateTimeFormat(n,t));return function(e){return i.format(e)}}var i3={};function i4(e){var t=e.toString();return i3[t]?i3[t]:i3[t]=iV(e)}var i6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function i5(e){return i8(e)?e:new Date(e)}function i8(e){return e instanceof Date||i9(e)}function i9(e){return(void 0===e?"undefined":i6(e))==="object"&&"function"==typeof e.getTime}var i7=n(54087),ae=n.n(i7);function at(e,t){if(0===e.length)return 0;for(var n=0,r=e.length-1,i=void 0;n<=r;){var a=t(e[i=Math.floor((r+n)/2)]);if(0===a)return i;if(a<0){if((n=i+1)>r)return n}else if((r=i-1)<n)return n}}var an=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(u){i=!0,a=u}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw TypeError("Invalid attempt to destructure non-iterable instance")}}();let ar={instances:[],add:function(e){var t=this,n=0===this.instances.length;return ao(this.instances,e),n&&this.start(),{stop:function(){as(t.instances,e),0===t.instances.length&&t.stop()},forceUpdate:function(){aa(e,t.instances)}}},tick:function(){for(var e=Date.now();;){var t=this.instances[0];if(e>=t.nextUpdateTime)aa(t,this.instances);else break}},scheduleNextTick:function(){var e=this;this.scheduledTick=ae()(function(){e.tick(),e.scheduleNextTick()})},start:function(){this.scheduleNextTick()},stop:function(){ae().cancel(this.scheduledTick)}};function ai(e){var t=an(e.getNextValue(),2),n=t[0],r=t[1];e.setValue(n),e.nextUpdateTime=r}function aa(e,t){ai(e),as(t,e),ao(t,e)}function ao(e,t){var n=au(e,t);e.splice(n,0,t)}function as(e,t){var n=e.indexOf(t);e.splice(n,1)}function au(e,t){var n=t.nextUpdateTime;return at(e,function(e){return e.nextUpdateTime===n?0:e.nextUpdateTime>n?1:-1})}var ac=(0,ec.oneOfType)([(0,ec.shape)({minTime:ec.number,formatAs:ec.string.isRequired}),(0,ec.shape)({test:ec.func,formatAs:ec.string.isRequired}),(0,ec.shape)({minTime:ec.number,format:ec.func.isRequired}),(0,ec.shape)({test:ec.func,format:ec.func.isRequired})]),al=(0,ec.oneOfType)([ec.string,(0,ec.shape)({steps:(0,ec.arrayOf)(ac).isRequired,labels:(0,ec.oneOfType)([ec.string,(0,ec.arrayOf)(ec.string)]).isRequired,round:ec.string})]),af=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ad=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(u){i=!0,a=u}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw TypeError("Invalid attempt to destructure non-iterable instance")}}();function ah(e,t){var n={};for(var r in e)!(t.indexOf(r)>=0)&&Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function ap(e){var t=e.date,n=e.future,r=e.timeStyle,i=e.round,a=e.minTimeLeft,o=e.tooltip,s=e.component,u=e.container,c=e.wrapperComponent,f=e.wrapperProps,d=e.locale,h=e.locales,p=e.formatVerboseDate,b=e.verboseDateFormat,m=e.updateInterval,g=e.tick,v=ah(e,["date","future","timeStyle","round","minTimeLeft","tooltip","component","container","wrapperComponent","wrapperProps","locale","locales","formatVerboseDate","verboseDateFormat","updateInterval","tick"]),y=(0,l.useMemo)(function(){return d&&(h=[d]),h.concat(iW.Z.getDefaultLocale())},[d,h]),w=(0,l.useMemo)(function(){return new iW.Z(y)},[y]);t=(0,l.useMemo)(function(){return i5(t)},[t]);var _=(0,l.useCallback)(function(){var e=Date.now(),o=void 0;if(n&&e>=t.getTime()&&(e=t.getTime(),o=!0),void 0!==a){var s=t.getTime()-1e3*a;e>s&&(e=s,o=!0)}var u=w.format(t,r,{getTimeToNextUpdate:!0,now:e,future:n,round:i}),c=ad(u,2),l=c[0],f=c[1];return f=o?ag:m||f||6e4,[l,e+f]},[t,n,r,m,i,a,w]),E=(0,l.useRef)();E.current=_;var S=(0,l.useMemo)(_,[]),k=ad(S,2),x=k[0],T=k[1],M=(0,l.useState)(x),O=ad(M,2),A=O[0],L=O[1],C=ad((0,l.useState)(),2),I=C[0],D=C[1],N=(0,l.useRef)();(0,l.useEffect)(function(){if(g)return N.current=ar.add({getNextValue:function(){return E.current()},setValue:L,nextUpdateTime:T}),function(){return N.current.stop()}},[g]),(0,l.useEffect)(function(){if(N.current)N.current.forceUpdate();else{var e=_(),t=ad(e,1)[0];L(t)}},[_]),(0,l.useEffect)(function(){D(!0)},[]);var P=(0,l.useMemo)(function(){if("undefined"!=typeof window)return i2(y,b)},[y,b]),R=(0,l.useMemo)(function(){if("undefined"!=typeof window)return p?p(t):P(t)},[t,p,P]),j=l.createElement(s,af({date:t,verboseDate:I?R:void 0,tooltip:o},v),A),F=c||u;return F?l.createElement(F,af({},f,{verboseDate:I?R:void 0}),j):j}ap.propTypes={date:el().oneOfType([el().instanceOf(Date),el().number]).isRequired,locale:el().string,locales:el().arrayOf(el().string),future:el().bool,timeStyle:al,round:el().string,minTimeLeft:el().number,component:el().elementType.isRequired,tooltip:el().bool.isRequired,formatVerboseDate:el().func,verboseDateFormat:el().object,updateInterval:el().oneOfType([el().number,el().arrayOf(el().shape({threshold:el().number,interval:el().number.isRequired}))]),tick:el().bool,wrapperComponent:el().func,wrapperProps:el().object},ap.defaultProps={locales:[],component:av,tooltip:!0,verboseDateFormat:{weekday:"long",day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},tick:!0},ap=l.memo(ap);let ab=ap;var am,ag=31536e9;function av(e){var t=e.date,n=e.verboseDate,r=e.tooltip,i=e.children,a=ah(e,["date","verboseDate","tooltip","children"]),o=(0,l.useMemo)(function(){return t.toISOString()},[t]);return l.createElement("time",af({},a,{dateTime:o,title:r?n:void 0}),i)}av.propTypes={date:el().instanceOf(Date).isRequired,verboseDate:el().string,tooltip:el().bool.isRequired,children:el().string.isRequired};var ay=n(30381),aw=n.n(ay),a_=n(31657);function aE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){aE(e,t,n[t])})}return e}var ak=function(e){var t=e.palette,n=e.shadows,r=e.typography;return(0,b.createStyles)({lightTooltip:aS({background:t.primary.contrastText,color:t.text.primary,boxShadow:n[24]},r.h6)})},ax=function(e){var t=e.title,n=e.children,r=e.classes;return l.createElement(a_.Z,{title:t,classes:{tooltip:r.lightTooltip}},n)},aT=(0,b.withStyles)(ak)(ax),aM=function(e){return e&&aw()(e).format()},aO=function(e){var t=e.children,n=e.tooltip,r=void 0!==n&&n,i=Date.parse(t),a=l.createElement(ab,{tooltip:!1,date:i});return r?l.createElement(aT,{title:aM(t)},l.createElement("span",null,a)):a},aA=n(1398);function aL(){return(aL=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var aC=function(e){return l.createElement("svg",aL({style:{cursor:"pointer"},width:"46",height:"46",viewBox:"0 0 46 46",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l.createElement("circle",{r:"22",transform:"matrix(1 0 0 -1 23 23)",stroke:"#364864"}),l.createElement("rect",{width:"1.4605",height:"18.6214",transform:"matrix(0.707107 0.707107 0.707107 -0.707107 16.1333 28.834)",fill:"#686F84"}),l.createElement("rect",{x:"30.3333",y:"28.834",width:"1.4605",height:"18.6214",transform:"rotate(135 30.3333 28.834)",fill:"#686F84"}))};let aI=aC;var aD=n(8330);function aN(e){return e.msg}function aP(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function aR(e){if(Array.isArray(e))return e}function aj(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function aF(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function aY(e,t){return aR(e)||aj(e,t)||aB(e,t)||aF()}function aB(e,t){if(e){if("string"==typeof e)return aP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return aP(e,t)}}var aU=function(e){return(0,b.createStyles)({container:{backgroundColor:e.palette.common.white,padding:5*e.spacing.unit,paddingBottom:0},mainRow:{marginBottom:2*e.spacing.unit},actions:{textAlign:"right"},regionalNavButton:{marginLeft:e.spacing.unit,marginRight:e.spacing.unit},horizontalNav:{paddingBottom:0},horizontalNavItem:{display:"inline",paddingLeft:0,paddingRight:0},horizontalNavLink:{padding:"".concat(4*e.spacing.unit,"px ").concat(4*e.spacing.unit,"px"),textDecoration:"none",display:"inline-block",borderBottom:"solid 1px",borderBottomColor:e.palette.common.white,"&:hover":{borderBottomColor:e.palette.primary.main}},activeNavLink:{color:e.palette.primary.main,borderBottomColor:e.palette.primary.main},chainId:{overflow:"hidden",textOverflow:"ellipsis"},badgePadding:{paddingLeft:2*e.spacing.unit,paddingRight:2*e.spacing.unit,marginLeft:-2*e.spacing.unit,marginRight:-2*e.spacing.unit,lineHeight:"1rem"},dialogPaper:{minHeight:"260px",maxHeight:"260px",minWidth:"670px",maxWidth:"670px",overflow:"hidden",borderRadius:3*e.spacing.unit},warningText:{fontWeight:500,marginLeft:3*e.spacing.unit,marginTop:3*e.spacing.unit,marginBottom:e.spacing.unit},closeButton:{marginRight:3*e.spacing.unit,marginTop:3*e.spacing.unit},infoText:{fontSize:2*e.spacing.unit,fontWeight:450,marginLeft:6*e.spacing.unit},modalTextarea:{marginLeft:2*e.spacing.unit},modalContent:{width:"inherit"},deleteButton:{marginTop:4*e.spacing.unit},runJobButton:{marginBottom:3*e.spacing.unit},runJobModalContent:{overflow:"hidden"}})},aH=function(e){var t=e.id;return l.createElement(l.Fragment,null,"Successfully deleted chain ",t)},a$=function(e){var t=e.classes,n=e.chainId,r=e.chain,i=e.deleteChain,a=aY((0,l.useState)(!1),2),o=a[0],s=a[1],u=aY((0,l.useState)(!1),2),c=u[0],f=u[1],p=(0,h.TH)(),b=p.pathname.endsWith("/config-overrides"),m=p.pathname.endsWith("/edit"),g=!b&&!m,v=function(e){i(e,function(){return aH({id:e})},aN),f(!0)};return l.createElement(l.Fragment,null,l.createElement(aD.Z,{open:o,classes:{paper:t.dialogPaper},onClose:function(){return s(!1)}},l.createElement(d.Z,{container:!0,spacing:0},l.createElement(d.Z,{item:!0,className:t.modalContent},l.createElement(d.Z,{container:!0,alignItems:"baseline",justify:"space-between"},l.createElement(d.Z,{item:!0},l.createElement(x.default,{variant:"h5",color:"secondary",className:t.warningText},"Warning: This Action Cannot Be Undone")),l.createElement(d.Z,{item:!0},l.createElement(aI,{className:t.closeButton,onClick:function(){return s(!1)}}))),l.createElement(d.Z,{container:!0,direction:"column"},l.createElement(d.Z,{item:!0},l.createElement(d.Z,{item:!0},l.createElement(x.default,{className:t.infoText,variant:"h5",color:"secondary"},"- Disabling the chain may be a safer option"),l.createElement(x.default,{className:t.infoText,variant:"h5",color:"secondary"},"- All associated RPC Nodes will be permanently deleted"),l.createElement(x.default,{className:t.infoText,variant:"h5",color:"secondary"},"- Access to this page will be lost"))),l.createElement(d.Z,{container:!0,spacing:0,alignItems:"center",justify:"center"},l.createElement(d.Z,{item:!0,className:t.deleteButton},l.createElement(aA.Z,{variant:"danger",onClick:function(){return v(n)}},"Delete ",n,c&&l.createElement(h.l_,{to:"/"})))))))),l.createElement(r5.Z,{className:t.container},l.createElement(d.Z,{container:!0,spacing:0},l.createElement(d.Z,{item:!0,xs:12},l.createElement(d.Z,{container:!0,spacing:0,alignItems:"center",className:t.mainRow},l.createElement(d.Z,{item:!0,xs:12},r&&l.createElement(x.default,{variant:"h5",color:"secondary",className:t.chainId},"Chain ",r.id||n)))),l.createElement(d.Z,{item:!0,xs:12},(null==r?void 0:r.attributes.createdAt)&&l.createElement(x.default,{variant:"subtitle2",color:"textSecondary"},"Created"," ",l.createElement(aO,{tooltip:!1},r.attributes.createdAt)," ","(",aM(r.attributes.createdAt),")")),l.createElement(d.Z,{item:!0,xs:12},l.createElement(w.default,{className:t.horizontalNav},l.createElement(_.default,{className:t.horizontalNavItem},l.createElement(ih,{href:"/chains/".concat(n),className:O()(t.horizontalNavLink,g&&t.activeNavLink)},"Nodes")))))))},az=(0,A.$j)(null,{deleteChain:ty.KL})(a$);let aG=(0,b.withStyles)(aU)(az);var aW=n(30060),aK=n(7554),aV=function(e){var t=e.children,n=e.divider,r=void 0!==n&&n;return l.createElement(l.Fragment,null,l.createElement(aW.Z,null,l.createElement(x.default,{variant:"h5",color:"secondary"},t)),r&&l.createElement(aK.Z,null))},aq=(0,b.withStyles)(iu)(function(e){var t=e.node,n=e.classes;return l.createElement(ir.Z,{className:n.row,hover:!0},l.createElement(r7.default,{className:n.cell,component:"th",scope:"row"},l.createElement(ih,{className:n.link,href:"/nodes/".concat(t.attributes.name)},t.attributes.name)),l.createElement(r7.default,null,t.attributes.chainID),l.createElement(r7.default,null,t.attributes.state))}),aZ=function(e){var t=e.nodes,n=e.nodeFilter,r=t.filter(n);return l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,l.createElement(x.default,{variant:"body1",color:"textSecondary"},"Name")),l.createElement(r7.default,null,l.createElement(x.default,{variant:"body1",color:"textSecondary"},"EVM Chain ID")),l.createElement(r7.default,null,l.createElement(x.default,{variant:"body1",color:"textSecondary"},"State")))),l.createElement(r9.Z,null,!r.length&&l.createElement(ir.Z,null,l.createElement(r7.default,{component:"th",scope:"row",colSpan:3},"No nodes found.")),r.map(function(e){return l.createElement(aq,{key:e.id,node:e})})))};let aX=aZ;var aJ=function(e){var t=e.nodes,n=e.chain,r=function(e){return e.attributes.chainID===n.id};return l.createElement(ig,null,n&&l.createElement(d.Z,{container:!0,spacing:40},l.createElement(d.Z,{item:!0,xs:12},l.createElement(r5.Z,null,l.createElement(aV,{divider:!0},"Nodes"),l.createElement(aX,{nodes:t,nodeFilter:r})))))};function aQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function a1(e){if(Array.isArray(e))return e}function a0(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function a2(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){a0(a,r,i,o,s,"next",e)}function s(e){a0(a,r,i,o,s,"throw",e)}o(void 0)})}}function a3(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function a4(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a6(e,t){return a1(e)||a3(e,t)||a5(e,t)||a4()}function a5(e,t){if(e){if("string"==typeof e)return aQ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return aQ(e,t)}}var a8=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},a9=function(){var e,t=(0,h.UO)().chainId,n=(0,h.$B)().path,r=a6(l.useState(),2),i=r[0],a=r[1],o=a6(l.useState([]),2),s=o[0],u=o[1],c=(e=a2(function(){var e;return a8(this,function(t){switch(t.label){case 0:return[4,iG.v2.nodes.getNodes()];case 1:return u((e=t.sent()).data),[2]}})}),function(){return e.apply(this,arguments)});return l.useEffect(function(){c()},[]),l.useEffect(function(){Promise.all([iG.v2.chains.getChains()]).then(function(e){return a6(e,1)[0].data.find(function(e){return e.id===t})}).then(a)},[t]),l.createElement(l.Fragment,null,l.createElement(aG,{chainId:t,chain:i}),l.createElement(h.rs,null,l.createElement(h.AW,{path:"".concat(n)},i&&l.createElement(aJ,{nodes:s,chain:i}))))};let a7=a9;function oe(){return(oe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ot=function(e){return l.createElement("svg",oe({id:"Layer_1","data-name":"Layer 1",width:"813px",height:"526.5px",viewBox:"0 0 780.98 512.82"},e),l.createElement("defs",null),l.createElement("path",{d:"M222.2 330.36l-76-43.9v-87.8l76-43.9 76 43.9v87.8zm-72-46.21l72 41.59 72-41.59V201l-72-41.6-72 41.6v83.18zm213.31-76.91l-40.07-23.14v-46.26l40.07-23.13 40.07 23.13v46.26zm-36.07-25.44l36.07 20.83 36.07-20.83v-41.66l-36.07-20.83-36.07 20.83v41.66zM222.2 125.66l-40.07-23.13V56.26l40.07-23.14 40.07 23.13v46.27zm-36.07-25.44L222.2 121l36.07-20.83V58.56L222.2 37.74l-36.07 20.82v41.65zM80.89 207.24L40.82 184.1v-46.26l40.07-23.14L121 137.84v46.26zM44.82 181.8l36.07 20.83L117 181.8v-41.66l-36.11-20.82-36.07 20.82v41.66zm36.07 188.61l-40.07-23.14V301l40.07-23.14L121 301v46.27zM44.82 345l36.07 20.83L117 345v-41.69l-36.11-20.82-36.07 20.82V345zM222.2 453.14L182.13 430v-46.26l40.07-23.14 40.07 23.14V430zm-36.07-25.44l36.07 20.82 36.07-20.82V386l-36.07-20.78L186.13 386v41.7z",fill:"#3c40c6",transform:"translate(-40.82 -33.12)"}),l.createElement("path",{d:"M216.86 182.36a8.31 8.31 0 0 1-4.75 1.26 9.88 9.88 0 0 1-5.08-1.53q-2.41-1.49-2.29-3.42t2.64-3.49l2.62-1.61a11.12 11.12 0 0 1 5.63-1.63 9.71 9.71 0 0 1 5.5 1.39q2.44 1.51 2.56 3.17t-2.08 3h-.08l-2.22-1.37a2.41 2.41 0 0 0 1.41-1.8 2.37 2.37 0 0 0-1.44-1.85 5.29 5.29 0 0 0-3.35-.7 8.23 8.23 0 0 0-3.62 1.21l-2.64 1.62a3.87 3.87 0 0 0-2 2.26 1.94 1.94 0 0 0 1.17 2.1 5.39 5.39 0 0 0 2.93.87 5.55 5.55 0 0 0 2.9-.87zm8.3 10.79l-2.29-1.42 5.87-3.62-6.16-3.81-5.87 3.62-2.29-1.42 13.77-8.5 2.29 1.42-6.05 3.73 6.16 3.81 6.05-3.73 2.29 1.42zm13.76 4.55l-5.38-3.33-4.31 1.3-2.32-1.44 18.82-5.36 2.17 1.35-8.77 11.58-2.33-1.44zm-2.8-4.11l4.07 2.52 3.89-4.86H244zm7.07 10.72l-2.29-1.42 13.76-8.49 2.29 1.42zm13.6 8.42l-2.29-1.42 3.95-10h-.08l-10 6.18-2.29-1.42 13.76-8.49 2.29 1.42-3.94 10h.08l10-6.18 2.29 1.42zm-73.62-19.15l6.32 3.91-1.84 1.14-8.65-5.34 13.76-8.49 2.29 1.42zm8.66 7.64l-2.29-1.42 13.76-8.49 2.29 1.42zm13.6 8.42l-2.29-1.42 4-10h-.08l-10 6.18-2.37-1.4 13.76-8.49 2.29 1.42-3.94 10h.08l10-6.18 2.29 1.42zm12.63.46l-1.59-1-6 3.67-2.29-1.42 13.82-8.47 2.29 1.42-5.83 3.6 1.31.81 10.15-.92 2.72 1.68-11.57 1-1.8 7.77-2.8-1.74zM485 545.94L353.63 470.1V318.44L485 242.6l131.34 75.83V470.1zm-103.35-92L485 513.6l103.34-59.67V334.6L485 274.94 381.63 334.6v119.34z",fill:"#3c40c6",transform:"translate(-40.82 -33.12)"}),l.createElement("path",{d:"M465.82 326.56a7.46 7.46 0 0 1-2 5.36 7 7 0 0 1-5.27 2.13 6.72 6.72 0 0 1-5.16-2.13 7.56 7.56 0 0 1-2-5.36v-3.18a7.57 7.57 0 0 1 2-5.36 6.7 6.7 0 0 1 5.14-2.13 7 7 0 0 1 5.27 2.11 7.45 7.45 0 0 1 2 5.36v3.18zm-2.93-3.2a5.47 5.47 0 0 0-1.18-3.62 3.94 3.94 0 0 0-3.19-1.42 3.71 3.71 0 0 0-3.07 1.42 5.65 5.65 0 0 0-1.13 3.62v3.2a5.71 5.71 0 0 0 1.13 3.65 3.71 3.71 0 0 0 3.08 1.42 3.92 3.92 0 0 0 3.19-1.42 5.56 5.56 0 0 0 1.17-3.66v-3.2zm5.11 3.76a7.15 7.15 0 0 1 1.6-4.8 6.12 6.12 0 0 1 8.65-.17l.17.17a7.08 7.08 0 0 1 1.61 4.8v.25a7.11 7.11 0 0 1-1.61 4.82 6.16 6.16 0 0 1-8.71.11l-.11-.11a7.13 7.13 0 0 1-1.6-4.81v-.25zm3 .25a5.84 5.84 0 0 0 .75 3.12 2.84 2.84 0 0 0 4.63 0 5.7 5.7 0 0 0 .78-3.12v-.25a5.63 5.63 0 0 0-.78-3.09 2.8 2.8 0 0 0-4.63 0 5.81 5.81 0 0 0-.75 3.09v.25zm23 .31a7.39 7.39 0 0 1-1.35 4.62 4.45 4.45 0 0 1-3.75 1.76 4.64 4.64 0 0 1-2-.4 4.06 4.06 0 0 1-1.48-1.18v6.36h-3v-18.16H485l.29 1.65a4.36 4.36 0 0 1 1.52-1.41 4.25 4.25 0 0 1 2.07-.49 4.35 4.35 0 0 1 3.78 1.92 8.61 8.61 0 0 1 1.35 5.06v.27zm-2.93-.26a6.38 6.38 0 0 0-.76-3.29 2.47 2.47 0 0 0-2.26-1.28 2.94 2.94 0 0 0-1.56.39 2.89 2.89 0 0 0-1 1.1v5.92a2.73 2.73 0 0 0 1 1.06 3.13 3.13 0 0 0 1.59.37 2.53 2.53 0 0 0 2.25-1.11 5.12 5.12 0 0 0 .75-2.91v-.25zm12.69 2.82a1.37 1.37 0 0 0-.58-1.13 5.81 5.81 0 0 0-2.17-.79 9 9 0 0 1-3.56-1.41 3 3 0 0 1-1.21-2.49 3.54 3.54 0 0 1 1.39-2.81 5.55 5.55 0 0 1 3.67-1.16 5.75 5.75 0 0 1 3.81 1.18 3.5 3.5 0 0 1 1.35 2.93v.07h-2.82a1.85 1.85 0 0 0-.62-1.39 2.38 2.38 0 0 0-1.7-.58 2.43 2.43 0 0 0-1.62.48 1.48 1.48 0 0 0-.56 1.17 1.31 1.31 0 0 0 .53 1.1 5.66 5.66 0 0 0 2.14.72 9 9 0 0 1 3.67 1.44 3 3 0 0 1 1.19 2.53 3.44 3.44 0 0 1-1.47 2.9 6.22 6.22 0 0 1-3.85 1.1 5.87 5.87 0 0 1-4-1.31 3.7 3.7 0 0 1-1.41-3v-.07h2.74a2 2 0 0 0 .82 1.66 3.31 3.31 0 0 0 1.89.52 3 3 0 0 0 1.76-.44 1.37 1.37 0 0 0 .61-1.22zm8.69 3.56h-2.93V331h2.93v2.8zm6.55 0h-2.93V331H519v2.8zm6.56 0h-2.93V331h2.93v2.8zm-84.97 59.71h-24.72l-1.81-7.88 27.75-32.16h9.39v31h6.8v9h-6.79v10.91h-10.62v-10.87zm0-9v-15.79l-13.44 15.75h13.44zm21.56-5.38c0-14.67 9.11-26.16 22.55-26.16s22.4 11.35 22.4 26.16-9 26.16-22.55 26.16-22.4-11.35-22.4-26.16zm33.53 0c0-9.18-4.48-16.12-11.13-16.12s-11 6.72-11 16.12 4.41 16.12 11.13 16.12 11-6.8 11-16.12zm41.43 14.38h-24.72l-1.81-7.88 27.75-32.16h9.39v31h6.79v9h-6.79v10.91h-10.61v-10.87zm0-9v-15.79l-13.44 15.75h13.44zm-135.29 48.08v6.69h-3v-17.65h6.9a6.54 6.54 0 0 1 4.58 1.51 5.6 5.6 0 0 1 .08 7.92l-.08.08a6.57 6.57 0 0 1-4.58 1.5h-4zm0-2.36h4a3.23 3.23 0 0 0 2.46-.87 3.1 3.1 0 0 0 .82-2.22 3 3 0 0 0-3.28-3.14h-4v6.23zm20.18 9.05a9.19 9.19 0 0 1-.26-1 6.86 6.86 0 0 1-.14-1 5.21 5.21 0 0 1-1.59 1.54 4.05 4.05 0 0 1-2.21.63 4.36 4.36 0 0 1-3.15-1 3.83 3.83 0 0 1-1.1-2.9 3.42 3.42 0 0 1 1.5-3 7.26 7.26 0 0 1 4.23-1.06h2.29v-1.15a2.13 2.13 0 0 0-.61-1.61 2.41 2.41 0 0 0-1.73-.58 2.46 2.46 0 0 0-1.6.49 1.54 1.54 0 0 0-.59 1.25h-2.84v-.07a3.25 3.25 0 0 1 1.39-2.75 5.88 5.88 0 0 1 3.84-1.2 5.61 5.61 0 0 1 3.7 1.16 4.1 4.1 0 0 1 1.41 3.35v5.83a10.8 10.8 0 0 0 .11 1.56 8.19 8.19 0 0 0 .35 1.46h-3zm-3.61-2.11a3.7 3.7 0 0 0 2-.56 2.8 2.8 0 0 0 1.18-1.27v-1.94h-2.34a3 3 0 0 0-2 .64 1.93 1.93 0 0 0-.73 1.5 1.53 1.53 0 0 0 .49 1.19 2 2 0 0 0 1.42.44zm8.61-4.27a8.54 8.54 0 0 1 1.37-5 4.41 4.41 0 0 1 3.81-1.93 4.14 4.14 0 0 1 2.07.5 4.37 4.37 0 0 1 1.51 1.45l.29-1.71h2.45v13.11a5 5 0 0 1-1.56 3.92 6.49 6.49 0 0 1-4.44 1.38 8.69 8.69 0 0 1-2.07-.27 9.65 9.65 0 0 1-2-.72l.63-2.31a7.13 7.13 0 0 0 1.61.59 7.68 7.68 0 0 0 1.81.21 3.36 3.36 0 0 0 2.34-.69 2.74 2.74 0 0 0 .74-2.1v-1.35a4.12 4.12 0 0 1-1.46 1.19 4.4 4.4 0 0 1-1.93.41 4.53 4.53 0 0 1-3.78-1.76 7.3 7.3 0 0 1-1.37-4.62v-.3zm3 .25a5.15 5.15 0 0 0 .72 2.89 2.5 2.5 0 0 0 2.24 1.08 3 3 0 0 0 1.59-.39 2.91 2.91 0 0 0 1-1.13v-5.75a3.16 3.16 0 0 0-1.06-1.12 2.88 2.88 0 0 0-1.56-.41 2.42 2.42 0 0 0-2.25 1.27 6.55 6.55 0 0 0-.73 3.3v.25h.05zm17.08 6.38a5.7 5.7 0 0 1-4.44-1.82A6.7 6.7 0 0 1 441 433v-.49a7 7 0 0 1 1.64-4.75 5.2 5.2 0 0 1 4.12-1.87 5.13 5.13 0 0 1 4.07 1.61 6.29 6.29 0 0 1 1.41 4.31v1.73H444v.06a4.1 4.1 0 0 0 .92 2.55 2.9 2.9 0 0 0 2.33 1 6.29 6.29 0 0 0 2-.29 6.67 6.67 0 0 0 1.64-.84l1 1.93a6.08 6.08 0 0 1-2 1.11 8.18 8.18 0 0 1-2.81.47zm-.34-11.25a2.21 2.21 0 0 0-1.79.87 4.26 4.26 0 0 0-.87 2.2v.06h5.2v-.3a3.14 3.14 0 0 0-.64-2 2.32 2.32 0 0 0-1.9-.83zm16.7-2.12l.17 1.89a4.68 4.68 0 0 1 1.62-1.57 4.32 4.32 0 0 1 2.2-.56 4.13 4.13 0 0 1 3.19 1.24 5.57 5.57 0 0 1 1.15 3.87v8.24h-3V431a2.94 2.94 0 0 0-.61-2.1 2.5 2.5 0 0 0-1.86-.62 3.09 3.09 0 0 0-1.54.38 3.18 3.18 0 0 0-1.12 1v9.51h-3v-13.01h2.7zm10.74 6.44a7.15 7.15 0 0 1 1.6-4.8 6.12 6.12 0 0 1 8.65-.17l.17.17a7.08 7.08 0 0 1 1.61 4.8v.25a7.11 7.11 0 0 1-1.61 4.82 6.16 6.16 0 0 1-8.71.11l-.11-.11a7.13 7.13 0 0 1-1.6-4.81v-.26zm3 .25a5.84 5.84 0 0 0 .75 3.12 2.84 2.84 0 0 0 4.63 0 5.7 5.7 0 0 0 .78-3.12v-.25a5.63 5.63 0 0 0-.78-3.09 2.8 2.8 0 0 0-4.63 0 5.81 5.81 0 0 0-.75 3.09v.25zM492.2 423v3.19h2.35v2.18h-2.35v7.25a1.58 1.58 0 0 0 .35 1.16 1.27 1.27 0 0 0 .93.35 2.53 2.53 0 0 0 .47 0 2.86 2.86 0 0 0 .44-.11l.31 2.16a3.38 3.38 0 0 1-.9.32 5 5 0 0 1-1.08.12 3.37 3.37 0 0 1-2.54-1 4.16 4.16 0 0 1-.92-3v-7.25h-2v-2.18h2V423h2.94zm12.1 16.28v-10.94h-2v-2.18h2v-1.53a4.1 4.1 0 0 1 4.5-4.52 5.76 5.76 0 0 1 .86.07l1 .19-.3 2.28-.54-.08a5.42 5.42 0 0 0-.64 0 1.81 1.81 0 0 0-1.44.55 2.3 2.3 0 0 0-.48 1.56v1.53h2.67v2.18h-2.67v10.93h-3zm6.81-6.68a7.15 7.15 0 0 1 1.6-4.8 6.12 6.12 0 0 1 8.65-.17l.17.17a7.08 7.08 0 0 1 1.61 4.8v.25a7.11 7.11 0 0 1-1.61 4.82 6.16 6.16 0 0 1-8.71.11l-.11-.11a7.13 7.13 0 0 1-1.6-4.81v-.26zm3 .25a5.84 5.84 0 0 0 .75 3.12 2.84 2.84 0 0 0 4.63 0 5.7 5.7 0 0 0 .78-3.12v-.25a5.63 5.63 0 0 0-.78-3.09 2.8 2.8 0 0 0-4.63 0 5.81 5.81 0 0 0-.75 3.09v.25zm19.67 4.51a4.49 4.49 0 0 1-1.56 1.61 4.63 4.63 0 0 1-5.48-.78 6.2 6.2 0 0 1-1.19-4.18v-7.84h2.93V434a3.93 3.93 0 0 0 .56 2.41 2 2 0 0 0 1.68.69 3.78 3.78 0 0 0 1.79-.38 2.78 2.78 0 0 0 1.13-1.11v-9.48h3v13.11H534zm8.53-11.2l.17 1.89a4.68 4.68 0 0 1 1.62-1.57 4.32 4.32 0 0 1 2.2-.56 4.13 4.13 0 0 1 3.19 1.24 5.57 5.57 0 0 1 1.15 3.87v8.24h-2.94V431a2.94 2.94 0 0 0-.61-2.1 2.5 2.5 0 0 0-1.86-.62 3.09 3.09 0 0 0-1.54.38 3.18 3.18 0 0 0-1.12 1v9.51h-3v-13.01h2.69zm10.82 6.74a8.64 8.64 0 0 1 1.35-5.06 4.35 4.35 0 0 1 3.78-1.92 4.13 4.13 0 0 1 1.91.43 4.33 4.33 0 0 1 1.46 1.23v-7.21h3v18.91h-2.53l-.29-1.62a4.32 4.32 0 0 1-1.52 1.4 4.26 4.26 0 0 1-2.06.48 4.46 4.46 0 0 1-3.76-1.76 7.39 7.39 0 0 1-1.35-4.62v-.26zm3 .25a5.28 5.28 0 0 0 .7 2.9 2.44 2.44 0 0 0 2.21 1.08 3 3 0 0 0 1.58-.4 3.05 3.05 0 0 0 1.06-1.14v-5.72a3.1 3.1 0 0 0-1.07-1.13 2.88 2.88 0 0 0-1.55-.41 2.38 2.38 0 0 0-2.22 1.27 6.69 6.69 0 0 0-.71 3.3v.25zm14.73 6.13h-2.93v-2.82h2.93v2.82z",fill:"#3c40c6",transform:"translate(-40.82 -33.12)"}),l.createElement("path",{d:"M596.13 301.41h92.43v4h-92.43z",fill:"#3c40c6",transform:"rotate(-29.99 560.23 363.065)"}),l.createElement("path",{d:"M329.93 264.69h4v82.44h-4z",fill:"#3c40c6",transform:"rotate(-60 282.825 324.693)"}),l.createElement("path",{d:"M168.58 153.15h4v119.21h-4z",fill:"#3c40c6",transform:"rotate(-60 121.498 231.54)"}),l.createElement("path",{d:"M179.38 90.23h4v33.71h-4z",fill:"#3c40c6"}),l.createElement("path",{d:"M214.22 210.75h119.21v4H214.22z",fill:"#3c40c6",transform:"rotate(-30 191.62 272.364)"}),l.createElement("path",{d:"M179.38 209.43h4v119.21h-4z",fill:"#3c40c6"}),l.createElement("path",{d:"M116.7 291.73h33.72v4H116.7z",fill:"#3c40c6",transform:"rotate(-29.99 51.364 353.4)"}),l.createElement("path",{d:"M85.48 156.18h10.91v2H85.48z",fill:"#3c40c6",transform:"rotate(-55.92 39.324 179.074)"}),l.createElement("path",{d:"M80.81 158.24h2v5.46h-2z",fill:"#3c40c6",transform:"rotate(-57.85 31.436 181.345)"}),l.createElement("path",{d:"M66.96 163.67h10.92v2H66.96z",fill:"#3c40c6",transform:"rotate(-53.86 19.414 188.284)"}),l.createElement("path",{d:"M67.63 174.87a3.65 3.65 0 1 1 3.65-3.65 3.65 3.65 0 0 1-3.65 3.65zm0-5.3a1.65 1.65 0 1 0 1.65 1.65 1.65 1.65 0 0 0-1.65-1.65zm9.61-7.77a3.65 3.65 0 1 1 3.65-3.65 3.65 3.65 0 0 1-3.65 3.65zm0-5.3a1.65 1.65 0 1 0 1.65 1.65 1.65 1.65 0 0 0-1.65-1.65zm9.11 11.01a3.65 3.65 0 1 1 3.65-3.65 3.65 3.65 0 0 1-3.65 3.65zm0-5.3a1.65 1.65 0 1 0 1.65 1.65 1.65 1.65 0 0 0-1.65-1.65zm9.13-8.09a3.65 3.65 0 1 1 3.65-3.65 3.65 3.65 0 0 1-3.65 3.65zm0-5.3a1.65 1.65 0 1 0 1.65 1.65 1.65 1.65 0 0 0-1.65-1.65z",fill:"#3c40c6",transform:"translate(-40.82 -33.12)"}),l.createElement("path",{d:"M60.63 147.44H19.25v-40.6h2v38.6h39.38v2z",fill:"#3c40c6"}),l.createElement("path",{d:"M380.57 172h-31.18a9.38 9.38 0 0 1-.45-18.74 12.86 12.86 0 0 1 23.89-4.81 8 8 0 0 1 8.7 7.23v.4a8 8 0 0 1-.96 15.92zm-31.18-16.7a7.38 7.38 0 0 0-.54 14.75h31.71a6 6 0 0 0 0-12h-1.09l.06-1.08v-.52a6 6 0 0 0-7.1-5.89l-.74.14-.34-.67a10.86 10.86 0 0 0-20.53 4.33v1l-1.15-.07h-.23z",fill:"#3c40c6",transform:"translate(-40.82 -33.12)"}),l.createElement("path",{d:"M362 165.22h-1.86l-.74-1.92H356l-.7 1.92h-1.81l3.3-8.47h1.81zm-3.15-3.35l-1.17-3.14-1.14 3.14h2.31zm4.07 3.35v-8.47h2.75a9.94 9.94 0 0 1 2 .13 2.22 2.22 0 0 1 1.22.83 2.63 2.63 0 0 1 .49 1.65 2.76 2.76 0 0 1-.28 1.31 2.32 2.32 0 0 1-.72.83 2.46 2.46 0 0 1-.89.4 9.76 9.76 0 0 1-1.77.12h-1.12v3.2h-1.68zm1.71-7v2.4h.94a4.41 4.41 0 0 0 1.35-.13 1.11 1.11 0 0 0 .54-.42 1.14 1.14 0 0 0 .19-.66 1.1 1.1 0 0 0-.27-.76 1.18 1.18 0 0 0-.69-.37 8.13 8.13 0 0 0-1.23-.06h-.83zm5.96 7v-8.47h1.71v8.47h-1.71zM222.2 430.56a8.89 8.89 0 0 1-6.2-15.28v-25.9a6.18 6.18 0 1 1 12.37 0v25.9a8.89 8.89 0 0 1-6.17 15.28zm0-45.37a4.19 4.19 0 0 0-4.18 4.19v26.8l-.34.3a6.9 6.9 0 1 0 9.05 0l-.34-.3v-26.8a4.19 4.19 0 0 0-4.19-4.19z",fill:"#3c40c6",transform:"translate(-40.82 -33.12)"}),l.createElement("path",{d:"M223.08 418.11v-16.3a.89.89 0 1 0-1.77 0v16.31a3.95 3.95 0 1 0 1.77-.01z",fill:"#3c40c6",transform:"translate(-40.82 -33.12)"}),l.createElement("path",{d:"M222.2 426.9a4.95 4.95 0 0 1-1.88-9.52v-15.57a1.89 1.89 0 1 1 3.77 0v15.58a5 5 0 0 1-1.89 9.51zm0-8l-.66.15a2.95 2.95 0 1 0 1.32 0zm4.13-320.98A22.57 22.57 0 0 1 210.65 91c-8.07-8-9.21-20-2.53-26.71l1.41 1.41c-5.9 5.9-4.76 16.63 2.53 23.92s18 8.43 23.92 2.53l1.41 1.41a15.39 15.39 0 0 1-11.06 4.36z",fill:"#3c40c6",transform:"translate(-40.82 -33.12)"}),l.createElement("path",{d:"M234.78 94.52c-4.3 0-11.41-4.83-17.1-10.51a49.49 49.49 0 0 1-8.75-11.37c-2.05-3.93-2.33-6.82-.81-8.34 2.81-2.81 9.63.93 15.08 5.37a1 1 0 0 1-1.26 1.55c-6.18-5-11.16-6.75-12.41-5.5-.62.62-.64 2.53 1.17 6a47.49 47.49 0 0 0 8.39 10.89c8.19 8.19 15.36 11.09 16.89 9.56 1.24-1.24-.48-6.22-5.5-12.41a1 1 0 1 1 1.52-1.27c4.43 5.45 8.17 12.27 5.37 15.08a3.55 3.55 0 0 1-2.59.95z",fill:"#3c40c6",transform:"translate(-40.82 -33.12)"}),l.createElement("path",{d:"M225.09 80.2a3.6 3.6 0 1 1 2.55-1.05 3.6 3.6 0 0 1-2.55 1.05zm0-5.2a1.6 1.6 0 1 0 1.13.47 1.6 1.6 0 0 0-1.13-.47z",fill:"#3c40c6",transform:"translate(-40.82 -33.12)"}),l.createElement("path",{d:"M225.53 83.51a1 1 0 0 1-1-1v-3.17a1 1 0 1 1 2 0v3.17a1 1 0 0 1-1 1zm-3-6.35h-3.34a1 1 0 0 1 0-2h3.34a1 1 0 0 1 0 2zm10.19-1.3a1 1 0 0 1-1-1 4.9 4.9 0 0 0-4.89-4.86 1 1 0 0 1 0-2 6.9 6.9 0 0 1 6.89 6.89 1 1 0 0 1-1 .97z",fill:"#3c40c6",transform:"translate(-40.82 -33.12)"}),l.createElement("path",{d:"M237.82 75.86a1 1 0 0 1-1-1 10 10 0 0 0-10-10 1 1 0 1 1 0-2 12 12 0 0 1 12 12 1 1 0 0 1-1 1zM80.89 342a17.84 17.84 0 1 1 17.84-17.84A17.86 17.86 0 0 1 80.89 342zm0-33.69a15.84 15.84 0 1 0 15.84 15.84 15.86 15.86 0 0 0-15.84-15.86z",fill:"#3c40c6",transform:"translate(-40.82 -33.12)"}),l.createElement("path",{d:"M80.89 342c-7.45 0-13.51-8-13.51-17.84s6.06-17.84 13.51-17.84 13.51 8 13.51 17.84S88.34 342 80.89 342zm0-33.69c-6.35 0-11.51 7.11-11.51 15.84S74.55 340 80.89 340s11.51-7.11 11.51-15.84-5.16-15.87-11.51-15.87z",fill:"#3c40c6",transform:"translate(-40.82 -33.12)"}),l.createElement("path",{d:"M80.89 342c-4.77 0-7.34-9.19-7.34-17.84s2.57-17.84 7.34-17.84 7.34 9.19 7.34 17.84S85.66 342 80.89 342zm0-33.69c-2.52 0-5.34 6.51-5.34 15.84S78.37 340 80.89 340s5.34-6.51 5.34-15.84-2.81-15.87-5.34-15.87z",fill:"#3c40c6",transform:"translate(-40.82 -33.12)"}),l.createElement("path",{d:"M80.89 342a1 1 0 0 1-1-1v-33.71a1 1 0 0 1 2 0V341a1 1 0 0 1-1 1z",fill:"#3c40c6",transform:"translate(-40.82 -33.12)"}),l.createElement("path",{d:"M97 325.14H64.25a1 1 0 0 1 0-2H97a1 1 0 0 1 0 2zm-2.54-9.98H67.32a1 1 0 0 1 0-2h27.14a1 1 0 0 1 0 2zm-.75 19.96h-25.9a1 1 0 0 1 0-2h25.9a1 1 0 0 1 0 2zm142.56-43.54v-29l23-28.4 22.3 1.69v30.62l-22.3 27.19zm22.81-10.7l12.7-15.48V248l-12.7-1L246 263.18v16.5zm-56.19-22.98a2 2 0 0 1-1-.27l-40.33-23.28a2 2 0 1 1 2-3.46l40.33 23.28a2 2 0 0 1-1 3.73zm-9.97 3.56a2 2 0 0 1-1-.27l-30.36-17.53a2 2 0 1 1 2-3.46l30.36 17.53a2 2 0 0 1-1 3.73zm9.97 15.07a2 2 0 0 1-1-.27L161.56 253a2 2 0 1 1 2-3.46l40.33 23.28a2 2 0 0 1-1 3.71zm-8.95 4.15a2 2 0 0 1-1-.27l-31.38-18.12a2 2 0 1 1 2-3.46l31.38 18.12a2 2 0 0 1-1 3.73zm-14.39 1a2 2 0 0 1-1-.27l-17-9.8a2 2 0 1 1 2-3.46l17 9.8a2 2 0 0 1-1 3.73z",fill:"#3c40c6",transform:"translate(-40.82 -33.12)"}),l.createElement(tz,{href:"/"},l.createElement("path",{d:"M706.94 294.93l-74.05-42.75v-85.49l74.05-42.75 74.04 42.75v85.49l-74.04 42.75z",fill:"#3c40c6"})),l.createElement("path",{d:"M706.67 222.71v-17.65h5.87a7.63 7.63 0 0 1 4.58 1.21 4.18 4.18 0 0 1 1.65 3.61 3.55 3.55 0 0 1-.69 2.15 4.09 4.09 0 0 1-1.92 1.41 3.94 3.94 0 0 1 2.42 1.51 4.47 4.47 0 0 1 .85 2.7 4.54 4.54 0 0 1-1.62 3.78 7 7 0 0 1-4.49 1.29h-6.65zm3-10.22h3.25a3.32 3.32 0 0 0 2.16-.65 2.24 2.24 0 0 0 .79-1.84 2.29 2.29 0 0 0-.87-2 4 4 0 0 0-2.45-.64h-2.92v5.07zm0 2.19v5.66h3.71a3.55 3.55 0 0 0 2.35-.7 2.49 2.49 0 0 0 .82-2 3.16 3.16 0 0 0-.69-2.18 2.75 2.75 0 0 0-2.16-.77h-4zm20.33 8.03a9.21 9.21 0 0 1-.26-1 6.86 6.86 0 0 1-.14-.95 5.21 5.21 0 0 1-1.6 1.54 4 4 0 0 1-2.21.63 4.36 4.36 0 0 1-3.15-1.05 3.83 3.83 0 0 1-1.1-2.9 3.42 3.42 0 0 1 1.5-3 7.26 7.26 0 0 1 4.23-1.06h2.29v-1.15a2.13 2.13 0 0 0-.61-1.61 2.41 2.41 0 0 0-1.73-.58 2.46 2.46 0 0 0-1.6.49 1.54 1.54 0 0 0-.59 1.25h-2.83a3.25 3.25 0 0 1 1.39-2.75 5.88 5.88 0 0 1 3.84-1.2 5.61 5.61 0 0 1 3.7 1.16 4.1 4.1 0 0 1 1.41 3.35v5.83a10.79 10.79 0 0 0 .11 1.56 8.19 8.19 0 0 0 .35 1.46h-3zm-3.61-2.11a3.7 3.7 0 0 0 2-.56 2.8 2.8 0 0 0 1.18-1.27v-1.94h-2.34a3 3 0 0 0-2 .64 1.93 1.93 0 0 0-.73 1.5 1.53 1.53 0 0 0 .49 1.19 2 2 0 0 0 1.39.44zm14.46 0a2.69 2.69 0 0 0 1.82-.63 2 2 0 0 0 .74-1.58h2.67v.07a3.87 3.87 0 0 1-1.5 3.17 5.57 5.57 0 0 1-3.75 1.33 5.44 5.44 0 0 1-4.44-1.87 7.16 7.16 0 0 1-1.55-4.73v-.42a7.17 7.17 0 0 1 1.55-4.72 6.13 6.13 0 0 1 8.28-.5 4.43 4.43 0 0 1 1.42 3.5v.07h-2.68a2.57 2.57 0 0 0-.71-1.83 2.42 2.42 0 0 0-1.85-.75 2.49 2.49 0 0 0-2.35 1.2 6 6 0 0 0-.69 3v.42a6 6 0 0 0 .69 3 2.49 2.49 0 0 0 2.35 1.27zm11.9-3.6h-1.32v5.73h-2.93V203.8h2.93v10.81h1.22l3.31-5h3.47l-4.33 6 5 7.15h-3.42zm18.57-10.6v3.19h2.35v2.18h-2.35V219a1.58 1.58 0 0 0 .35 1.16 1.27 1.27 0 0 0 .93.35 2.53 2.53 0 0 0 .47 0 2.86 2.86 0 0 0 .44-.11l.31 2.16a3.38 3.38 0 0 1-.9.32 5 5 0 0 1-1.08.12 3.37 3.37 0 0 1-2.54-1 4.16 4.16 0 0 1-.92-3v-7.25h-2v-2.18h2v-3.17h2.94zm3.79 9.6a7.15 7.15 0 0 1 1.6-4.8 6.12 6.12 0 0 1 8.65-.17l.17.17a7.08 7.08 0 0 1 1.61 4.8v.25a7.11 7.11 0 0 1-1.61 4.82 6.16 6.16 0 0 1-8.71.11l-.11-.11a7.13 7.13 0 0 1-1.6-4.81V216zm3 .25a5.84 5.84 0 0 0 .75 3.12 2.84 2.84 0 0 0 4.63 0 5.7 5.7 0 0 0 .78-3.12V216a5.63 5.63 0 0 0-.78-3.09 2.8 2.8 0 0 0-4.63 0 5.81 5.81 0 0 0-.75 3.09v.25zm-68.2 30.39v.07a5.56 5.56 0 0 1-1.74 4.36 6.79 6.79 0 0 1-4.84 1.68 6.55 6.55 0 0 1-5-2.08 7.49 7.49 0 0 1-1.93-5.31V242a7.58 7.58 0 0 1 1.91-5.32 6.41 6.41 0 0 1 5-2.09 7 7 0 0 1 4.93 1.64 5.55 5.55 0 0 1 1.75 4.42v.07h-2.85a3.42 3.42 0 0 0-3.81-3.77 3.38 3.38 0 0 0-2.87 1.43 5.85 5.85 0 0 0-1.06 3.62v3.38a5.8 5.8 0 0 0 1.08 3.61 3.48 3.48 0 0 0 2.93 1.43 3.69 3.69 0 0 0 2.78-1 3.82 3.82 0 0 0 1-2.77H710zm5.39-5.56a4.67 4.67 0 0 1 1.59-1.43 4.28 4.28 0 0 1 2.08-.51 4.13 4.13 0 0 1 3.25 1.32 6 6 0 0 1 1.17 4.05v8h-3v-8a3.32 3.32 0 0 0-.62-2.24 2.36 2.36 0 0 0-1.85-.69 3.29 3.29 0 0 0-1.54.36 3.19 3.19 0 0 0-1.13 1v9.6h-3v-19h3v7.49zm18.89 11.41a9.19 9.19 0 0 1-.26-1 6.86 6.86 0 0 1-.14-.95 5.21 5.21 0 0 1-1.59 1.54 4 4 0 0 1-2.21.63 4.36 4.36 0 0 1-3.15-1.05 3.83 3.83 0 0 1-1.1-2.9 3.42 3.42 0 0 1 1.5-3 7.26 7.26 0 0 1 4.23-1.06h2.29v-1.15a2.13 2.13 0 0 0-.61-1.61 2.41 2.41 0 0 0-1.73-.58 2.46 2.46 0 0 0-1.6.49 1.54 1.54 0 0 0-.59 1.25h-2.84v-.1a3.25 3.25 0 0 1 1.39-2.75 5.88 5.88 0 0 1 3.84-1.2 5.61 5.61 0 0 1 3.7 1.16 4.1 4.1 0 0 1 1.41 3.35v5.83a10.79 10.79 0 0 0 .11 1.56 8.19 8.19 0 0 0 .35 1.46h-3zm-3.61-2.11a3.7 3.7 0 0 0 2-.56 2.8 2.8 0 0 0 1.18-1.27v-1.94h-2.34a3 3 0 0 0-2 .64 1.93 1.93 0 0 0-.73 1.5 1.53 1.53 0 0 0 .49 1.19 2 2 0 0 0 1.39.44zm12.19-14.21h-3v-2.58h3v2.58zm0 16.33h-3v-13.12h3v13.11zm5.83-13.12l.17 1.89a4.68 4.68 0 0 1 1.62-1.57 4.32 4.32 0 0 1 2.2-.56 4.13 4.13 0 0 1 3.19 1.24 5.57 5.57 0 0 1 1.15 3.87v8.24H754v-8.22a2.94 2.94 0 0 0-.61-2.1 2.5 2.5 0 0 0-1.86-.62 3.09 3.09 0 0 0-1.54.38 3.18 3.18 0 0 0-1.12 1v9.51h-3v-13.06h2.68zm14.4 13.11h-3v-18.9h3v18.91zm6.18-16.32h-3v-2.58h3v2.58zm0 16.33h-3v-13.12h3v13.11zm5.82-13.12l.17 1.89a4.68 4.68 0 0 1 1.62-1.57 4.32 4.32 0 0 1 2.2-.56 4.13 4.13 0 0 1 3.19 1.24 5.57 5.57 0 0 1 1.15 3.87v8.24h-3v-8.22a2.94 2.94 0 0 0-.61-2.1 2.5 2.5 0 0 0-1.86-.62 3.09 3.09 0 0 0-1.54.38 3.18 3.18 0 0 0-1.12 1v9.51h-3v-13.06h2.8zm15.63 7.38h-1.33v5.73h-2.93v-18.9h2.93v10.81h1.22l3.31-5h3.47l-4.33 6 5 7.15h-3.42zm-25.15 32.07H736.6l5.66-6.11a2 2 0 0 0-2.84-2.81l-.09.09-8.67 9.35a2 2 0 0 0 0 2.72l8.88 9.58a2 2 0 0 0 3-2.63l-.09-.09-5.66-6.11h28.67a2 2 0 0 0 .02-3.99z",transform:"translate(-40.82 -33.12)",fill:"#fff"}))};let on=ot;var or=function(){return{logo:{top:"30%",left:"50%",transform:"translate(-50%, -30%)",position:"absolute"}}},oi=function(e){var t=e.classes;return l.createElement("div",{className:t.logo,"data-testid":"not-found-page"},l.createElement(on,null))};let oa=(0,b.withStyles)(or)(oi);function oo(e,t){var n=rh(null==t?void 0:t.client);rd(e,r.Mutation);var i=(0,l.useState)({called:!1,loading:!1,client:n}),a=i[0],o=i[1],s=(0,l.useRef)({result:a,mutationId:0,isMounted:!0,client:n,mutation:e,options:t});Object.assign(s.current,{client:n,options:t,mutation:e});var u=(0,l.useCallback)(function(e){void 0===e&&(e={});var t=s.current,n=t.options,r=t.mutation,i=(0,t0.pi)((0,t0.pi)({},n),{mutation:r}),a=e.client||s.current.client;s.current.result.loading||i.ignoreResults||!s.current.isMounted||o(s.current.result={loading:!0,error:void 0,data:void 0,called:!0,client:a});var u=++s.current.mutationId,c=(0,ra.J)(i,e);return a.mutate(c).then(function(t){var n,r=t.data,i=t.errors,l=i&&i.length>0?new rs.cA({graphQLErrors:i}):void 0;if(u===s.current.mutationId&&!c.ignoreResults){var f={called:!0,loading:!1,data:r,error:l,client:a};s.current.isMounted&&!(0,ri.D)(s.current.result,f)&&o(s.current.result=f)}var d=e.onCompleted||(null===(n=s.current.options)||void 0===n?void 0:n.onCompleted);return null==d||d(t.data,c),t}).catch(function(t){if(u===s.current.mutationId&&s.current.isMounted){var n,r={loading:!1,error:t,data:void 0,called:!0,client:a};(0,ri.D)(s.current.result,r)||o(s.current.result=r)}var i=e.onError||(null===(n=s.current.options)||void 0===n?void 0:n.onError);if(i)return i(t,c),{data:void 0,errors:t};throw t})},[]),c=(0,l.useCallback)(function(){s.current.isMounted&&o({called:!1,loading:!1,client:n})},[]);return(0,l.useEffect)(function(){return s.current.isMounted=!0,function(){s.current.isMounted=!1}},[]),[u,(0,t0.pi)({reset:c},a)]}var os=n(59067),ou=n(28428),oc=n(11186),ol=n(78513);function of(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var od=function(e){return(0,b.createStyles)({paper:{display:"flex",margin:"".concat(2.5*e.spacing.unit,"px 0"),padding:"".concat(3*e.spacing.unit,"px ").concat(3.5*e.spacing.unit,"px")},content:{flex:1,width:"100%"},actions:of({marginTop:-(1.5*e.spacing.unit),marginLeft:-(4*e.spacing.unit)},e.breakpoints.up("sm"),{marginLeft:0,marginRight:-(1.5*e.spacing.unit)}),itemBlock:{border:"1px solid rgba(224, 224, 224, 1)",borderRadius:e.shape.borderRadius,padding:2*e.spacing.unit,marginTop:e.spacing.unit},itemBlockText:{overflowWrap:"anywhere"}})},oh=(0,b.withStyles)(od)(function(e){var t=e.actions,n=e.children,r=e.classes;return l.createElement(ii.default,{className:r.paper},l.createElement("div",{className:r.content},n),t&&l.createElement("div",{className:r.actions},t))}),op=function(e){var t=e.title;return l.createElement(x.default,{variant:"subtitle2",gutterBottom:!0},t)},ob=function(e){var t=e.children,n=e.value;return l.createElement(x.default,{variant:"body1",noWrap:!0},t||n)},om=(0,b.withStyles)(od)(function(e){var t=e.children,n=e.classes,r=e.value;return l.createElement("div",{className:n.itemBlock},l.createElement(x.default,{variant:"body1",className:n.itemBlockText},t||r))});function og(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ov(e){if(Array.isArray(e))return e}function oy(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function ow(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o_(e,t){return ov(e)||oy(e,t)||oE(e,t)||ow()}function oE(e,t){if(e){if("string"==typeof e)return og(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return og(e,t)}}var oS=function(e){var t=e.bridge,n=e.onDelete,r=o_(l.useState(null),2),i=r[0],a=r[1],o=function(e){a(e.currentTarget)},s=function(){a(null)},u=function(){n(),a(null)};return l.createElement(oh,{actions:l.createElement("div",null,l.createElement(y.default,{onClick:o,"aria-label":"open-menu"},l.createElement(ol.Z,null)),l.createElement(t_.Z,{anchorEl:i,open:Boolean(i),onClose:s},l.createElement(tN,{to:"/bridges/".concat(t.id,"/edit")},l.createElement(oc.Z,null,l.createElement(os.Z,null)),l.createElement(E.Z,null,"Edit")),l.createElement(tE.default,{onClick:u},l.createElement(oc.Z,null,l.createElement(ou.Z,null)),l.createElement(E.Z,null,"Delete"))))},l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12,sm:4,md:4},l.createElement(op,{title:"Name"}),l.createElement(ob,{value:t.name})),l.createElement(d.Z,{item:!0,xs:12,sm:4,md:8},l.createElement(op,{title:"URL"}),l.createElement(ob,{value:t.url})),l.createElement(d.Z,{item:!0,xs:12,sm:4,md:4},l.createElement(op,{title:"Outgoing Token"}),l.createElement(ob,{value:t.outgoingToken})),l.createElement(d.Z,{item:!0,xs:12,sm:4,md:3},l.createElement(op,{title:"Confirmations"}),l.createElement(ob,{value:t.confirmations})),l.createElement(d.Z,{item:!0,xs:12,sm:4,md:3},l.createElement(op,{title:"Min. Contract Payment"}),l.createElement(ob,{value:t.minimumContractPayment}))))},ok=n(83638),ox=n(33084),oT=n(22693),oM=n(58742),oO=n(9887),oA=(0,b.withStyles)(function(e){return{root:{paddingTop:3*e.spacing.unit,paddingBottom:3*e.spacing.unit}}})(oO.Z),oL=(0,b.withStyles)(function(e){return{root:{paddingLeft:2*e.spacing.unit,paddingRight:2*e.spacing.unit,paddingBottom:2*e.spacing.unit,display:"flex",flexDirection:"row",alignItems:"center"}}})(ox.Z),oC=function(e){var t=e.body,n=e.cancelButtonText,r=e.confirmButtonText,i=e.confirmButtonEnabled,a=e.maxWidth,o=e.onClose,s=e.onCancel,u=e.onConfirm,c=e.open,f=e.title;return l.createElement(aD.Z,{open:c,onClose:o,maxWidth:a},l.createElement(oA,{disableTypography:!0},l.createElement(x.default,{variant:"h5"}," ",f)),l.createElement(oT.Z,null,"string"==typeof t?l.createElement(oM.Z,{color:"textPrimary"},t):t),l.createElement(oL,null,n&&s&&l.createElement(ok.default,{onClick:s,variant:"text"},n),l.createElement(ok.default,{onClick:u,variant:"contained",color:"primary",disabled:!!i},r||"Confirm")))};function oI(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function oD(e){if(Array.isArray(e))return e}function oN(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function oP(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function oR(e,t){return oD(e)||oN(e,t)||oF(e,t)||oP()}function oj(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function oF(e,t){if(e){if("string"==typeof e)return oI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oI(e,t)}}function oY(){var e=oj(["\n fragment BridgePayload_Fields on Bridge {\n id\n name\n url\n confirmations\n outgoingToken\n minimumContractPayment\n }\n"]);return oY=function(){return e},e}var oB=n0(oY()),oU=function(e){var t=e.bridge,n=e.onDelete,r=oR(l.useState(!1),2),i=r[0],a=r[1];return l.createElement(l.Fragment,null,l.createElement(ig,null,l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:12},l.createElement(iy,null,t.name)),l.createElement(d.Z,{item:!0,xs:12},l.createElement(oS,{bridge:t,onDelete:function(){return a(!0)}})))),l.createElement(oC,{open:i,title:"Delete Bridge",body:"Are you sure you want to delete this bridge?",confirmButtonText:"Confirm",onConfirm:n,cancelButtonText:"Cancel",onCancel:function(){return a(!1)}}))};function oH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function o$(e){if(Array.isArray(e))return e}function oz(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function oG(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function oW(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function oK(e,t){return o$(e)||oG(e,t)||oV(e,t)||oW()}function oV(e,t){if(e){if("string"==typeof e)return oH(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oH(e,t)}}var oq=function(){var e=oK(l.useState(),2),t=e[0],n=e[1],r=(0,h.k6)(),i=(0,A.I0)();return l.useEffect(function(){null!=t&&(oz(t,rs.cA)?(t.graphQLErrors.forEach(function(e){var t;if((null===(t=e.extensions)||void 0===t?void 0:t.code)=="UNAUTHORIZED"){i((0,ty.Jc)()),r.push("/signin");return}}),i((0,ty.LO)(t.message))):oz(t,Error)?i((0,ty.LO)(t.message)):i((0,ty.LO)("An error occured")))},[i,t,r]),{handleMutationError:n}};function oZ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function oX(e){if(Array.isArray(e))return e}function oJ(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function oQ(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){oJ(a,r,i,o,s,"next",e)}function s(e){oJ(a,r,i,o,s,"throw",e)}o(void 0)})}}function o1(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function o0(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o2(e,t){return oX(e)||o1(e,t)||o4(e,t)||o0()}function o3(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function o4(e,t){if(e){if("string"==typeof e)return oZ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oZ(e,t)}}var o6=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};function o5(){var e=o3(["\n ","\n query FetchBridge($id: ID!) {\n bridge(id: $id) {\n __typename\n ... on Bridge {\n ...BridgePayload_Fields\n }\n ... on NotFoundError {\n message\n }\n }\n }\n"]);return o5=function(){return e},e}function o8(){var e=o3(["\n mutation DeleteBridge($id: ID!) {\n deleteBridge(id: $id) {\n ... on DeleteBridgeSuccess {\n bridge {\n id\n }\n }\n ... on NotFoundError {\n message\n }\n ... on DeleteBridgeInvalidNameError {\n message\n }\n ... on DeleteBridgeConflictError {\n message\n }\n }\n }\n"]);return o8=function(){return e},e}var o9=n0(o5(),oB),o7=n0(o8()),se=function(){var e=(0,h.UO)().id,t=(0,h.k6)(),n=(0,A.I0)(),r=oq().handleMutationError,i=rv(o9,{variables:{id:e}}),a=i.data,o=i.loading,s=i.error,u=o2(oo(o7),1)[0];if(o)return l.createElement(iR,null);if(s)return l.createElement(iD,{error:s});var c,f=(c=oQ(function(){var i,a,o,s,c;return o6(this,function(l){switch(l.label){case 0:return l.trys.push([0,2,,3]),[4,u(((o={}).variables={id:e},o))];case 1:switch(null==(s=null===(i=(a=l.sent()).data)||void 0===i?void 0:i.deleteBridge)?void 0:s.__typename){case"DeleteBridgeSuccess":t.push("/bridges"),n((0,ty.qt)("Bridge Deleted"));break;case"NotFoundError":case"DeleteBridgeInvalidNameError":case"DeleteBridgeConflictError":n((0,ty.LO)(s.message))}return[3,3];case 2:return r(c=l.sent()),[3,3];case 3:return[2]}})}),function(){return c.apply(this,arguments)}),d=null==a?void 0:a.bridge;switch(null==d?void 0:d.__typename){case"Bridge":return l.createElement(oU,{bridge:d,onDelete:f});case"NotFoundError":return l.createElement(oa,null);default:return null}},st=(0,b.withStyles)(iu)(function(e){var t=e.bridge,n=e.classes;return l.createElement(ir.Z,{className:n.row,key:t.name,hover:!0},l.createElement(r7.default,{scope:"row",component:"th"},l.createElement(ih,{className:n.link,href:"/bridges/".concat(t.name)},t.name)),l.createElement(r7.default,null,l.createElement(x.default,{variant:"body1"},t.url)),l.createElement(r7.default,null,l.createElement(x.default,{variant:"body1"},t.confirmations)),l.createElement(r7.default,null,l.createElement(x.default,{variant:"body1"},t.minimumContractPayment)))});function sn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function sr(){var e=sn(["\n fragment BridgesPayload_ResultsFields on Bridge {\n id\n name\n url\n confirmations\n minimumContractPayment\n }\n"]);return sr=function(){return e},e}var si=n0(sr()),sa=function(e){var t=e.bridges,n=e.page,r=e.pageSize,i=e.total,a=(0,h.k6)();return l.createElement(ig,null,l.createElement(d.Z,{container:!0,spacing:32},l.createElement(d.Z,{item:!0,xs:9},l.createElement(iy,null,"Bridges")),l.createElement(d.Z,{item:!0,xs:3},l.createElement(d.Z,{container:!0,justify:"flex-end"},l.createElement(d.Z,{item:!0},l.createElement(aA.Z,{variant:"secondary",component:tz,href:"/bridges/new"},"New Bridge")))),l.createElement(d.Z,{item:!0,xs:12},l.createElement(r5.Z,null,l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,"Name"),l.createElement(r7.default,null,"URL"),l.createElement(r7.default,null,"Default Confirmations"),l.createElement(r7.default,null,"Minimum Contract Payment"))),l.createElement(r9.Z,null,t.map(function(e){return l.createElement(st,{bridge:e,key:e.name})}))),l.createElement(it.Z,{component:"div",count:i,rowsPerPage:r,rowsPerPageOptions:[r],page:n-1,onChangePage:function(e,t){a.push("/bridges?page=".concat(t+1,"&per=").concat(r))},onChangeRowsPerPage:function(){},backIconButtonProps:{"aria-label":"prev-page"},nextIconButtonProps:{"aria-label":"next-page"}})))))};function so(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ss(){var e=so(["\n ","\n query FetchBridges($offset: Int, $limit: Int) {\n bridges(offset: $offset, limit: $limit) {\n results {\n ...BridgesPayload_ResultsFields\n }\n metadata {\n total\n }\n }\n }\n"]);return ss=function(){return e},e}var su=n0(ss(),si),sc=function(){var e=ij(),t=parseInt(e.get("page")||"1",10),n=parseInt(e.get("per")||"10",10),r=rv(su,{variables:{offset:(t-1)*n,limit:n},fetchPolicy:"network-only"}),i=r.data,a=r.loading,o=r.error;return a?l.createElement(iR,null):o?l.createElement(iD,{error:o}):i?l.createElement(sa,{bridges:i.bridges.results,page:t,pageSize:n,total:i.bridges.metadata.total}):null},sl=n(52658),sf=n(69590),sd=n.n(sf),sh=function(e){return sp(e)&&!sb(e)};function sp(e){return!!e&&"object"==typeof e}function sb(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||sg(e)}var sm="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function sg(e){return e.$$typeof===sm}function sv(e){return Array.isArray(e)?[]:{}}function sy(e,t){return!1!==t.clone&&t.isMergeableObject(e)?sE(sv(e),e,t):e}function sw(e,t,n){return e.concat(t).map(function(e){return sy(e,n)})}function s_(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(t){r[t]=sy(e[t],n)}),Object.keys(t).forEach(function(i){n.isMergeableObject(t[i])&&e[i]?r[i]=sE(e[i],t[i],n):r[i]=sy(t[i],n)}),r}function sE(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||sw,n.isMergeableObject=n.isMergeableObject||sh;var r=Array.isArray(t);return r!==Array.isArray(e)?sy(t,n):r?n.arrayMerge(e,t,n):s_(e,t,n)}sE.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,n){return sE(e,n,t)},{})};var sS=sE;let sk=sS;function sx(e,t){return function(n){return e(t(n))}}let sT=sx;var sM=sT(Object.getPrototypeOf,Object);let sO=sM;var sA="[object Object]",sL=Function.prototype,sC=Object.prototype,sI=sL.toString,sD=sC.hasOwnProperty,sN=sI.call(Object);function sP(e){if(!eD(e)||eC(e)!=sA)return!1;var t=sO(e);if(null===t)return!0;var n=sD.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&sI.call(n)==sN}let sR=sP;function sj(){this.__data__=[],this.size=0}let sF=sj;function sY(e,t){return e===t||e!=e&&t!=t}let sB=sY;function sU(e,t){for(var n=e.length;n--;)if(sB(e[n][0],t))return n;return -1}let sH=sU;var s$=Array.prototype.splice;function sz(e){var t=this.__data__,n=sH(t,e);return!(n<0)&&(n==t.length-1?t.pop():s$.call(t,n,1),--this.size,!0)}let sG=sz;function sW(e){var t=this.__data__,n=sH(t,e);return n<0?void 0:t[n][1]}let sK=sW;function sV(e){return sH(this.__data__,e)>-1}let sq=sV;function sZ(e,t){var n=this.__data__,r=sH(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}let sX=sZ;function sJ(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}sJ.prototype.clear=sF,sJ.prototype.delete=sG,sJ.prototype.get=sK,sJ.prototype.has=sq,sJ.prototype.set=sX;let sQ=sJ;function s1(){this.__data__=new sQ,this.size=0}let s0=s1;function s2(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}let s3=s2;function s4(e){return this.__data__.get(e)}let s6=s4;function s5(e){return this.__data__.has(e)}let s8=s5;var s9="[object AsyncFunction]",s7="[object Function]",ue="[object GeneratorFunction]",ut="[object Proxy]";function un(e){if(!ed(e))return!1;var t=eC(e);return t==s7||t==ue||t==s9||t==ut}let ur=un;var ui=eh.Z["__core-js_shared__"];let ua=ui;var uo,us=(uo=/[^.]+$/.exec(ua&&ua.keys&&ua.keys.IE_PROTO||""))?"Symbol(src)_1."+uo:"";function uu(e){return!!us&&us in e}let uc=uu;var ul=Function.prototype.toString;function uf(e){if(null!=e){try{return ul.call(e)}catch(t){}try{return e+""}catch(n){}}return""}let ud=uf;var uh=/[\\^$.*+?()[\]{}|]/g,up=/^\[object .+?Constructor\]$/,ub=Function.prototype,um=Object.prototype,ug=ub.toString,uv=um.hasOwnProperty,uy=RegExp("^"+ug.call(uv).replace(uh,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function uw(e){return!(!ed(e)||uc(e))&&(ur(e)?uy:up).test(ud(e))}let u_=uw;function uE(e,t){return null==e?void 0:e[t]}let uS=uE;function uk(e,t){var n=uS(e,t);return u_(n)?n:void 0}let ux=uk;var uT=ux(eh.Z,"Map");let uM=uT;var uO=ux(Object,"create");let uA=uO;function uL(){this.__data__=uA?uA(null):{},this.size=0}let uC=uL;function uI(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}let uD=uI;var uN="__lodash_hash_undefined__",uP=Object.prototype.hasOwnProperty;function uR(e){var t=this.__data__;if(uA){var n=t[e];return n===uN?void 0:n}return uP.call(t,e)?t[e]:void 0}let uj=uR;var uF=Object.prototype.hasOwnProperty;function uY(e){var t=this.__data__;return uA?void 0!==t[e]:uF.call(t,e)}let uB=uY;var uU="__lodash_hash_undefined__";function uH(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=uA&&void 0===t?uU:t,this}let u$=uH;function uz(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}uz.prototype.clear=uC,uz.prototype.delete=uD,uz.prototype.get=uj,uz.prototype.has=uB,uz.prototype.set=u$;let uG=uz;function uW(){this.size=0,this.__data__={hash:new uG,map:new(uM||sQ),string:new uG}}let uK=uW;function uV(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}let uq=uV;function uZ(e,t){var n=e.__data__;return uq(t)?n["string"==typeof t?"string":"hash"]:n.map}let uX=uZ;function uJ(e){var t=uX(this,e).delete(e);return this.size-=t?1:0,t}let uQ=uJ;function u1(e){return uX(this,e).get(e)}let u0=u1;function u2(e){return uX(this,e).has(e)}let u3=u2;function u4(e,t){var n=uX(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}let u6=u4;function u5(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u5.prototype.clear=uK,u5.prototype.delete=uQ,u5.prototype.get=u0,u5.prototype.has=u3,u5.prototype.set=u6;let u8=u5;var u9=200;function u7(e,t){var n=this.__data__;if(n instanceof sQ){var r=n.__data__;if(!uM||r.length<u9-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new u8(r)}return n.set(e,t),this.size=n.size,this}let ce=u7;function ct(e){var t=this.__data__=new sQ(e);this.size=t.size}ct.prototype.clear=s0,ct.prototype.delete=s3,ct.prototype.get=s6,ct.prototype.has=s8,ct.prototype.set=ce;let cn=ct;function cr(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}let ci=cr;var ca=function(){try{var e=ux(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();let co=ca;function cs(e,t,n){"__proto__"==t&&co?co(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}let cu=cs;var cc=Object.prototype.hasOwnProperty;function cl(e,t,n){var r=e[t];cc.call(e,t)&&sB(r,n)&&(void 0!==n||t in e)||cu(e,t,n)}let cf=cl;function cd(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var s=t[a],u=r?r(n[s],e[s],s,n,e):void 0;void 0===u&&(u=e[s]),i?cu(n,s,u):cf(n,s,u)}return n}let ch=cd;function cp(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}let cb=cp;var cm="[object Arguments]";function cg(e){return eD(e)&&eC(e)==cm}let cv=cg;var cy=Object.prototype,cw=cy.hasOwnProperty,c_=cy.propertyIsEnumerable,cE=cv(function(){return arguments}())?cv:function(e){return eD(e)&&cw.call(e,"callee")&&!c_.call(e,"callee")};let cS=cE;var ck=Array.isArray;let cx=ck;var cT=n(29710),cM=9007199254740991,cO=/^(?:0|[1-9]\d*)$/;function cA(e,t){var n=typeof e;return!!(t=null==t?cM:t)&&("number"==n||"symbol"!=n&&cO.test(e))&&e>-1&&e%1==0&&e<t}let cL=cA;var cC=9007199254740991;function cI(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=cC}let cD=cI;var cN="[object Arguments]",cP="[object Array]",cR="[object Boolean]",cj="[object Date]",cF="[object Error]",cY="[object Function]",cB="[object Map]",cU="[object Number]",cH="[object Object]",c$="[object RegExp]",cz="[object Set]",cG="[object String]",cW="[object WeakMap]",cK="[object ArrayBuffer]",cV="[object DataView]",cq="[object Float64Array]",cZ="[object Int8Array]",cX="[object Int16Array]",cJ="[object Int32Array]",cQ="[object Uint8Array]",c1="[object Uint8ClampedArray]",c0="[object Uint16Array]",c2="[object Uint32Array]",c3={};function c4(e){return eD(e)&&cD(e.length)&&!!c3[eC(e)]}c3["[object Float32Array]"]=c3[cq]=c3[cZ]=c3[cX]=c3[cJ]=c3[cQ]=c3[c1]=c3[c0]=c3[c2]=!0,c3[cN]=c3[cP]=c3[cK]=c3[cR]=c3[cV]=c3[cj]=c3[cF]=c3[cY]=c3[cB]=c3[cU]=c3[cH]=c3[c$]=c3[cz]=c3[cG]=c3[cW]=!1;let c6=c4;function c5(e){return function(t){return e(t)}}let c8=c5;var c9=n(79730),c7=c9.Z&&c9.Z.isTypedArray,le=c7?c8(c7):c6;let lt=le;var ln=Object.prototype.hasOwnProperty;function lr(e,t){var n=cx(e),r=!n&&cS(e),i=!n&&!r&&(0,cT.Z)(e),a=!n&&!r&&!i&<(e),o=n||r||i||a,s=o?cb(e.length,String):[],u=s.length;for(var c in e)(t||ln.call(e,c))&&!(o&&("length"==c||i&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||cL(c,u)))&&s.push(c);return s}let li=lr;var la=Object.prototype;function lo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||la)}let ls=lo;var lu=sT(Object.keys,Object);let lc=lu;var ll=Object.prototype.hasOwnProperty;function lf(e){if(!ls(e))return lc(e);var t=[];for(var n in Object(e))ll.call(e,n)&&"constructor"!=n&&t.push(n);return t}let ld=lf;function lh(e){return null!=e&&cD(e.length)&&!ur(e)}let lp=lh;function lb(e){return lp(e)?li(e):ld(e)}let lm=lb;function lg(e,t){return e&&ch(t,lm(t),e)}let lv=lg;function ly(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}let lw=ly;var l_=Object.prototype.hasOwnProperty;function lE(e){if(!ed(e))return lw(e);var t=ls(e),n=[];for(var r in e)"constructor"==r&&(t||!l_.call(e,r))||n.push(r);return n}let lS=lE;function lk(e){return lp(e)?li(e,!0):lS(e)}let lx=lk;function lT(e,t){return e&&ch(t,lx(t),e)}let lM=lT;var lO=n(42896);function lA(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}let lL=lA;function lC(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}let lI=lC;function lD(){return[]}let lN=lD;var lP=Object.prototype.propertyIsEnumerable,lR=Object.getOwnPropertySymbols,lj=lR?function(e){return null==e?[]:lI(lR(e=Object(e)),function(t){return lP.call(e,t)})}:lN;let lF=lj;function lY(e,t){return ch(e,lF(e),t)}let lB=lY;function lU(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}let lH=lU;var l$=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)lH(t,lF(e)),e=sO(e);return t}:lN;let lz=l$;function lG(e,t){return ch(e,lz(e),t)}let lW=lG;function lK(e,t,n){var r=t(e);return cx(e)?r:lH(r,n(e))}let lV=lK;function lq(e){return lV(e,lm,lF)}let lZ=lq;function lX(e){return lV(e,lx,lz)}let lJ=lX;var lQ=ux(eh.Z,"DataView");let l1=lQ;var l0=ux(eh.Z,"Promise");let l2=l0;var l3=ux(eh.Z,"Set");let l4=l3;var l6=ux(eh.Z,"WeakMap");let l5=l6;var l8="[object Map]",l9="[object Object]",l7="[object Promise]",fe="[object Set]",ft="[object WeakMap]",fn="[object DataView]",fr=ud(l1),fi=ud(uM),fa=ud(l2),fo=ud(l4),fs=ud(l5),fu=eC;(l1&&fu(new l1(new ArrayBuffer(1)))!=fn||uM&&fu(new uM)!=l8||l2&&fu(l2.resolve())!=l7||l4&&fu(new l4)!=fe||l5&&fu(new l5)!=ft)&&(fu=function(e){var t=eC(e),n=t==l9?e.constructor:void 0,r=n?ud(n):"";if(r)switch(r){case fr:return fn;case fi:return l8;case fa:return l7;case fo:return fe;case fs:return ft}return t});let fc=fu;var fl=Object.prototype.hasOwnProperty;function ff(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&fl.call(e,"index")&&(n.index=e.index,n.input=e.input),n}let fd=ff;var fh=eh.Z.Uint8Array;let fp=fh;function fb(e){var t=new e.constructor(e.byteLength);return new fp(t).set(new fp(e)),t}let fm=fb;function fg(e,t){var n=t?fm(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}let fv=fg;var fy=/\w*$/;function fw(e){var t=new e.constructor(e.source,fy.exec(e));return t.lastIndex=e.lastIndex,t}let f_=fw;var fE=eg?eg.prototype:void 0,fS=fE?fE.valueOf:void 0;function fk(e){return fS?Object(fS.call(e)):{}}let fx=fk;function fT(e,t){var n=t?fm(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}let fM=fT;var fO="[object Boolean]",fA="[object Date]",fL="[object Map]",fC="[object Number]",fI="[object RegExp]",fD="[object Set]",fN="[object String]",fP="[object Symbol]",fR="[object ArrayBuffer]",fj="[object DataView]",fF="[object Float32Array]",fY="[object Float64Array]",fB="[object Int8Array]",fU="[object Int16Array]",fH="[object Int32Array]",f$="[object Uint8Array]",fz="[object Uint8ClampedArray]",fG="[object Uint16Array]",fW="[object Uint32Array]";function fK(e,t,n){var r=e.constructor;switch(t){case fR:return fm(e);case fO:case fA:return new r(+e);case fj:return fv(e,n);case fF:case fY:case fB:case fU:case fH:case f$:case fz:case fG:case fW:return fM(e,n);case fL:return new r;case fC:case fN:return new r(e);case fI:return f_(e);case fD:return new r;case fP:return fx(e)}}let fV=fK;var fq=Object.create,fZ=function(){function e(){}return function(t){if(!ed(t))return{};if(fq)return fq(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();let fX=fZ;function fJ(e){return"function"!=typeof e.constructor||ls(e)?{}:fX(sO(e))}let fQ=fJ;var f1="[object Map]";function f0(e){return eD(e)&&fc(e)==f1}let f2=f0;var f3=c9.Z&&c9.Z.isMap,f4=f3?c8(f3):f2;let f6=f4;var f5="[object Set]";function f8(e){return eD(e)&&fc(e)==f5}let f9=f8;var f7=c9.Z&&c9.Z.isSet,de=f7?c8(f7):f9;let dt=de;var dn=1,dr=2,di=4,da="[object Arguments]",ds="[object Array]",du="[object Boolean]",dc="[object Date]",dl="[object Error]",df="[object Function]",dd="[object GeneratorFunction]",dh="[object Map]",dp="[object Number]",db="[object Object]",dm="[object RegExp]",dg="[object Set]",dv="[object String]",dy="[object Symbol]",dw="[object WeakMap]",d_="[object ArrayBuffer]",dE="[object DataView]",dS="[object Float32Array]",dk="[object Float64Array]",dx="[object Int8Array]",dT="[object Int16Array]",dM="[object Int32Array]",dO="[object Uint8Array]",dA="[object Uint8ClampedArray]",dL="[object Uint16Array]",dC="[object Uint32Array]",dI={};function dD(e,t,n,r,i,a){var o,s=t&dn,u=t&dr,c=t&di;if(n&&(o=i?n(e,r,i,a):n(e)),void 0!==o)return o;if(!ed(e))return e;var l=cx(e);if(l){if(o=fd(e),!s)return lL(e,o)}else{var f=fc(e),d=f==df||f==dd;if((0,cT.Z)(e))return(0,lO.Z)(e,s);if(f==db||f==da||d&&!i){if(o=u||d?{}:fQ(e),!s)return u?lW(e,lM(o,e)):lB(e,lv(o,e))}else{if(!dI[f])return i?e:{};o=fV(e,f,s)}}a||(a=new cn);var h=a.get(e);if(h)return h;a.set(e,o),dt(e)?e.forEach(function(r){o.add(dD(r,t,n,r,e,a))}):f6(e)&&e.forEach(function(r,i){o.set(i,dD(r,t,n,i,e,a))});var p=c?u?lJ:lZ:u?keysIn:lm,b=l?void 0:p(e);return ci(b||e,function(r,i){b&&(r=e[i=r]),cf(o,i,dD(r,t,n,i,e,a))}),o}dI[da]=dI[ds]=dI[d_]=dI[dE]=dI[du]=dI[dc]=dI[dS]=dI[dk]=dI[dx]=dI[dT]=dI[dM]=dI[dh]=dI[dp]=dI[db]=dI[dm]=dI[dg]=dI[dv]=dI[dy]=dI[dO]=dI[dA]=dI[dL]=dI[dC]=!0,dI[dl]=dI[df]=dI[dw]=!1;let dN=dD;var dP=4;function dR(e){return dN(e,dP)}let dj=dR;function dF(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}let dY=dF;var dB="Expected a function";function dU(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError(dB);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(dU.Cache||u8),n}dU.Cache=u8;let dH=dU;var d$=500;function dz(e){var t=dH(e,function(e){return n.size===d$&&n.clear(),e}),n=t.cache;return t}let dG=dz;var dW=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,dK=/\\(\\)?/g,dV=dG(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(dW,function(e,n,r,i){t.push(r?i.replace(dK,"$1"):n||e)}),t});let dq=dV;var dZ=1/0;function dX(e){if("string"==typeof e||eR(e))return e;var t=e+"";return"0"==t&&1/e==-dZ?"-0":t}let dJ=dX;var dQ=1/0,d1=eg?eg.prototype:void 0,d0=d1?d1.toString:void 0;function d2(e){if("string"==typeof e)return e;if(cx(e))return dY(e,d2)+"";if(eR(e))return d0?d0.call(e):"";var t=e+"";return"0"==t&&1/e==-dQ?"-0":t}let d3=d2;function d4(e){return null==e?"":d3(e)}let d6=d4;function d5(e){return cx(e)?dY(e,dJ):eR(e)?[e]:lL(dq(d6(e)))}let d8=d5;var d9=!0;function d7(e,t){if(!d9&&!e){var n="Warning: "+t;"undefined"!=typeof console&&console.warn(n);try{throw Error(n)}catch(r){}}}let he=d7;n(8679);var ht=1,hn=4;function hr(e){return dN(e,ht|hn)}let hi=hr;function ha(){return(ha=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ho(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function hs(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function hu(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var hc=function(e){return Array.isArray(e)&&0===e.length},hl=function(e){return"function"==typeof e},hf=function(e){return null!==e&&"object"==typeof e},hd=function(e){return String(Math.floor(Number(e)))===e},hh=function(e){return"[object String]"===Object.prototype.toString.call(e)},hp=function(e){return 0===l.Children.count(e)},hb=function(e){return hf(e)&&hl(e.then)};function hm(e,t,n,r){void 0===r&&(r=0);for(var i=d8(t);e&&r<i.length;)e=e[i[r++]];return void 0===e?n:e}function hg(e,t,n){for(var r=dj(e),i=r,a=0,o=d8(t);a<o.length-1;a++){var s=o[a],u=hm(e,o.slice(0,a+1));if(u&&(hf(u)||Array.isArray(u)))i=i[s]=dj(u);else{var c=o[a+1];i=i[s]=hd(c)&&Number(c)>=0?[]:{}}}return(0===a?e:i)[o[a]]===n?e:(void 0===n?delete i[o[a]]:i[o[a]]=n,0===a&&void 0===n&&delete r[o[a]],r)}function hv(e,t,n,r){void 0===n&&(n=new WeakMap),void 0===r&&(r={});for(var i=0,a=Object.keys(e);i<a.length;i++){var o=a[i],s=e[o];hf(s)?n.get(s)||(n.set(s,!0),r[o]=Array.isArray(s)?[]:{},hv(s,t,n,r[o])):r[o]=t}return r}var hy=(0,l.createContext)(void 0),hw=hy.Provider;function h_(){var e=(0,l.useContext)(hy);return e||he(!1),e}function hE(e,t){switch(t.type){case"SET_VALUES":return ha({},e,{values:t.payload});case"SET_TOUCHED":return ha({},e,{touched:t.payload});case"SET_ERRORS":if(sd()(e.errors,t.payload))return e;return ha({},e,{errors:t.payload});case"SET_STATUS":return ha({},e,{status:t.payload});case"SET_ISSUBMITTING":return ha({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return ha({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return ha({},e,{values:hg(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return ha({},e,{touched:hg(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return ha({},e,{errors:hg(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return ha({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return ha({},e,{touched:hv(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":case"SUBMIT_SUCCESS":return ha({},e,{isSubmitting:!1});default:return e}}hy.Consumer;var hS={},hk={};function hx(e){var t=e.validateOnChange,n=void 0===t||t,r=e.validateOnBlur,i=void 0===r||r,a=e.validateOnMount,o=void 0!==a&&a,s=e.isInitialValid,u=e.enableReinitialize,c=void 0!==u&&u,f=e.onSubmit,d=hs(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),h=ha({validateOnChange:n,validateOnBlur:i,validateOnMount:o,onSubmit:f},d),p=(0,l.useRef)(h.initialValues),b=(0,l.useRef)(h.initialErrors||hS),m=(0,l.useRef)(h.initialTouched||hk),g=(0,l.useRef)(h.initialStatus),v=(0,l.useRef)(!1),y=(0,l.useRef)({});(0,l.useEffect)(function(){return v.current=!0,function(){v.current=!1}},[]);var w=(0,l.useReducer)(hE,{values:h.initialValues,errors:h.initialErrors||hS,touched:h.initialTouched||hk,status:h.initialStatus,isSubmitting:!1,isValidating:!1,submitCount:0}),_=w[0],E=w[1],S=(0,l.useCallback)(function(e,t){return new Promise(function(n,r){var i=h.validate(e,t);null==i?n(hS):hb(i)?i.then(function(e){n(e||hS)},function(e){r(e)}):n(i)})},[h.validate]),k=(0,l.useCallback)(function(e,t){var n=h.validationSchema,r=hl(n)?n(t):n,i=t&&r.validateAt?r.validateAt(t,e):hO(e,r);return new Promise(function(e,t){i.then(function(){e(hS)},function(n){"ValidationError"===n.name?e(hM(n)):t(n)})})},[h.validationSchema]),x=(0,l.useCallback)(function(e,t){return new Promise(function(n){return n(y.current[e].validate(t))})},[]),T=(0,l.useCallback)(function(e){var t=Object.keys(y.current).filter(function(e){return hl(y.current[e].validate)});return Promise.all(t.length>0?t.map(function(t){return x(t,hm(e,t))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")]).then(function(e){return e.reduce(function(e,n,r){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===n||n&&(e=hg(e,t[r],n)),e},{})})},[x]),M=(0,l.useCallback)(function(e){return Promise.all([T(e),h.validationSchema?k(e):{},h.validate?S(e):{}]).then(function(e){var t=e[0],n=e[1],r=e[2];return sk.all([t,n,r],{arrayMerge:hL})})},[h.validate,h.validationSchema,T,S,k]),O=hN(function(e){return void 0===e&&(e=_.values),E({type:"SET_ISVALIDATING",payload:!0}),M(e).then(function(e){return v.current&&(E({type:"SET_ISVALIDATING",payload:!1}),sd()(_.errors,e)||E({type:"SET_ERRORS",payload:e})),e})});(0,l.useEffect)(function(){o&&!0===v.current&&sd()(p.current,h.initialValues)&&O(p.current)},[o,O]);var A=(0,l.useCallback)(function(e){var t=e&&e.values?e.values:p.current,n=e&&e.errors?e.errors:b.current?b.current:h.initialErrors||{},r=e&&e.touched?e.touched:m.current?m.current:h.initialTouched||{},i=e&&e.status?e.status:g.current?g.current:h.initialStatus;p.current=t,b.current=n,m.current=r,g.current=i;var a=function(){E({type:"RESET_FORM",payload:{isSubmitting:!!e&&!!e.isSubmitting,errors:n,touched:r,status:i,values:t,isValidating:!!e&&!!e.isValidating,submitCount:e&&e.submitCount&&"number"==typeof e.submitCount?e.submitCount:0}})};if(h.onReset){var o=h.onReset(_.values,V);hb(o)?o.then(a):a()}else a()},[h.initialErrors,h.initialStatus,h.initialTouched]);(0,l.useEffect)(function(){!0===v.current&&!sd()(p.current,h.initialValues)&&(c&&(p.current=h.initialValues,A()),o&&O(p.current))},[c,h.initialValues,A,o,O]),(0,l.useEffect)(function(){c&&!0===v.current&&!sd()(b.current,h.initialErrors)&&(b.current=h.initialErrors||hS,E({type:"SET_ERRORS",payload:h.initialErrors||hS}))},[c,h.initialErrors]),(0,l.useEffect)(function(){c&&!0===v.current&&!sd()(m.current,h.initialTouched)&&(m.current=h.initialTouched||hk,E({type:"SET_TOUCHED",payload:h.initialTouched||hk}))},[c,h.initialTouched]),(0,l.useEffect)(function(){c&&!0===v.current&&!sd()(g.current,h.initialStatus)&&(g.current=h.initialStatus,E({type:"SET_STATUS",payload:h.initialStatus}))},[c,h.initialStatus,h.initialTouched]);var L=hN(function(e){if(y.current[e]&&hl(y.current[e].validate)){var t=hm(_.values,e),n=y.current[e].validate(t);return hb(n)?(E({type:"SET_ISVALIDATING",payload:!0}),n.then(function(e){return e}).then(function(t){E({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),E({type:"SET_ISVALIDATING",payload:!1})})):(E({type:"SET_FIELD_ERROR",payload:{field:e,value:n}}),Promise.resolve(n))}return h.validationSchema?(E({type:"SET_ISVALIDATING",payload:!0}),k(_.values,e).then(function(e){return e}).then(function(t){E({type:"SET_FIELD_ERROR",payload:{field:e,value:t[e]}}),E({type:"SET_ISVALIDATING",payload:!1})})):Promise.resolve()}),C=(0,l.useCallback)(function(e,t){var n=t.validate;y.current[e]={validate:n}},[]),I=(0,l.useCallback)(function(e){delete y.current[e]},[]),D=hN(function(e,t){return E({type:"SET_TOUCHED",payload:e}),(void 0===t?i:t)?O(_.values):Promise.resolve()}),N=(0,l.useCallback)(function(e){E({type:"SET_ERRORS",payload:e})},[]),P=hN(function(e,t){var r=hl(e)?e(_.values):e;return E({type:"SET_VALUES",payload:r}),(void 0===t?n:t)?O(r):Promise.resolve()}),R=(0,l.useCallback)(function(e,t){E({type:"SET_FIELD_ERROR",payload:{field:e,value:t}})},[]),j=hN(function(e,t,r){return E({type:"SET_FIELD_VALUE",payload:{field:e,value:t}}),(void 0===r?n:r)?O(hg(_.values,e,t)):Promise.resolve()}),F=(0,l.useCallback)(function(e,t){var n,r=t,i=e;if(!hh(e)){e.persist&&e.persist();var a=e.target?e.target:e.currentTarget,o=a.type,s=a.name,u=a.id,c=a.value,l=a.checked,f=(a.outerHTML,a.options),d=a.multiple;r=t||s||u,i=/number|range/.test(o)?(n=parseFloat(c),isNaN(n)?"":n):/checkbox/.test(o)?hI(hm(_.values,r),l,c):d?hC(f):c}r&&j(r,i)},[j,_.values]),Y=hN(function(e){if(hh(e))return function(t){return F(t,e)};F(e)}),B=hN(function(e,t,n){return void 0===t&&(t=!0),E({type:"SET_FIELD_TOUCHED",payload:{field:e,value:t}}),(void 0===n?i:n)?O(_.values):Promise.resolve()}),U=(0,l.useCallback)(function(e,t){e.persist&&e.persist();var n,r=e.target,i=r.name,a=r.id;r.outerHTML,B(t||i||a,!0)},[B]),H=hN(function(e){if(hh(e))return function(t){return U(t,e)};U(e)}),$=(0,l.useCallback)(function(e){hl(e)?E({type:"SET_FORMIK_STATE",payload:e}):E({type:"SET_FORMIK_STATE",payload:function(){return e}})},[]),z=(0,l.useCallback)(function(e){E({type:"SET_STATUS",payload:e})},[]),G=(0,l.useCallback)(function(e){E({type:"SET_ISSUBMITTING",payload:e})},[]),W=hN(function(){return E({type:"SUBMIT_ATTEMPT"}),O().then(function(e){var t,n=e instanceof Error;if(!n&&0===Object.keys(e).length){try{if(void 0===(t=q()))return}catch(r){throw r}return Promise.resolve(t).then(function(e){return v.current&&E({type:"SUBMIT_SUCCESS"}),e}).catch(function(e){if(v.current)throw E({type:"SUBMIT_FAILURE"}),e})}if(v.current&&(E({type:"SUBMIT_FAILURE"}),n))throw e})}),K=hN(function(e){e&&e.preventDefault&&hl(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&hl(e.stopPropagation)&&e.stopPropagation(),W().catch(function(e){console.warn("Warning: An unhandled error was caught from submitForm()",e)})}),V={resetForm:A,validateForm:O,validateField:L,setErrors:N,setFieldError:R,setFieldTouched:B,setFieldValue:j,setStatus:z,setSubmitting:G,setTouched:D,setValues:P,setFormikState:$,submitForm:W},q=hN(function(){return f(_.values,V)}),Z=hN(function(e){e&&e.preventDefault&&hl(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&hl(e.stopPropagation)&&e.stopPropagation(),A()}),X=(0,l.useCallback)(function(e){return{value:hm(_.values,e),error:hm(_.errors,e),touched:!!hm(_.touched,e),initialValue:hm(p.current,e),initialTouched:!!hm(m.current,e),initialError:hm(b.current,e)}},[_.errors,_.touched,_.values]),J=(0,l.useCallback)(function(e){return{setValue:function(t,n){return j(e,t,n)},setTouched:function(t,n){return B(e,t,n)},setError:function(t){return R(e,t)}}},[j,B,R]),Q=(0,l.useCallback)(function(e){var t=hf(e),n=t?e.name:e,r=hm(_.values,n),i={name:n,value:r,onChange:Y,onBlur:H};if(t){var a=e.type,o=e.value,s=e.as,u=e.multiple;"checkbox"===a?void 0===o?i.checked=!!r:(i.checked=!!(Array.isArray(r)&&~r.indexOf(o)),i.value=o):"radio"===a?(i.checked=r===o,i.value=o):"select"===s&&u&&(i.value=i.value||[],i.multiple=!0)}return i},[H,Y,_.values]),ee=(0,l.useMemo)(function(){return!sd()(p.current,_.values)},[p.current,_.values]),et=(0,l.useMemo)(function(){return void 0!==s?ee?_.errors&&0===Object.keys(_.errors).length:!1!==s&&hl(s)?s(h):s:_.errors&&0===Object.keys(_.errors).length},[s,ee,_.errors,h]);return ha({},_,{initialValues:p.current,initialErrors:b.current,initialTouched:m.current,initialStatus:g.current,handleBlur:H,handleChange:Y,handleReset:Z,handleSubmit:K,resetForm:A,setErrors:N,setFormikState:$,setFieldTouched:B,setFieldValue:j,setFieldError:R,setStatus:z,setSubmitting:G,setTouched:D,setValues:P,submitForm:W,validateForm:O,validateField:L,isValid:et,dirty:ee,unregisterField:I,registerField:C,getFieldProps:Q,getFieldMeta:X,getFieldHelpers:J,validateOnBlur:i,validateOnChange:n,validateOnMount:o})}function hT(e){var t=hx(e),n=e.component,r=e.children,i=e.render,a=e.innerRef;return(0,l.useImperativeHandle)(a,function(){return t}),(0,l.createElement)(hw,{value:t},n?(0,l.createElement)(n,t):i?i(t):r?hl(r)?r(t):hp(r)?null:l.Children.only(r):null)}function hM(e){var t={};if(e.inner){if(0===e.inner.length)return hg(t,e.path,e.message);for(var n=e.inner,r=Array.isArray(n),i=0,n=r?n:n[Symbol.iterator]();;){if(r){if(i>=n.length)break;a=n[i++]}else{if((i=n.next()).done)break;a=i.value}var a,o=a;hm(t,o.path)||(t=hg(t,o.path,o.message))}}return t}function hO(e,t,n,r){void 0===n&&(n=!1),void 0===r&&(r={});var i=hA(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:r})}function hA(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);!0===Array.isArray(e[r])?t[r]=e[r].map(function(e){return!0===Array.isArray(e)||sR(e)?hA(e):""!==e?e:void 0}):sR(e[r])?t[r]=hA(e[r]):t[r]=""!==e[r]?e[r]:void 0}return t}function hL(e,t,n){var r=e.slice();return t.forEach(function(t,i){if(void 0===r[i]){var a=!1!==n.clone&&n.isMergeableObject(t);r[i]=a?sk(Array.isArray(t)?[]:{},t,n):t}else n.isMergeableObject(t)?r[i]=sk(e[i],t,n):-1===e.indexOf(t)&&r.push(t)}),r}function hC(e){return Array.from(e).filter(function(e){return e.selected}).map(function(e){return e.value})}function hI(e,t,n){if("boolean"==typeof e)return Boolean(t);var r=[],i=!1,a=-1;if(Array.isArray(e))r=e,i=(a=e.indexOf(n))>=0;else if(!n||"true"==n||"false"==n)return Boolean(t);return t&&n&&!i?r.concat(n):i?r.slice(0,a).concat(r.slice(a+1)):r}var hD="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?l.useLayoutEffect:l.useEffect;function hN(e){var t=(0,l.useRef)(e);return hD(function(){t.current=e}),(0,l.useCallback)(function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.current.apply(void 0,n)},[])}function hP(e){var t=e.validate,n=e.name,r=e.render,i=e.children,a=e.as,o=e.component,s=hs(e,["validate","name","render","children","as","component"]),u=h_(),c=hs(u,["validate","validationSchema"]),f=c.registerField,d=c.unregisterField;(0,l.useEffect)(function(){return f(n,{validate:t}),function(){d(n)}},[f,d,n,t]);var h=c.getFieldProps(ha({name:n},s)),p=c.getFieldMeta(n),b={field:h,form:c};if(r)return r(ha({},b,{meta:p}));if(hl(i))return i(ha({},b,{meta:p}));if(o){if("string"==typeof o){var m=s.innerRef,g=hs(s,["innerRef"]);return(0,l.createElement)(o,ha({ref:m},h,g),i)}return(0,l.createElement)(o,ha({field:h,form:c},s),i)}var v=a||"input";if("string"==typeof v){var y=s.innerRef,w=hs(s,["innerRef"]);return(0,l.createElement)(v,ha({ref:y},h,w),i)}return(0,l.createElement)(v,ha({},h,s),i)}var hR=(0,l.forwardRef)(function(e,t){var n=e.action,r=hs(e,["action"]),i=n||"#",a=h_(),o=a.handleReset,s=a.handleSubmit;return(0,l.createElement)("form",Object.assign({onSubmit:s,ref:t,onReset:o,action:i},r))});hR.displayName="Form";var hj=function(e,t,n){var r=hU(e),i=r[t];return r.splice(t,1),r.splice(n,0,i),r},hF=function(e,t,n){var r=hU(e),i=r[t];return r[t]=r[n],r[n]=i,r},hY=function(e,t,n){var r=hU(e);return r.splice(t,0,n),r},hB=function(e,t,n){var r=hU(e);return r[t]=n,r},hU=function(e){if(!e)return[];if(Array.isArray(e))return[].concat(e);var t=Object.keys(e).map(function(e){return parseInt(e)}).reduce(function(e,t){return t>e?t:e},0);return Array.from(ha({},e,{length:t+1}))};(function(e){function t(t){var n;return(n=e.call(this,t)||this).updateArrayField=function(e,t,r){var i=n.props,a=i.name;(0,i.formik.setFormikState)(function(n){var i="function"==typeof r?r:e,o="function"==typeof t?t:e,s=hg(n.values,a,e(hm(n.values,a))),u=r?i(hm(n.errors,a)):void 0,c=t?o(hm(n.touched,a)):void 0;return hc(u)&&(u=void 0),hc(c)&&(c=void 0),ha({},n,{values:s,errors:r?hg(n.errors,a,u):n.errors,touched:t?hg(n.touched,a,c):n.touched})})},n.push=function(e){return n.updateArrayField(function(t){return[].concat(hU(t),[hi(e)])},!1,!1)},n.handlePush=function(e){return function(){return n.push(e)}},n.swap=function(e,t){return n.updateArrayField(function(n){return hF(n,e,t)},!0,!0)},n.handleSwap=function(e,t){return function(){return n.swap(e,t)}},n.move=function(e,t){return n.updateArrayField(function(n){return hj(n,e,t)},!0,!0)},n.handleMove=function(e,t){return function(){return n.move(e,t)}},n.insert=function(e,t){return n.updateArrayField(function(n){return hY(n,e,t)},function(t){return hY(t,e,null)},function(t){return hY(t,e,null)})},n.handleInsert=function(e,t){return function(){return n.insert(e,t)}},n.replace=function(e,t){return n.updateArrayField(function(n){return hB(n,e,t)},!1,!1)},n.handleReplace=function(e,t){return function(){return n.replace(e,t)}},n.unshift=function(e){var t=-1;return n.updateArrayField(function(n){var r=n?[e].concat(n):[e];return t<0&&(t=r.length),r},function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n},function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n}),t},n.handleUnshift=function(e){return function(){return n.unshift(e)}},n.handleRemove=function(e){return function(){return n.remove(e)}},n.handlePop=function(){return function(){return n.pop()}},n.remove=n.remove.bind(hu(n)),n.pop=n.pop.bind(hu(n)),n}ho(t,e);var n=t.prototype;return n.componentDidUpdate=function(e){this.props.validateOnChange&&this.props.formik.validateOnChange&&!sd()(hm(e.formik.values,e.name),hm(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},n.remove=function(e){var t;return this.updateArrayField(function(n){var r=n?hU(n):[];return t||(t=r[e]),hl(r.splice)&&r.splice(e,1),r},!0,!0),t},n.pop=function(){var e;return this.updateArrayField(function(t){var n=t;return e||(e=n&&n.pop&&n.pop()),n},!0,!0),e},n.render=function(){var e={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},t=this.props,n=t.component,r=t.render,i=t.children,a=t.name,o=hs(t.formik,["validate","validationSchema"]),s=ha({},e,{form:o,name:a});return n?(0,l.createElement)(n,s):r?r(s):i?"function"==typeof i?i(s):hp(i)?null:l.Children.only(i):null},t})(l.Component).defaultProps={validateOnChange:!0},l.Component,l.Component;var hH=n(24802),h$=n(71209),hz=n(91750),hG=n(11970),hW=n(4689),hK=n(67598),hV=function(){return(hV=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function hq(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&(n[r[i]]=e[r[i]]);return n}function hZ(e){var t=e.disabled,n=e.field,r=n.onBlur,i=hq(n,["onBlur"]),a=e.form,o=a.isSubmitting,s=a.touched,u=a.errors,c=e.onBlur,l=e.helperText,f=hq(e,["disabled","field","form","onBlur","helperText"]),d=hm(u,i.name),h=hm(s,i.name)&&!!d;return hV(hV({variant:f.variant,error:h,helperText:h?d:l,disabled:null!=t?t:o,onBlur:null!=c?c:function(e){r(null!=e?e:i.name)}},i),f)}function hX(e){var t=e.children,n=hq(e,["children"]);return(0,l.createElement)(iw.Z,hV({},hZ(n)),t)}function hJ(e){var t=e.disabled,n=e.field,r=n.onBlur,i=hq(n,["onBlur"]),a=e.form.isSubmitting,o=(e.type,e.onBlur),s=hq(e,["disabled","field","form","type","onBlur"]);return hV(hV({disabled:null!=t?t:a,onBlur:null!=o?o:function(e){r(null!=e?e:i.name)}},i),s)}function hQ(e){return(0,l.createElement)(hH.Z,hV({},hJ(e)))}function h1(e){var t,n=e.disabled,r=e.field,i=r.onBlur,a=hq(r,["onBlur"]),o=e.form.isSubmitting,s=(e.type,e.onBlur),u=hq(e,["disabled","field","form","type","onBlur"]);return hV(hV({disabled:null!=n?n:o,indeterminate:!Array.isArray(a.value)&&null==a.value,onBlur:null!=s?s:function(e){i(null!=e?e:a.name)}},a),u)}function h0(e){return(0,l.createElement)(h$.Z,hV({},h1(e)))}function h2(e){var t=e.Label,n=hq(e,["Label"]);return(0,l.createElement)(hz.Z,hV({control:(0,l.createElement)(h$.Z,hV({},h1(n)))},t))}function h3(e){var t=e.disabled,n=e.field,r=n.onBlur,i=hq(n,["onBlur"]),a=e.form.isSubmitting,o=e.onBlur,s=hq(e,["disabled","field","form","onBlur"]);return hV(hV({disabled:null!=t?t:a,onBlur:null!=o?o:function(e){r(null!=e?e:i.name)}},i),s)}function h4(e){return(0,l.createElement)(hG.default,hV({},h3(e)))}function h6(e){var t=e.field,n=t.onBlur,r=hq(t,["onBlur"]),i=(e.form,e.onBlur),a=hq(e,["field","form","onBlur"]);return hV(hV({onBlur:null!=i?i:function(e){n(null!=e?e:r.name)}},r),a)}function h5(e){return(0,l.createElement)(hW.Z,hV({},h6(e)))}function h8(e){var t=e.disabled,n=e.field,r=n.onBlur,i=hq(n,["onBlur"]),a=e.form.isSubmitting,o=e.onBlur,s=hq(e,["disabled","field","form","onBlur"]);return hV(hV({disabled:null!=t?t:a,onBlur:null!=o?o:function(e){r(null!=e?e:i.name)}},i),s)}function h9(e){return(0,l.createElement)(hK.default,hV({},h8(e)))}hX.displayName="FormikMaterialUITextField",hQ.displayName="FormikMaterialUISwitch",h0.displayName="FormikMaterialUICheckbox",h2.displayName="FormikMaterialUICheckboxWithLabel",h4.displayName="FormikMaterialUISelect",h5.displayName="FormikMaterialUIRadioGroup",h9.displayName="FormikMaterialUIInputBase";try{a=Map}catch(h7){}try{o=Set}catch(pe){}function pt(e,t,n){if(!e||"object"!=typeof e||"function"==typeof e)return e;if(e.nodeType&&"cloneNode"in e)return e.cloneNode(!0);if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return RegExp(e);if(Array.isArray(e))return e.map(pn);if(a&&e instanceof a)return new Map(Array.from(e.entries()));if(o&&e instanceof o)return new Set(Array.from(e.values()));if(e instanceof Object){t.push(e);var r=Object.create(e);for(var i in n.push(r),e){var s=t.findIndex(function(t){return t===e[i]});r[i]=s>-1?n[s]:pt(e[i],t,n)}return r}return e}function pn(e){return pt(e,[],[])}let pr=Object.prototype.toString,pi=Error.prototype.toString,pa=RegExp.prototype.toString,po="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",ps=/^Symbol\((.*)\)(.*)$/;function pu(e){if(e!=+e)return"NaN";let t=0===e&&1/e<0;return t?"-0":""+e}function pc(e,t=!1){if(null==e||!0===e||!1===e)return""+e;let n=typeof e;if("number"===n)return pu(e);if("string"===n)return t?`"${e}"`:e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return po.call(e).replace(ps,"Symbol($1)");let r=pr.call(e).slice(8,-1);return"Date"===r?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===r||e instanceof Error?"["+pi.call(e)+"]":"RegExp"===r?pa.call(e):null}function pl(e,t){let n=pc(e,t);return null!==n?n:JSON.stringify(e,function(e,n){let r=pc(this[e],t);return null!==r?r:n},2)}let pf={default:"${path} is invalid",required:"${path} is a required field",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType({path:e,type:t,value:n,originalValue:r}){let i=null!=r&&r!==n,a=`${e} must be a \`${t}\` type, but the final value was: \`${pl(n,!0)}\``+(i?` (cast from the value \`${pl(r,!0)}\`).`:".");return null===n&&(a+='\n If "null" is intended as an empty value be sure to mark the schema as `.nullable()`'),a},defined:"${path} must be defined"},pd={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},ph={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},pp={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},pb={isValue:"${path} field must be ${value}"},pm={noUnknown:"${path} field has unspecified keys: ${unknown}"},pg={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must be have ${length} items"};Object.assign(Object.create(null),{mixed:pf,string:pd,number:ph,date:pp,object:pm,array:pg,boolean:pb});var pv=n(18721),py=n.n(pv);let pw=e=>e&&e.__isYupSchema__;class p_{constructor(e,t){if(this.refs=e,this.refs=e,"function"==typeof t){this.fn=t;return}if(!py()(t,"is"))throw TypeError("`is:` is required for `when()` conditions");if(!t.then&&!t.otherwise)throw TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:r,otherwise:i}=t,a="function"==typeof n?n:(...e)=>e.every(e=>e===n);this.fn=function(...e){let t=e.pop(),n=e.pop(),o=a(...e)?r:i;if(o)return"function"==typeof o?o(n):n.concat(o.resolve(t))}}resolve(e,t){let n=this.refs.map(e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context)),r=this.fn.apply(e,n.concat(e,t));if(void 0===r||r===e)return e;if(!pw(r))throw TypeError("conditions must return a schema object");return r.resolve(t)}}let pE=p_;function pS(e){return null==e?[]:[].concat(e)}function pk(){return(pk=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}let px=/\$\{\s*(\w+)\s*\}/g;class pT extends Error{static formatError(e,t){let n=t.label||t.path||"this";return(n!==t.path&&(t=pk({},t,{path:n})),"string"==typeof e)?e.replace(px,(e,n)=>pl(t[n])):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,n,r){super(),this.name="ValidationError",this.value=t,this.path=n,this.type=r,this.errors=[],this.inner=[],pS(e).forEach(e=>{pT.isError(e)?(this.errors.push(...e.errors),this.inner=this.inner.concat(e.inner.length?e.inner:e)):this.errors.push(e)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,pT)}}let pM=e=>{let t=!1;return(...n)=>{t||(t=!0,e(...n))}};function pO(e,t){let{endEarly:n,tests:r,args:i,value:a,errors:o,sort:s,path:u}=e,c=pM(t),l=r.length,f=[];if(o=o||[],!l)return o.length?c(new pT(o,a,u)):c(null,a);for(let d=0;d<r.length;d++){let h=r[d];h(i,function(e){if(e){if(!pT.isError(e))return c(e,a);if(n)return e.value=a,c(e,a);f.push(e)}if(--l<=0){if(f.length&&(s&&f.sort(s),o.length&&f.push(...o),o=f),o.length){c(new pT(o,a,u),a);return}c(null,a)}})}}var pA=n(66604),pL=n.n(pA),pC=n(55760);let pI={context:"$",value:"."};class pD{constructor(e,t={}){if("string"!=typeof e)throw TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw TypeError("ref must be a non-empty string");this.isContext=this.key[0]===pI.context,this.isValue=this.key[0]===pI.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?pI.context:this.isValue?pI.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&(0,pC.getter)(this.path,!0),this.map=t.map}getValue(e,t,n){let r=this.isContext?n:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}function pN(){return(pN=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function pP(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function pR(e){function t(t,n){let{value:r,path:i="",label:a,options:o,originalValue:s,sync:u}=t,c=pP(t,["value","path","label","options","originalValue","sync"]),{name:l,test:f,params:d,message:h}=e,{parent:p,context:b}=o;function m(e){return pD.isRef(e)?e.getValue(r,p,b):e}function g(e={}){let t=pL()(pN({value:r,originalValue:s,label:a,path:e.path||i},d,e.params),m),n=new pT(pT.formatError(e.message||h,t),r,t.path,e.type||l);return n.params=t,n}let v=pN({path:i,parent:p,type:l,createError:g,resolve:m,options:o,originalValue:s},c);if(!u){try{Promise.resolve(f.call(v,r,v)).then(e=>{pT.isError(e)?n(e):e?n(null,e):n(g())})}catch(y){n(y)}return}let w;try{var _;if(w=f.call(v,r,v),"function"==typeof(null==(_=w)?void 0:_.then))throw Error(`Validation test of type: "${v.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`)}catch(E){n(E);return}pT.isError(w)?n(w):w?n(null,w):n(g())}return t.OPTIONS=e,t}pD.prototype.__isYupRef=!0;let pj=e=>e.substr(0,e.length-1).substr(1);function pF(e,t,n,r=n){let i,a,o;return t?((0,pC.forEach)(t,(s,u,c)=>{let l=u?pj(s):s;if((e=e.resolve({context:r,parent:i,value:n})).innerType){let f=c?parseInt(l,10):0;if(n&&f>=n.length)throw Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${t}. because there is no value at that index. `);i=n,n=n&&n[f],e=e.innerType}if(!c){if(!e.fields||!e.fields[l])throw Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e._type}")`);i=n,n=n&&n[l],e=e.fields[l]}a=l,o=u?"["+s+"]":"."+s}),{schema:e,parent:i,parentPath:a}):{parent:i,parentPath:t,schema:e}}class pY{constructor(){this.list=new Set,this.refs=new Map}get size(){return this.list.size+this.refs.size}describe(){let e=[];for(let t of this.list)e.push(t);for(let[,n]of this.refs)e.push(n.describe());return e}toArray(){return Array.from(this.list).concat(Array.from(this.refs.values()))}add(e){pD.isRef(e)?this.refs.set(e.key,e):this.list.add(e)}delete(e){pD.isRef(e)?this.refs.delete(e.key):this.list.delete(e)}has(e,t){if(this.list.has(e))return!0;let n,r=this.refs.values();for(;!(n=r.next()).done;)if(t(n.value)===e)return!0;return!1}clone(){let e=new pY;return e.list=new Set(this.list),e.refs=new Map(this.refs),e}merge(e,t){let n=this.clone();return e.list.forEach(e=>n.add(e)),e.refs.forEach(e=>n.add(e)),t.list.forEach(e=>n.delete(e)),t.refs.forEach(e=>n.delete(e)),n}}function pB(){return(pB=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}class pU{constructor(e){this.deps=[],this.conditions=[],this._whitelist=new pY,this._blacklist=new pY,this.exclusiveTests=Object.create(null),this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(pf.notType)}),this.type=(null==e?void 0:e.type)||"mixed",this.spec=pB({strip:!1,strict:!1,abortEarly:!0,recursive:!0,nullable:!1,presence:"optional"},null==e?void 0:e.spec)}get _type(){return this.type}_typeCheck(e){return!0}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;let t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeError=this._typeError,t._whitelistError=this._whitelistError,t._blacklistError=this._blacklistError,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.exclusiveTests=pB({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=pn(pB({},this.spec,e)),t}label(e){var t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=t,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,n=e.clone(),r=pB({},t.spec,n.spec);return n.spec=r,n._typeError||(n._typeError=t._typeError),n._whitelistError||(n._whitelistError=t._whitelistError),n._blacklistError||(n._blacklistError=t._blacklistError),n._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),n.tests=t.tests,n.exclusiveTests=t.exclusiveTests,n.withMutation(t=>{e.tests.forEach(e=>{t.test(e.OPTIONS)})}),n}isType(e){return!!this.spec.nullable&&null===e||this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let n=t.conditions;(t=t.clone()).conditions=[],t=(t=n.reduce((t,n)=>n.resolve(t,e),t)).resolve(e)}return t}cast(e,t={}){let n=this.resolve(pB({value:e},t)),r=n._cast(e,t);if(void 0!==e&&!1!==t.assert&&!0!==n.isType(r)){let i=pl(e),a=pl(r);throw TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${n._type}". attempted value: ${i} -`+(a!==i?`result of cast: ${a}`:""))}return r}_cast(e,t){let n=void 0===e?e:this.transforms.reduce((t,n)=>n.call(this,t,e,this),e);return void 0===n&&(n=this.getDefault()),n}_validate(e,t={},n){let{sync:r,path:i,from:a=[],originalValue:o=e,strict:s=this.spec.strict,abortEarly:u=this.spec.abortEarly}=t,c=e;s||(c=this._cast(c,pB({assert:!1},t)));let l={value:c,path:i,options:t,originalValue:o,schema:this,label:this.spec.label,sync:r,from:a},f=[];this._typeError&&f.push(this._typeError),this._whitelistError&&f.push(this._whitelistError),this._blacklistError&&f.push(this._blacklistError),pO({args:l,value:c,path:i,sync:r,tests:f,endEarly:u},e=>{if(e)return void n(e,c);pO({tests:this.tests,args:l,path:i,sync:r,value:c,endEarly:u},n)})}validate(e,t,n){let r=this.resolve(pB({},t,{value:e}));return"function"==typeof n?r._validate(e,t,n):new Promise((n,i)=>r._validate(e,t,(e,t)=>{e?i(e):n(t)}))}validateSync(e,t){let n;return this.resolve(pB({},t,{value:e}))._validate(e,pB({},t,{sync:!0}),(e,t)=>{if(e)throw e;n=t}),n}isValid(e,t){return this.validate(e,t).then(()=>!0,e=>{if(pT.isError(e))return!1;throw e})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(n){if(pT.isError(n))return!1;throw n}}_getDefault(){let e=this.spec.default;return null==e?e:"function"==typeof e?e.call(this):pn(e)}getDefault(e){return this.resolve(e||{})._getDefault()}default(e){return 0===arguments.length?this._getDefault():this.clone({default:e})}strict(e=!0){var t=this.clone();return t.spec.strict=e,t}_isPresent(e){return null!=e}defined(e=pf.defined){return this.test({message:e,name:"defined",exclusive:!0,test:e=>void 0!==e})}required(e=pf.required){return this.clone({presence:"required"}).withMutation(t=>t.test({message:e,name:"required",exclusive:!0,test(e){return this.schema._isPresent(e)}}))}notRequired(){var e=this.clone({presence:"optional"});return e.tests=e.tests.filter(e=>"required"!==e.OPTIONS.name),e}nullable(e=!0){return this.clone({nullable:!1!==e})}transform(e){var t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(void 0===(t=1===e.length?"function"==typeof e[0]?{test:e[0]}:e[0]:2===e.length?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]}).message&&(t.message=pf.default),"function"!=typeof t.test)throw TypeError("`test` is a required parameters");let n=this.clone(),r=pR(t),i=t.exclusive||t.name&&!0===n.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(n.exclusiveTests[t.name]=!!t.exclusive),n.tests=n.tests.filter(e=>e.OPTIONS.name!==t.name||!i&&e.OPTIONS.test!==r.OPTIONS.test),n.tests.push(r),n}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let n=this.clone(),r=pS(e).map(e=>new pD(e));return r.forEach(e=>{e.isSibling&&n.deps.push(e.key)}),n.conditions.push(new pE(r,t)),n}typeError(e){var t=this.clone();return t._typeError=pR({message:e,name:"typeError",test(e){return!!(void 0===e||this.schema.isType(e))||this.createError({params:{type:this.schema._type}})}}),t}oneOf(e,t=pf.oneOf){var n=this.clone();return e.forEach(e=>{n._whitelist.add(e),n._blacklist.delete(e)}),n._whitelistError=pR({message:t,name:"oneOf",test(e){if(void 0===e)return!0;let t=this.schema._whitelist;return!!t.has(e,this.resolve)||this.createError({params:{values:t.toArray().join(", ")}})}}),n}notOneOf(e,t=pf.notOneOf){var n=this.clone();return e.forEach(e=>{n._blacklist.add(e),n._whitelist.delete(e)}),n._blacklistError=pR({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist;return!t.has(e,this.resolve)||this.createError({params:{values:t.toArray().join(", ")}})}}),n}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(){let e=this.clone(),{label:t,meta:n}=e.spec,r={meta:n,label:t,type:e.type,oneOf:e._whitelist.describe(),notOneOf:e._blacklist.describe(),tests:e.tests.map(e=>({name:e.OPTIONS.name,params:e.OPTIONS.params})).filter((e,t,n)=>n.findIndex(t=>t.name===e.name)===t)};return r}}for(let pH of(pU.prototype.__isYupSchema__=!0,["validate","validateSync"]))pU.prototype[`${pH}At`]=function(e,t,n={}){let{parent:r,parentPath:i,schema:a}=pF(this,e,t,n.context);return a[pH](r&&r[i],pB({},n,{parent:r,path:e}))};for(let p$ of["equals","is"])pU.prototype[p$]=pU.prototype.oneOf;for(let pz of["not","nope"])pU.prototype[pz]=pU.prototype.notOneOf;pU.prototype.optional=pU.prototype.notRequired;let pG=pU;function pW(){return new pG}pW.prototype=pG.prototype;let pK=e=>null==e;function pV(){return new pq}class pq extends pU{constructor(){super({type:"boolean"}),this.withMutation(()=>{this.transform(function(e){if(!this.isType(e)){if(/^(true|1)$/i.test(String(e)))return!0;if(/^(false|0)$/i.test(String(e)))return!1}return e})})}_typeCheck(e){return e instanceof Boolean&&(e=e.valueOf()),"boolean"==typeof e}isTrue(e=pb.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test:e=>pK(e)||!0===e})}isFalse(e=pb.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test:e=>pK(e)||!1===e})}}pV.prototype=pq.prototype;let pZ=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,pX=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,pJ=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,pQ=e=>pK(e)||e===e.trim(),p1=({}).toString();function p0(){return new p2}class p2 extends pU{constructor(){super({type:"string"}),this.withMutation(()=>{this.transform(function(e){if(this.isType(e)||Array.isArray(e))return e;let t=null!=e&&e.toString?e.toString():e;return t===p1?e:t})})}_typeCheck(e){return e instanceof String&&(e=e.valueOf()),"string"==typeof e}_isPresent(e){return super._isPresent(e)&&!!e.length}length(e,t=pd.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},test(t){return pK(t)||t.length===this.resolve(e)}})}min(e,t=pd.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return pK(t)||t.length>=this.resolve(e)}})}max(e,t=pd.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},test(t){return pK(t)||t.length<=this.resolve(e)}})}matches(e,t){let n=!1,r,i;return t&&("object"==typeof t?{excludeEmptyString:n=!1,message:r,name:i}=t:r=t),this.test({name:i||"matches",message:r||pd.matches,params:{regex:e},test:t=>pK(t)||""===t&&n||-1!==t.search(e)})}email(e=pd.email){return this.matches(pZ,{name:"email",message:e,excludeEmptyString:!0})}url(e=pd.url){return this.matches(pX,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=pd.uuid){return this.matches(pJ,{name:"uuid",message:e,excludeEmptyString:!1})}ensure(){return this.default("").transform(e=>null===e?"":e)}trim(e=pd.trim){return this.transform(e=>null!=e?e.trim():e).test({message:e,name:"trim",test:pQ})}lowercase(e=pd.lowercase){return this.transform(e=>pK(e)?e:e.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,test:e=>pK(e)||e===e.toLowerCase()})}uppercase(e=pd.uppercase){return this.transform(e=>pK(e)?e:e.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,test:e=>pK(e)||e===e.toUpperCase()})}}p0.prototype=p2.prototype;let p3=e=>e!=+e;function p4(){return new p6}class p6 extends pU{constructor(){super({type:"number"}),this.withMutation(()=>{this.transform(function(e){let t=e;if("string"==typeof t){if(""===(t=t.replace(/\s/g,"")))return NaN;t=+t}return this.isType(t)?t:parseFloat(t)})})}_typeCheck(e){return e instanceof Number&&(e=e.valueOf()),"number"==typeof e&&!p3(e)}min(e,t=ph.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return pK(t)||t>=this.resolve(e)}})}max(e,t=ph.max){return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(t){return pK(t)||t<=this.resolve(e)}})}lessThan(e,t=ph.lessThan){return this.test({message:t,name:"max",exclusive:!0,params:{less:e},test(t){return pK(t)||t<this.resolve(e)}})}moreThan(e,t=ph.moreThan){return this.test({message:t,name:"min",exclusive:!0,params:{more:e},test(t){return pK(t)||t>this.resolve(e)}})}positive(e=ph.positive){return this.moreThan(0,e)}negative(e=ph.negative){return this.lessThan(0,e)}integer(e=ph.integer){return this.test({name:"integer",message:e,test:e=>pK(e)||Number.isInteger(e)})}truncate(){return this.transform(e=>pK(e)?e:0|e)}round(e){var t,n=["ceil","floor","round","trunc"];if("trunc"===(e=(null==(t=e)?void 0:t.toLowerCase())||"round"))return this.truncate();if(-1===n.indexOf(e.toLowerCase()))throw TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(t=>pK(t)?t:Math[e](t))}}p4.prototype=p6.prototype;var p5=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;function p8(e){var t,n,r=[1,4,5,6,7,10,11],i=0;if(n=p5.exec(e)){for(var a,o=0;a=r[o];++o)n[a]=+n[a]||0;n[2]=(+n[2]||1)-1,n[3]=+n[3]||1,n[7]=n[7]?String(n[7]).substr(0,3):0,(void 0===n[8]||""===n[8])&&(void 0===n[9]||""===n[9])?t=+new Date(n[1],n[2],n[3],n[4],n[5],n[6],n[7]):("Z"!==n[8]&&void 0!==n[9]&&(i=60*n[10]+n[11],"+"===n[9]&&(i=0-i)),t=Date.UTC(n[1],n[2],n[3],n[4],n[5]+i,n[6],n[7]))}else t=Date.parse?Date.parse(e):NaN;return t}let p9=new Date(""),p7=e=>"[object Date]"===Object.prototype.toString.call(e);function be(){return new bt}class bt extends pU{constructor(){super({type:"date"}),this.withMutation(()=>{this.transform(function(e){return this.isType(e)?e:(e=p8(e),isNaN(e)?p9:new Date(e))})})}_typeCheck(e){return p7(e)&&!isNaN(e.getTime())}prepareParam(e,t){let n;if(pD.isRef(e))n=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);n=r}return n}min(e,t=pp.min){let n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(e){return pK(e)||e>=this.resolve(n)}})}max(e,t=pp.max){var n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(e){return pK(e)||e<=this.resolve(n)}})}}bt.INVALID_DATE=p9,be.prototype=bt.prototype,be.INVALID_DATE=p9;var bn=n(11865),br=n.n(bn),bi=n(68929),ba=n.n(bi),bo=n(67523),bs=n.n(bo),bu=n(94633),bc=n.n(bu);function bl(e,t=[]){let n=[],r=[];function i(e,i){var a=(0,pC.split)(e)[0];~r.indexOf(a)||r.push(a),~t.indexOf(`${i}-${a}`)||n.push([i,a])}for(let a in e)if(py()(e,a)){let o=e[a];~r.indexOf(a)||r.push(a),pD.isRef(o)&&o.isSibling?i(o.path,a):pw(o)&&"deps"in o&&o.deps.forEach(e=>i(e,a))}return bc().array(r,n).reverse()}function bf(e,t){let n=1/0;return e.some((e,r)=>{var i;if((null==(i=t.path)?void 0:i.indexOf(e))!==-1)return n=r,!0}),n}function bd(e){return(t,n)=>bf(e,t)-bf(e,n)}function bh(){return(bh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}let bp=e=>"[object Object]"===Object.prototype.toString.call(e);function bb(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(e=>-1===n.indexOf(e))}let bm=bd([]);class bg extends pU{constructor(e){super({type:"object"}),this.fields=Object.create(null),this._sortErrors=bm,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{this.transform(function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e=null}return this.isType(e)?e:null}),e&&this.shape(e)})}_typeCheck(e){return bp(e)||"function"==typeof e}_cast(e,t={}){var n;let r=super._cast(e,t);if(void 0===r)return this.getDefault();if(!this._typeCheck(r))return r;let i=this.fields,a=null!=(n=t.stripUnknown)?n:this.spec.noUnknown,o=this._nodes.concat(Object.keys(r).filter(e=>-1===this._nodes.indexOf(e))),s={},u=bh({},t,{parent:s,__validating:t.__validating||!1}),c=!1;for(let l of o){let f=i[l],d=py()(r,l);if(f){let h,p=r[l];u.path=(t.path?`${t.path}.`:"")+l;let b="spec"in(f=f.resolve({value:p,context:t.context,parent:s}))?f.spec:void 0,m=null==b?void 0:b.strict;if(null==b?void 0:b.strip){c=c||l in r;continue}void 0!==(h=t.__validating&&m?r[l]:f.cast(r[l],u))&&(s[l]=h)}else d&&!a&&(s[l]=r[l]);s[l]!==r[l]&&(c=!0)}return c?s:r}_validate(e,t={},n){let r=[],{sync:i,from:a=[],originalValue:o=e,abortEarly:s=this.spec.abortEarly,recursive:u=this.spec.recursive}=t;a=[{schema:this,value:o},...a],t.__validating=!0,t.originalValue=o,t.from=a,super._validate(e,t,(e,c)=>{if(e){if(!pT.isError(e)||s)return void n(e,c);r.push(e)}if(!u||!bp(c)){n(r[0]||null,c);return}o=o||c;let l=this._nodes.map(e=>(n,r)=>{let i=-1===e.indexOf(".")?(t.path?`${t.path}.`:"")+e:`${t.path||""}["${e}"]`,s=this.fields[e];if(s&&"validate"in s){s.validate(c[e],bh({},t,{path:i,from:a,strict:!0,parent:c,originalValue:o[e]}),r);return}r(null)});pO({sync:i,tests:l,value:c,errors:r,endEarly:s,sort:this._sortErrors,path:t.path},n)})}clone(e){let t=super.clone(e);return t.fields=bh({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),n=t.fields;for(let[r,i]of Object.entries(this.fields)){let a=n[r];void 0===a?n[r]=i:a instanceof pU&&i instanceof pU&&(n[r]=i.concat(a))}return t.withMutation(()=>t.shape(n))}getDefaultFromShape(){let e={};return this._nodes.forEach(t=>{let n=this.fields[t];e[t]="default"in n?n.getDefault():void 0}),e}_getDefault(){return"default"in this.spec?super._getDefault():this._nodes.length?this.getDefaultFromShape():void 0}shape(e,t=[]){let n=this.clone(),r=Object.assign(n.fields,e);if(n.fields=r,n._sortErrors=bd(Object.keys(r)),t.length){Array.isArray(t[0])||(t=[t]);let i=t.map(([e,t])=>`${e}-${t}`);n._excludedEdges=n._excludedEdges.concat(i)}return n._nodes=bl(r,n._excludedEdges),n}pick(e){let t={};for(let n of e)this.fields[n]&&(t[n]=this.fields[n]);return this.clone().withMutation(e=>(e.fields={},e.shape(t)))}omit(e){let t=this.clone(),n=t.fields;for(let r of(t.fields={},e))delete n[r];return t.withMutation(()=>t.shape(n))}from(e,t,n){let r=(0,pC.getter)(e,!0);return this.transform(i=>{if(null==i)return i;let a=i;return py()(i,e)&&(a=bh({},i),n||delete a[e],a[t]=r(i)),a})}noUnknown(e=!0,t=pm.noUnknown){"string"==typeof e&&(t=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;let n=bb(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,t=pm.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>t&&bs()(t,(t,n)=>e(n)))}camelCase(){return this.transformKeys(ba())}snakeCase(){return this.transformKeys(br())}constantCase(){return this.transformKeys(e=>br()(e).toUpperCase())}describe(){let e=super.describe();return e.fields=pL()(this.fields,e=>e.describe()),e}}function bv(e){return new bg(e)}function by(){return(by=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function bw(e){return new b_(e)}bv.prototype=bg.prototype;class b_ extends pU{constructor(e){super({type:"array"}),this.innerType=e,this.withMutation(()=>{this.transform(function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e=null}return this.isType(e)?e:null})})}_typeCheck(e){return Array.isArray(e)}get _subType(){return this.innerType}_cast(e,t){let n=super._cast(e,t);if(!this._typeCheck(n)||!this.innerType)return n;let r=!1,i=n.map((e,n)=>{let i=this.innerType.cast(e,by({},t,{path:`${t.path||""}[${n}]`}));return i!==e&&(r=!0),i});return r?i:n}_validate(e,t={},n){var r,i;let a=[],o=t.sync,s=t.path,u=this.innerType,c=null!=(r=t.abortEarly)?r:this.spec.abortEarly,l=null!=(i=t.recursive)?i:this.spec.recursive,f=null!=t.originalValue?t.originalValue:e;super._validate(e,t,(e,r)=>{if(e){if(!pT.isError(e)||c)return void n(e,r);a.push(e)}if(!l||!u||!this._typeCheck(r)){n(a[0]||null,r);return}f=f||r;let i=Array(r.length);for(let d=0;d<r.length;d++){let h=r[d],p=`${t.path||""}[${d}]`,b=by({},t,{path:p,strict:!0,parent:r,index:d,originalValue:f[d]});i[d]=(e,t)=>u.validate(h,b,t)}pO({sync:o,path:s,value:r,errors:a,endEarly:c,tests:i},n)})}clone(e){let t=super.clone(e);return t.innerType=this.innerType,t}concat(e){let t=super.concat(e);return t.innerType=this.innerType,e.innerType&&(t.innerType=t.innerType?t.innerType.concat(e.innerType):e.innerType),t}of(e){let t=this.clone();if(!pw(e))throw TypeError("`array.of()` sub-schema must be a valid yup schema not: "+pl(e));return t.innerType=e,t}length(e,t=pg.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},test(t){return pK(t)||t.length===this.resolve(e)}})}min(e,t){return t=t||pg.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return pK(t)||t.length>=this.resolve(e)}})}max(e,t){return t=t||pg.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(t){return pK(t)||t.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,t)=>this._typeCheck(e)?e:null==t?[]:[].concat(t))}compact(e){let t=e?(t,n,r)=>!e(t,n,r):e=>!!e;return this.transform(e=>null!=e?e.filter(t):e)}describe(){let e=super.describe();return this.innerType&&(e.innerType=this.innerType.describe()),e}nullable(e=!0){return super.nullable(e)}defined(){return super.defined()}required(e){return super.required(e)}}bw.prototype=b_.prototype;var bE=bv().shape({name:p0().required("Required"),url:p0().required("Required")}),bS=function(e){var t=e.initialValues,n=e.onSubmit,r=e.submitButtonText,i=e.nameDisabled,a=void 0!==i&&i;return l.createElement(hT,{initialValues:t,validationSchema:bE,onSubmit:n},function(e){var t=e.isSubmitting;return l.createElement(l.Fragment,null,l.createElement(hR,{"data-testid":"bridge-form",noValidate:!0},l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:12,md:7},l.createElement(hP,{component:hX,id:"name",name:"name",label:"Name",disabled:a,required:!0,fullWidth:!0,FormHelperTextProps:{"data-testid":"name-helper-text"}})),l.createElement(d.Z,{item:!0,xs:12,md:7},l.createElement(hP,{component:hX,id:"url",name:"url",label:"Bridge URL",placeholder:"https://",required:!0,fullWidth:!0,FormHelperTextProps:{"data-testid":"url-helper-text"}})),l.createElement(d.Z,{item:!0,xs:12,md:7},l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:7},l.createElement(hP,{component:hX,id:"minimumContractPayment",name:"minimumContractPayment",label:"Minimum Contract Payment",placeholder:"0",fullWidth:!0,inputProps:{min:0},FormHelperTextProps:{"data-testid":"minimumContractPayment-helper-text"}})),l.createElement(d.Z,{item:!0,xs:7},l.createElement(hP,{component:hX,id:"confirmations",name:"confirmations",label:"Confirmations",placeholder:"0",type:"number",fullWidth:!0,inputProps:{min:0},FormHelperTextProps:{"data-testid":"confirmations-helper-text"}})))),l.createElement(d.Z,{item:!0,xs:12,md:7},l.createElement(ok.default,{variant:"contained",color:"primary",type:"submit",disabled:t,size:"large"},r)))))})},bk=function(e){var t=e.bridge,n=e.onSubmit,r={name:t.name,url:t.url,minimumContractPayment:t.minimumContractPayment,confirmations:t.confirmations};return l.createElement(ig,null,l.createElement(d.Z,{container:!0,spacing:40},l.createElement(d.Z,{item:!0,xs:12,md:11,lg:9},l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Edit Bridge",action:l.createElement(aA.Z,{component:tz,href:"/bridges/".concat(t.id)},"Cancel")}),l.createElement(aW.Z,null,l.createElement(bS,{nameDisabled:!0,initialValues:r,onSubmit:n,submitButtonText:"Save Bridge"}))))))};function bx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function bT(e){if(Array.isArray(e))return e}function bM(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function bO(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){bM(a,r,i,o,s,"next",e)}function s(e){bM(a,r,i,o,s,"throw",e)}o(void 0)})}}function bA(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bL(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function bC(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function bI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){bA(e,t,n[t])})}return e}function bD(e,t){return bT(e)||bL(e,t)||bP(e,t)||bC()}function bN(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function bP(e,t){if(e){if("string"==typeof e)return bx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bx(e,t)}}var bR=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};function bj(){var e=bN(["\n mutation UpdateBridge($id: ID!, $input: UpdateBridgeInput!) {\n updateBridge(id: $id, input: $input) {\n ... on UpdateBridgeSuccess {\n bridge {\n id\n }\n }\n ... on NotFoundError {\n message\n }\n }\n }\n"]);return bj=function(){return e},e}var bF=n0(bj()),bY=function(e){var t=e.id;return l.createElement(l.Fragment,null,l.createElement("span",null,"Successfully updated"),l.createElement(tz,{href:"/bridges/".concat(t)},t))},bB=function(){var e=(0,h.UO)().id,t=(0,A.I0)(),n=oq().handleMutationError,r=rv(o9,{variables:{id:e}}),i=r.data,a=r.loading,o=r.error,s=bD(oo(bF,{refetchQueries:[{query:o9,variables:{id:e}}]}),1)[0];if(a)return l.createElement(iR,null);if(o)return l.createElement(iD,{error:o});var u,c=(u=bO(function(r){var i,a,o,u,c,f;return bR(this,function(d){switch(d.label){case 0:return d.trys.push([0,2,,3]),[4,s(((o={}).variables={id:e,input:bI({},r)},o))];case 1:switch(u=null===(i=(a=d.sent()).data)||void 0===i?void 0:i.updateBridge,c={},null==u?void 0:u.__typename){case"UpdateBridgeSuccess":t((0,ty.t5)(function(){return l.createElement(bY,{id:u.bridge.id})},c));break;case"NotFoundError":t((0,ty.LO)(u.message))}return[3,3];case 2:return n(f=d.sent()),[3,3];case 3:return[2]}})}),function(e){return u.apply(this,arguments)}),f=null==i?void 0:i.bridge;switch(null==f?void 0:f.__typename){case"Bridge":return l.createElement(bk,{onSubmit:c,bridge:f});case"NotFoundError":return l.createElement(oa,null);default:return null}},bU={name:"",url:"",minimumContractPayment:"0",confirmations:0},bH=function(e){var t=e.onSubmit;return l.createElement(ig,null,l.createElement(d.Z,{container:!0,spacing:40},l.createElement(d.Z,{item:!0,xs:12,md:11,lg:9},l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"New Bridge"}),l.createElement(aW.Z,null,l.createElement(bS,{initialValues:bU,onSubmit:t,submitButtonText:"Create Bridge"}))))))};function b$(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function bz(e){if(Array.isArray(e))return e}function bG(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function bW(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){bG(a,r,i,o,s,"next",e)}function s(e){bG(a,r,i,o,s,"throw",e)}o(void 0)})}}function bK(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bV(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function bq(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function bZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){bK(e,t,n[t])})}return e}function bX(e,t){return bz(e)||bV(e,t)||bQ(e,t)||bq()}function bJ(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function bQ(e,t){if(e){if("string"==typeof e)return b$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b$(e,t)}}var b1=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};function b0(){var e=bJ(["\n mutation CreateBridge($input: CreateBridgeInput!) {\n createBridge(input: $input) {\n ... on CreateBridgeSuccess {\n bridge {\n id\n }\n incomingToken\n }\n }\n }\n"]);return b0=function(){return e},e}var b2=n0(b0()),b3=function(e){var t=e.id,n=e.incomingToken;return l.createElement(l.Fragment,null,l.createElement("span",null,"Successfully created bridge\xa0"),l.createElement(tz,{href:"/bridges/".concat(t)},t),l.createElement("span",null,"\xa0with incoming access token: ",n))},b4=function(){var e,t=(0,A.I0)(),n=oq().handleMutationError,r=bX(oo(b2),1)[0],i=(e=bW(function(e){var i,a,o,s,u,c;return b1(this,function(f){switch(f.label){case 0:return f.trys.push([0,2,,3]),[4,r(((o={}).variables={input:bZ({},e)},o))];case 1:return s=null===(i=(a=f.sent()).data)||void 0===i?void 0:i.createBridge,u={},(null==s?void 0:s.__typename)==="CreateBridgeSuccess"&&t((0,ty.t5)(function(){return l.createElement(b3,{id:s.bridge.id,incomingToken:s.incomingToken})},u)),[3,3];case 2:return n(c=f.sent()),[3,3];case 3:return[2]}})}),function(t){return e.apply(this,arguments)});return l.createElement(bH,{onSubmit:i})},b6=function(){var e=(0,h.$B)().path;return l.createElement(h.rs,null,l.createElement(h.AW,{exact:!0,path:"".concat(e,"/new")},l.createElement(b4,null)),l.createElement(h.AW,{path:"".concat(e,"/:id/edit")},l.createElement(bB,null)),l.createElement(h.AW,{path:"".concat(e,"/:id")},l.createElement(se,null)),l.createElement(h.AW,{exact:!0,path:e},l.createElement(sc,null)))},b5=n(48403),b8=n.n(b5),b9=n(24815),b7=n(66289);function me(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function mt(e){if(Array.isArray(e))return e}function mn(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function mr(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function mi(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ma(e,t){return mt(e)||mr(e,t)||mo(e,t)||mi()}function mo(e,t){if(e){if("string"==typeof e)return me(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return me(e,t)}}var ms=function(){var e=ma(l.useState(),2),t=e[0],n=e[1],r=(0,h.k6)(),i=(0,A.I0)();l.useEffect(function(){mn(t,b7._7)&&(i((0,ty.Jc)()),r.push("/signin"))},[i,t,r]);var a=t?function(){return l.createElement("div",null,"Error:"," ",mn(t,Error)?t.message:JSON.stringify(t))}:function(){return null};return{error:t,ErrorComponent:a,setError:n}},mu=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=e?function(){return l.createElement(x.default,{variant:"body1"},"Loading...")}:function(){return null};return{isLoading:e,LoadingPlaceholder:t}},mc=n(76023);function ml(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function mf(e){if(Array.isArray(e))return e}function md(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function mh(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){md(a,r,i,o,s,"next",e)}function s(e){md(a,r,i,o,s,"throw",e)}o(void 0)})}}function mp(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function mb(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function mm(e,t){return mf(e)||mp(e,t)||mg(e,t)||mb()}function mg(e,t){if(e){if("string"==typeof e)return ml(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ml(e,t)}}var mv=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},my=["debug","info","warn","error"],mw=function(e){return(0,b.createStyles)({actions:{display:"flex",justifyContent:"flex-end",marginTop:.5*e.spacing.unit},logLevelHelperText:{marginTop:-8}})},m_=(0,b.withStyles)(mw)(function(e){var t,n=e.classes,r=e.initialValues,i=(0,A.I0)(),a=hx({initialValues:r,onSubmit:(t=mh(function(e){var t,n,r,a;return mv(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=((n={}).level=e.level,n.sqlEnabled=e.sqlEnabled,n),[4,iG.v2.logConfig.updateLogConfig(t)];case 1:return o.sent(),r={},i((0,ty.t5)(function(){return l.createElement(l.Fragment,null,"Logging Configuration Updated")},r)),[3,3];case 2:return a=o.sent(),i((0,ty.cB)(aN,a)),[3,3];case 3:return[2]}})}),function(e){return t.apply(this,arguments)})});return l.createElement("form",{onSubmit:a.handleSubmit,"data-testid":"logging-form"},l.createElement(iw.Z,{id:"select-level",name:"level",fullWidth:!0,select:!0,label:"Log Level",value:a.values.level,defaultValue:r.defaultLogLevel,onChange:a.handleChange,error:a.touched.level&&Boolean(a.errors.level),helperText:"Override the LOG_LEVEL environment variable (until restart)"},my.map(function(e){return l.createElement(tE.default,{key:e,value:e},b8()(e).concat(e===r.defaultLogLevel?" (default)":""))})),l.createElement(b9.default,null,l.createElement(hz.Z,{name:"sqlEnabled",control:l.createElement(l.Fragment,null,l.createElement(h$.Z,{id:"sqlEnabled",name:"sqlEnabled",disabled:"debug"!==a.values.level,checked:a.values.sqlEnabled&&"debug"===a.values.level,onChange:a.handleChange})),label:"Log SQL Statements (debug only)"}),l.createElement(mc.default,{className:n.logLevelHelperText},"Override the LOG_SQL environment variable (until restart)")),l.createElement("br",null),l.createElement("div",{className:n.actions},l.createElement(aA.Z,{variant:"primary",type:"submit",disabled:a.isSubmitting},"Update")))}),mE=function(){var e=mm((0,l.useState)(null),2),t=e[0],n=e[1],r=ms(),i=r.error,a=r.ErrorComponent,o=r.setError,s=mu(!i&&!t).LoadingPlaceholder;return(0,l.useEffect)(function(){function e(){return t.apply(this,arguments)}function t(){return(t=mh(function(){var e,t,r,i,a,s,u,c,l;return mv(this,function(f){switch(f.label){case 0:return f.trys.push([0,2,,3]),[4,iG.v2.logConfig.getLogConfig()];case 1:return t=(e=f.sent()).data.attributes.serviceName.findIndex(function(e){return"Global"==e}),r=e.data.attributes.logLevel[t],i=e.data.attributes.defaultLogLevel,a=e.data.attributes.serviceName.findIndex(function(e){return"IsSqlEnabled"==e}),s="true"==e.data.attributes.logLevel[a],n(u=((c={}).defaultLogLevel=i,c.level=r,c.sqlEnabled=s,c)),[3,3];case 2:return o(l=f.sent()),[3,3];case 3:return[2]}})})).apply(this,arguments)}e()},[o]),l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Logging"}),l.createElement(aW.Z,null,l.createElement(s,null),l.createElement(a,null),t&&l.createElement(m_,{initialValues:t})))};function mS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function mk(e){if(Array.isArray(e))return e}function mx(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function mT(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){mx(a,r,i,o,s,"next",e)}function s(e){mx(a,r,i,o,s,"throw",e)}o(void 0)})}}function mM(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function mO(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function mA(e,t){return mk(e)||mM(e,t)||mL(e,t)||mO()}function mL(e,t){if(e){if("string"==typeof e)return mS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mS(e,t)}}var mC=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},mI=function(e){return(0,b.createStyles)({confirmDialog:{width:400},deleteCell:{"&:last-child":{paddingRight:1.5*e.spacing.unit}},deleteIcon:{fontSize:20}})},mD=6048e5,mN=(0,b.withStyles)(mI)(function(e){var t,n=e.classes,r=(0,A.I0)(),i=new Date(Date.now()-mD).toISOString(),a=mA((0,l.useState)(!1),2),o=a[0],s=a[1],u=(t=mT(function(){var e,t;return mC(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,r((0,ty.Iw)(i))];case 1:return n.sent(),e={},r((0,ty.t5)(function(){return l.createElement(l.Fragment,null,"Deleted completed job runs")},e)),s(!1),[3,3];case 2:return t=n.sent(),r((0,ty.LO)("Something went wrong")),[3,3];case 3:return[2]}})}),function(){return t.apply(this,arguments)});return l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Job Runs",subheader:"Reduce the database size by deleting old job runs"}),l.createElement(r8.Z,null,l.createElement(r9.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,l.createElement(x.default,null,"Errored Runs"),l.createElement(x.default,{variant:"subtitle2",color:"textSecondary"},"Keeps runs from the last week")),l.createElement(r7.default,{align:"right",className:n.deleteCell},l.createElement(y.default,{onClick:function(){return s(!0)},"data-cy":"delete-errored-job-runs"},l.createElement(ou.Z,{className:n.deleteIcon,color:"error"})))))),l.createElement(oC,{open:o,title:"Delete errored jobs runs",body:"Are you sure you want to delete all errored job runs up to\n ".concat(aw()(i).format("dddd, MMMM Do YYYY, h:mm:ss a"),"?"),confirmButtonText:"Confirm",onConfirm:u,cancelButtonText:"Cancel",onCancel:function(){return s(!1)}}))}),mP=n(16939),mR=n(80366),mj=n(37254),mF=n(63366);function mY(e,t){if(null==e)return{};var n,r,i=(0,mF.Z)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function mB(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function mU(e){if(Array.isArray(e))return mB(e)}function mH(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function m$(e,t){if(e){if("string"==typeof e)return mB(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mB(e,t)}}function mz(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function mG(e){return mU(e)||mH(e)||m$(e)||mz()}var mW=n(4942);function mK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})),r.forEach(function(t){(0,mW.Z)(e,t,n[t])})}return e}var mV=n(87462);function mq(e){var t=e.length;return 0===t||1===t?e:2===t?[e[0],e[1],"".concat(e[0],".").concat(e[1]),"".concat(e[1],".").concat(e[0])]:3===t?[e[0],e[1],e[2],"".concat(e[0],".").concat(e[1]),"".concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[0]),"".concat(e[1],".").concat(e[2]),"".concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[1],".").concat(e[0])]:t>=4?[e[0],e[1],e[2],e[3],"".concat(e[0],".").concat(e[1]),"".concat(e[0],".").concat(e[2]),"".concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[0]),"".concat(e[1],".").concat(e[2]),"".concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[1]),"".concat(e[2],".").concat(e[3]),"".concat(e[3],".").concat(e[0]),"".concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[0]),"".concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[1],".").concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[2],".").concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[3],".").concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[2],".").concat(e[1],".").concat(e[0])]:void 0}var mZ={};function mX(e){if(0===e.length||1===e.length)return e;var t=e.join(".");return mZ[t]||(mZ[t]=mq(e)),mZ[t]}function mJ(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return mX(e.filter(function(e){return"token"!==e})).reduce(function(e,t){return mK({},e,n[t])},t)}function mQ(e){return e.join(" ")}function m1(e,t){var n=0;return function(r){return n+=1,r.map(function(r,i){return m0({node:r,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(i)})})}}function m0(e){var t=e.node,n=e.stylesheet,r=e.style,i=void 0===r?{}:r,a=e.useInlineStyles,o=e.key,s=t.properties,u=t.type,c=t.tagName,f=t.value;if("text"===u)return f;if(c){var d,h=m1(n,a);if(a){var p=Object.keys(n).reduce(function(e,t){return t.split(".").forEach(function(t){e.includes(t)||e.push(t)}),e},[]),b=s.className&&s.className.includes("token")?["token"]:[],m=s.className&&b.concat(s.className.filter(function(e){return!p.includes(e)}));d=mK({},s,{className:mQ(m)||void 0,style:mJ(s.className,Object.assign({},s.style,i),n)})}else d=mK({},s,{className:mQ(s.className)});var g=h(t.children);return l.createElement(c,(0,mV.Z)({key:o},d),g)}}let m2=function(e,t){return -1!==e.listLanguages().indexOf(t)};var m3=/\n/g;function m4(e){return e.match(m3)}function m6(e){var t=e.lines,n=e.startingLineNumber,r=e.style;return t.map(function(e,t){var i=t+n;return l.createElement("span",{key:"line-".concat(t),className:"react-syntax-highlighter-line-number",style:"function"==typeof r?r(i):r},"".concat(i,"\n"))})}function m5(e){var t=e.codeString,n=e.codeStyle,r=e.containerStyle,i=void 0===r?{float:"left",paddingRight:"10px"}:r,a=e.numberStyle,o=void 0===a?{}:a,s=e.startingLineNumber;return l.createElement("code",{style:Object.assign({},n,i)},m6({lines:t.replace(/\n$/,"").split("\n"),style:o,startingLineNumber:s}))}function m8(e){return"".concat(e.toString().length,".25em")}function m9(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function m7(e,t,n){var r,i={display:"inline-block",minWidth:m8(n),paddingRight:"1em",textAlign:"right",userSelect:"none"};return mK({},i,"function"==typeof e?e(t):e)}function ge(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,i=e.largestLineNumber,a=e.showInlineLineNumbers,o=e.lineProps,s=void 0===o?{}:o,u=e.className,c=void 0===u?[]:u,l=e.showLineNumbers,f=e.wrapLongLines,d="function"==typeof s?s(n):s;if(d.className=c,n&&a){var h=m7(r,n,i);t.unshift(m9(n,h))}return f&l&&(d.style=mK({},d.style,{display:"flex"})),{type:"element",tagName:"span",properties:d,children:t}}function gt(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=0;r<e.length;r++){var i=e[r];if("text"===i.type)n.push(ge({children:[i],className:mG(new Set(t))}));else if(i.children){var a=t.concat(i.properties.className);n=n.concat(gt(i.children,a))}}return n}function gn(e,t,n,r,i,a,o,s,u){var c,l=gt(e.value),f=[],d=-1,h=0;function p(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return ge({children:e,lineNumber:t,lineNumberStyle:s,largestLineNumber:o,showInlineLineNumbers:i,lineProps:n,className:a,showLineNumbers:r,wrapLongLines:u})}function b(e,t){if(r&&t&&i){var n=m7(s,t,o);e.unshift(m9(t,n))}return e}function m(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return t||r.length>0?p(e,n,r):b(e,n)}for(var g=function(){var e=l[h],t=e.children[0].value;if(m4(t)){var n=t.split("\n");n.forEach(function(t,i){var o=r&&f.length+a,s={type:"text",value:"".concat(t,"\n")};if(0===i){var u=l.slice(d+1,h).concat(ge({children:[s],className:e.properties.className})),c=m(u,o);f.push(c)}else if(i===n.length-1){if(l[h+1]&&l[h+1].children&&l[h+1].children[0]){var p={type:"text",value:"".concat(t)},b=ge({children:[p],className:e.properties.className});l.splice(h+1,0,b)}else{var g=[s],v=m(g,o,e.properties.className);f.push(v)}}else{var y=[s],w=m(y,o,e.properties.className);f.push(w)}}),d=h}h++};h<l.length;)g();if(d!==l.length-1){var v=l.slice(d+1,l.length);if(v&&v.length){var y=r&&f.length+a,w=m(v,y);f.push(w)}}return t?f:(c=[]).concat.apply(c,f)}function gr(e){var t=e.rows,n=e.stylesheet,r=e.useInlineStyles;return t.map(function(e,t){return m0({node:e,stylesheet:n,useInlineStyles:r,key:"code-segement".concat(t)})})}function gi(e){return e&&void 0!==e.highlightAuto}function ga(e){var t=e.astGenerator,n=e.language,r=e.code,i=e.defaultCodeValue;if(gi(t)){var a=m2(t,n);return"text"===n?{value:i,language:"text"}:a?t.highlight(n,r):t.highlightAuto(r)}try{return n&&"text"!==n?{value:t.highlight(r,n)}:{value:i}}catch(o){return{value:i}}}function go(e,t){return function(n){var r=n.language,i=n.children,a=n.style,o=void 0===a?t:a,s=n.customStyle,u=void 0===s?{}:s,c=n.codeTagProps,f=void 0===c?{className:r?"language-".concat(r):void 0,style:mK({},o['code[class*="language-"]'],o['code[class*="language-'.concat(r,'"]')])}:c,d=n.useInlineStyles,h=void 0===d||d,p=n.showLineNumbers,b=void 0!==p&&p,m=n.showInlineLineNumbers,g=void 0===m||m,v=n.startingLineNumber,y=void 0===v?1:v,w=n.lineNumberContainerStyle,_=n.lineNumberStyle,E=void 0===_?{}:_,S=n.wrapLines,k=n.wrapLongLines,x=void 0!==k&&k,T=n.lineProps,M=void 0===T?{}:T,O=n.renderer,A=n.PreTag,L=void 0===A?"pre":A,C=n.CodeTag,I=void 0===C?"code":C,D=n.code,N=void 0===D?Array.isArray(i)?i[0]:i:D,P=n.astGenerator,R=mY(n,["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"]);P=P||e;var j=b?l.createElement(m5,{containerStyle:w,codeStyle:f.style||{},numberStyle:E,startingLineNumber:y,codeString:N}):null,F=o.hljs||o['pre[class*="language-"]']||{backgroundColor:"#fff"},Y=gi(P)?"hljs":"prismjs",B=h?Object.assign({},R,{style:Object.assign({},F,u)}):Object.assign({},R,{className:R.className?"".concat(Y," ").concat(R.className):Y,style:Object.assign({},u)});if(!P)return l.createElement(L,B,j,l.createElement(I,f,N));(void 0===S&&O||x)&&(S=!0),O=O||gr;var U=[{type:"text",value:N}],H=ga({astGenerator:P,language:r,code:N,defaultCodeValue:U});null===H.language&&(H.value=U);var $=H.value.length+y,z=gn(H,S,M,b,g,y,$,E,x);return x?f.style=mK({},f.style,{whiteSpace:"pre-wrap"}):f.style=mK({},f.style,{whiteSpace:"pre"}),l.createElement(L,B,l.createElement(I,f,!g&&j,O({rows:z,stylesheet:o,useInlineStyles:h})))}}let gs={'code[class*="language-"]':{color:"black",background:"none",textShadow:"0 1px white",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"black",background:"#f5f2f0",textShadow:"0 1px white",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"]::selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#b3d4fc"},':not(pre) > code[class*="language-"]':{background:"#f5f2f0",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"slategray"},prolog:{color:"slategray"},doctype:{color:"slategray"},cdata:{color:"slategray"},punctuation:{color:"#999"},namespace:{Opacity:".7"},property:{color:"#905"},tag:{color:"#905"},boolean:{color:"#905"},number:{color:"#905"},constant:{color:"#905"},symbol:{color:"#905"},deleted:{color:"#905"},selector:{color:"#690"},"attr-name":{color:"#690"},string:{color:"#690"},char:{color:"#690"},builtin:{color:"#690"},inserted:{color:"#690"},operator:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},entity:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)",cursor:"help"},url:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".language-css .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".style .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},atrule:{color:"#07a"},"attr-value":{color:"#07a"},keyword:{color:"#07a"},function:{color:"#DD4A68"},"class-name":{color:"#DD4A68"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"bold"},variable:{color:"#e90"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}};var gu=n(98695),gc=n.n(gu);let gl=["abap","abnf","actionscript","ada","agda","al","antlr4","apacheconf","apl","applescript","aql","arduino","arff","asciidoc","asm6502","aspnet","autohotkey","autoit","bash","basic","batch","bbcode","birb","bison","bnf","brainfuck","brightscript","bro","bsl","c","cil","clike","clojure","cmake","coffeescript","concurnas","cpp","crystal","csharp","csp","css-extras","css","cypher","d","dart","dax","dhall","diff","django","dns-zone-file","docker","ebnf","editorconfig","eiffel","ejs","elixir","elm","erb","erlang","etlua","excel-formula","factor","firestore-security-rules","flow","fortran","fsharp","ftl","gcode","gdscript","gedcom","gherkin","git","glsl","gml","go","graphql","groovy","haml","handlebars","haskell","haxe","hcl","hlsl","hpkp","hsts","http","ichigojam","icon","iecst","ignore","inform7","ini","io","j","java","javadoc","javadoclike","javascript","javastacktrace","jolie","jq","js-extras","js-templates","jsdoc","json","json5","jsonp","jsstacktrace","jsx","julia","keyman","kotlin","latex","latte","less","lilypond","liquid","lisp","livescript","llvm","lolcode","lua","makefile","markdown","markup-templating","markup","matlab","mel","mizar","mongodb","monkey","moonscript","n1ql","n4js","nand2tetris-hdl","naniscript","nasm","neon","nginx","nim","nix","nsis","objectivec","ocaml","opencl","oz","parigp","parser","pascal","pascaligo","pcaxis","peoplecode","perl","php-extras","php","phpdoc","plsql","powerquery","powershell","processing","prolog","properties","protobuf","pug","puppet","pure","purebasic","purescript","python","q","qml","qore","r","racket","reason","regex","renpy","rest","rip","roboconf","robotframework","ruby","rust","sas","sass","scala","scheme","scss","shell-session","smali","smalltalk","smarty","sml","solidity","solution-file","soy","sparql","splunk-spl","sqf","sql","stan","stylus","swift","t4-cs","t4-templating","t4-vb","tap","tcl","textile","toml","tsx","tt2","turtle","twig","typescript","typoscript","unrealscript","vala","vbnet","velocity","verilog","vhdl","vim","visual-basic","warpscript","wasm","wiki","xeora","xml-doc","xojo","xquery","yaml","yang","zig"];var gf=go(gc(),gs);gf.supportedLanguages=gl;let gd=gf;var gh=n(64566);function gp(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function gb(){var e=gp(["\n query FetchConfigV2 {\n configv2 {\n user\n effective\n }\n }\n"]);return gb=function(){return e},e}var gm=n0(gb()),gg=function(e){var t=e.children;return l.createElement(ir.Z,null,l.createElement(r7.default,{component:"th",scope:"row",colSpan:3},t))},gv=function(){return l.createElement(gg,null,"...")},gy=function(e){var t=e.children;return l.createElement(gg,null,t)},gw=function(e){var t=e.loading,n=e.toml,r=e.error,i=void 0===r?"":r,a=e.title,o=e.expanded;if(i)return l.createElement(gy,null,i);if(t)return l.createElement(gv,null);a||(a="TOML");var s={display:"block"};return l.createElement(x.default,null,l.createElement(mP.Z,{defaultExpanded:o},l.createElement(mR.Z,{expandIcon:l.createElement(gh.Z,null)},a),l.createElement(mj.Z,{style:s},l.createElement(gd,{language:"toml",style:gs},n))))},g_=function(){var e=rv(gm,{fetchPolicy:"cache-and-network"}),t=e.data,n=e.loading,r=e.error;return(null==t?void 0:t.configv2.effective)=="N/A"?l.createElement(l.Fragment,null,l.createElement(d.Z,{item:!0,xs:12},l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"TOML Configuration"}),l.createElement(gw,{title:"V2 config dump:",error:null==r?void 0:r.message,loading:n,toml:null==t?void 0:t.configv2.user,showHead:!0})))):l.createElement(l.Fragment,null,l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12},l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"TOML Configuration"}),l.createElement(gw,{title:"User specified:",error:null==r?void 0:r.message,loading:n,toml:null==t?void 0:t.configv2.user,showHead:!0,expanded:!0}),l.createElement(gw,{title:"Effective (with defaults):",error:null==r?void 0:r.message,loading:n,toml:null==t?void 0:t.configv2.effective,showHead:!0})))))},gE=n(34823),gS=function(e){return(0,b.createStyles)({cell:{paddingTop:1.5*e.spacing.unit,paddingBottom:1.5*e.spacing.unit}})},gk=(0,b.withStyles)(gS)(function(e){var t=e.classes,n=(0,A.I0)();(0,l.useEffect)(function(){n((0,ty.DQ)())});var r=(0,A.v9)(gE.N,A.wU);return l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Node"}),l.createElement(r8.Z,null,l.createElement(r9.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,{className:t.cell},l.createElement(x.default,null,"Version"),l.createElement(x.default,{variant:"subtitle1",color:"textSecondary"},r.version))),l.createElement(ir.Z,null,l.createElement(r7.default,{className:t.cell},l.createElement(x.default,null,"SHA"),l.createElement(x.default,{variant:"subtitle1",color:"textSecondary"},r.commitSHA))))))}),gx=function(){return l.createElement(ig,null,l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,sm:12,md:8},l.createElement(d.Z,{container:!0},l.createElement(g_,null))),l.createElement(d.Z,{item:!0,sm:12,md:4},l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12},l.createElement(gk,null)),l.createElement(d.Z,{item:!0,xs:12},l.createElement(mN,null)),l.createElement(d.Z,{item:!0,xs:12},l.createElement(mE,null))))))},gT=function(){return l.createElement(gx,null)},gM=function(){return l.createElement(gT,null)},gO=n(44431),gA=1e18,gL=function(e){return new gO.BigNumber(e).dividedBy(gA).toFixed(8)},gC=function(e){var t=e.keys,n=e.chainID,r=e.hideHeaderTitle;return l.createElement(l.Fragment,null,l.createElement(sl.Z,{title:!r&&"Account Balances",subheader:"Chain ID "+n}),l.createElement(aW.Z,null,l.createElement(w.default,{dense:!1,disablePadding:!0},t&&t.map(function(e,r){return l.createElement(l.Fragment,null,l.createElement(_.default,{disableGutters:!0,key:["acc-balance",n.toString(),r.toString()].join("-")},l.createElement(E.Z,{primary:l.createElement(l.Fragment,null,l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:12},l.createElement(op,{title:"Address"}),l.createElement(ob,{value:e.address})),l.createElement(d.Z,{item:!0,xs:6},l.createElement(op,{title:"Native Token Balance"}),l.createElement(ob,{value:e.ethBalance||"--"})),l.createElement(d.Z,{item:!0,xs:6},l.createElement(op,{title:"LINK Balance"}),l.createElement(ob,{value:e.linkBalance?gL(e.linkBalance):"--"}))))})),r+1<t.length&&l.createElement(aK.Z,null))}))))};function gI(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function gD(){var e=gI(["\n fragment AccountBalancesPayload_ResultsFields on EthKey {\n address\n chain {\n id\n }\n ethBalance\n isDisabled\n linkBalance\n }\n"]);return gD=function(){return e},e}var gN=n0(gD()),gP=function(e){var t=e.data,n=e.errorMsg,r=e.loading,i=null==t?void 0:t.ethKeys.results,a={};return null==i||i.forEach(function(e){void 0===a[e.chain.id]&&(a[e.chain.id]=[]),a[e.chain.id].push(e)}),l.createElement(r5.Z,null,n&&l.createElement(l.Fragment,null,l.createElement(sl.Z,{title:"Account Balances"}),l.createElement(d.Z,{item:!0,xs:12},l.createElement(ob,{value:n}))),r&&l.createElement(d.Z,{item:!0,xs:12,style:{display:"flex",justifyContent:"center"}},l.createElement(iN.Z,{"data-testid":"loading-spinner",size:24})),!(null==i?void 0:i.length)&&!r&&!n&&l.createElement(l.Fragment,null,l.createElement(sl.Z,{title:"Account Balances"}),l.createElement(d.Z,{item:!0,xs:12},l.createElement(ob,{value:"No account available"}))),i&&Object.keys(a).map(function(e,t){return l.createElement(gC,{key:e,keys:a[e],chainID:e,hideHeaderTitle:!!t})}))};function gR(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function gj(){var e=gR(["\n ","\n query FetchAccountBalances {\n ethKeys {\n results {\n ...AccountBalancesPayload_ResultsFields\n }\n }\n }\n"]);return gj=function(){return e},e}var gF=n0(gj(),gN),gY=function(){var e=rv(gF,{fetchPolicy:"cache-and-network"}),t=e.data,n=e.loading,r=e.error;return l.createElement(gP,{data:t,errorMsg:null==r?void 0:r.message,loading:n})},gB=n(21700),gU=function(e){var t=e.msg;return t?l.createElement(ir.Z,null,l.createElement(r7.default,{component:"th",scope:"row"},t)):null},gH=function(e){return(0,b.createStyles)({cell:{padding:2*e.spacing.unit}})},g$=(0,b.withStyles)(gH)(function(e){var t=e.classes;return e.visible?l.createElement(ir.Z,null,l.createElement(r7.default,{colSpan:100,align:"center",className:t.cell},l.createElement(iN.Z,{"data-testid":"loading-spinner",size:24}))):null}),gz=function(e){var t=e.children;return e.visible?l.createElement(ir.Z,null,l.createElement(r7.default,{component:"th",scope:"row"},t||"No entries to show")):null};function gG(){return(gG=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var gW=function(e){return l.createElement("svg",gG({viewBox:"0 0 48 48"},e),l.createElement("path",{d:"M24 48C10.8 48 0 37.2 0 24S10.8 0 24 0s24 10.8 24 24-10.8 24-24 24zm0-44C13 4 4 13 4 24s9 20 20 20 20-9 20-20S35 4 24 4z",fill:"transparent"}),l.createElement("circle",{cx:24,cy:24,r:20,fill:"#ffecf0"}),l.createElement("path",{d:"M16.8 30.9H31c.5 0 1-.3 1.2-.8.3-.6.3-1.2.1-1.8l-6.5-11c-.4-.8-1.1-1.3-1.9-1.4-.8.1-1.6.6-1.9 1.3l-6.4 11c-.3.6-.3 1.3.1 1.8.1.5.6.8 1.1.9zm7.1-5.5c-.4 0-.7-.4-.7-.8l-.4-3.4c0-.6.5-1.1 1.1-1.1s1.1.5 1.1 1.1l-.4 3.4c0 .4-.3.8-.7.8zm0 1.1c.6 0 1.1.5 1.1 1.1v.1c0 .6-.5 1.1-1.1 1.1s-1.1-.5-1.1-1.1c0-.6.5-1.1 1.1-1.2zm-7.1 5.8c-1 0-2-.6-2.5-1.5-.6-1-.6-2.3-.1-3.3l6.5-11.2c.6-1.2 1.8-2 3.1-2.1 1.3.1 2.5.9 3.1 2l6.5 11.1c.5 1.1.5 2.3-.1 3.4-.5.9-1.4 1.4-2.4 1.5l-14.1.1z",fillRule:"evenodd",clipRule:"evenodd",fill:"#ff4169"}))};let gK=gW;function gV(){return(gV=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var gq=function(e){return l.createElement("svg",gV({fill:"none",viewBox:"0 0 48 48"},e),l.createElement("path",{d:"M24 46C36.1503 46 46 36.1503 46 24C46 11.8497 36.1503 2 24 2C11.8497 2 2 11.8497 2 24C2 36.1503 11.8497 46 24 46Z",stroke:"white",strokeWidth:"4"}),l.createElement("path",{d:"M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44Z",fill:"#E8ECEF"}),l.createElement("path",{d:"M24.07 11.72C21.7307 11.722 19.4445 12.4175 17.5003 13.7186C15.5562 15.0197 14.0415 16.868 13.1476 19.0298C12.2538 21.1916 12.0209 23.5699 12.4785 25.864C12.9361 28.1582 14.0636 30.2651 15.7185 31.9186C17.3733 33.5721 19.4812 34.6978 21.7758 35.1534C24.0703 35.6091 26.4484 35.3742 28.6095 34.4785C30.7705 33.5829 32.6175 32.0666 33.917 30.1214C35.2164 28.1761 35.91 25.8893 35.91 23.55C35.9113 21.9952 35.6059 20.4555 35.0112 19.019C34.4166 17.5825 33.5443 16.2774 32.4445 15.1784C31.3446 14.0795 30.0388 13.2084 28.6018 12.6149C27.1647 12.0215 25.6248 11.7174 24.07 11.72V11.72ZM24.07 33.01C22.199 33.01 20.37 32.4552 18.8143 31.4157C17.2586 30.3762 16.0461 28.8988 15.3301 27.1702C14.6141 25.4416 14.4268 23.5395 14.7918 21.7044C15.1568 19.8694 16.0578 18.1838 17.3808 16.8608C18.7038 15.5378 20.3894 14.6368 22.2245 14.2718C24.0595 13.9068 25.9616 14.0941 27.6902 14.8101C29.4188 15.5261 30.8962 16.7386 31.9357 18.2943C32.9752 19.85 33.53 21.679 33.53 23.55C33.5274 26.0538 32.5323 28.4543 30.7628 30.2257C28.9933 31.9971 26.5938 32.9947 24.09 33L24.07 33.01Z",fill:"#5A6169",fillOpacity:"0.75"}),l.createElement("path",{d:"M24.68 17.64H22.9V24.73L29.11 28.45L30 27L24.68 23.84V17.64Z",fill:"#5A6169",fillOpacity:"0.75"}))};let gZ=gq;function gX(){return(gX=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var gJ=function(e){return l.createElement("svg",gX({id:"prefix__Layer_1","data-name":"Layer 1",viewBox:"0 0 48 48"},e),l.createElement("defs",null,l.createElement("style",null,".prefix__cls-3{fill:#b0b0b0}")),l.createElement("g",{id:"prefix__Time-Icon"},l.createElement("circle",{id:"prefix__path-1",cx:24,cy:24,r:20,fill:"#f0f0f0",className:"pending-icon"})),l.createElement("g",{id:"prefix__Time-Icon-2","data-name":"Time-Icon"},l.createElement("g",{id:"prefix__Shape"},l.createElement("path",{className:"prefix__cls-3",d:"M23.94 11.64a11.83 11.83 0 1 0 11.84 11.83 11.82 11.82 0 0 0-11.84-11.83zm0 21.29a9.46 9.46 0 1 1 9.46-9.46 9.46 9.46 0 0 1-9.4 9.46z"}),l.createElement("path",{fill:"none",d:"M9.77 9.28h28.38v28.38H9.77V9.28z"}),l.createElement("path",{className:"prefix__cls-3",d:"M24.55 17.56h-1.78v7.09l6.21 3.73.89-1.46-5.32-3.16v-6.2z"}))))};let gQ=gJ;function g1(){return(g1=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var g0=function(e){return l.createElement("svg",g1({"data-name":"Layer 1",viewBox:"0 0 48 48"},e),l.createElement("defs",null,l.createElement("mask",{id:"prefix__a",x:13.75,y:16,width:21,height:15,maskUnits:"userSpaceOnUse"},l.createElement("path",{fillRule:"evenodd",fill:"#fff",d:"M13.75 16h21v15h-21V16z"}))),l.createElement("circle",{"data-name":"path-1",cx:24,cy:24,r:20,fill:"#e8faf1"}),l.createElement("g",null,l.createElement("g",{mask:"url(#prefix__a)"},l.createElement("path",{d:"M30.81 17a1.89 1.89 0 0 0-1.29.56c-2.94 2.9-5.2 5.33-7.89 8.05l-2.74-2.28a1.9 1.9 0 0 0-2.66.14 1.84 1.84 0 0 0 .14 2.62l.09.07 4.08 3.4a1.9 1.9 0 0 0 2.55-.11c3.38-3.34 5.79-6 9.09-9.27a1.82 1.82 0 0 0 0-2.62 1.92 1.92 0 0 0-1.4-.56",fill:"#17c671",fillRule:"evenodd"}))))};let g2=g0;var g3=function(e){var t=e.status,n=e.width,r=e.height;switch(t){case"COMPLETED":return l.createElement(g2,{width:n,height:r,"data-testid":"completed"});case"ERRORED":return l.createElement(gK,{width:n,height:r,"data-testid":"errored"});case"RUNNING":return l.createElement(gQ,{width:n,height:r,"data-testid":"running"});case"SUSPENDED":return l.createElement(gZ,{width:n,height:r,"data-testid":"suspended"});default:return null}},g4=function(e){var t=e.palette,n=e.spacing;return(0,b.createStyles)({cell:{padding:0},content:{position:"relative",paddingLeft:50},status:{position:"absolute",top:0,left:0,paddingTop:18,paddingLeft:30,borderRight:"solid 1px",borderRightColor:t.divider,width:50,height:"100%"},runDetails:{paddingTop:3*n.unit,paddingBottom:3*n.unit,paddingLeft:4*n.unit,paddingRight:4*n.unit}})},g6=(0,b.withStyles)(g4)(function(e){var t=e.classes,n=e.run;return l.createElement(ir.Z,null,l.createElement(r7.default,{scope:"row",className:t.cell},l.createElement("div",{className:t.content},l.createElement("div",{className:t.status},l.createElement(g3,{width:38,status:n.status})),l.createElement("div",{className:t.runDetails},l.createElement(d.Z,{container:!0,spacing:0},l.createElement(d.Z,{item:!0,xs:12},l.createElement(ih,{href:"/jobs/".concat(n.job.id)},l.createElement(x.default,{variant:"h5",color:"primary",component:"span"},"Job: ",n.job.id))),l.createElement(d.Z,{item:!0,xs:12},l.createElement(ih,{href:"/runs/".concat(n.id)},l.createElement(x.default,{variant:"subtitle1",color:"textSecondary",component:"span"},"Run: ",n.id))))))),l.createElement(r7.default,{align:"right"},l.createElement(x.default,{variant:"body1",color:"textSecondary"},l.createElement(aO,{tooltip:!0},n.createdAt))))});function g5(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function g8(){var e=g5(["\n fragment RecentJobRunsPayload_ResultsFields on JobRun {\n id\n allErrors\n createdAt\n finishedAt\n status\n job {\n id\n }\n }\n"]);return g8=function(){return e},e}var g9=n0(g8()),g7=function(e){var t=e.palette,n=e.spacing;return(0,b.createStyles)({footer:{borderColor:t.divider,borderTop:"1px solid",paddingTop:2*n.unit,paddingBottom:2*n.unit}})},ve=(0,b.withStyles)(g7)(function(e){var t,n,r=e.classes,i=e.data,a=e.loading,o=e.errorMsg,s=e.maxRunsSize;return l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Activity",action:l.createElement(aA.Z,{href:"/jobs/new",component:tz},"New Job")}),l.createElement(r8.Z,null,l.createElement(r9.Z,null,l.createElement(g$,{visible:a}),l.createElement(gz,{visible:(null===(t=null==i?void 0:i.jobRuns.results)||void 0===t?void 0:t.length)===0},"No recent activity"),l.createElement(gU,{msg:o}),null===(n=null==i?void 0:i.jobRuns.results)||void 0===n?void 0:n.map(function(e,t){return l.createElement(g6,{run:e,key:t})})),i&&i.jobRuns.metadata.total>s&&l.createElement(gB.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,{className:r.footer},l.createElement(aA.Z,{href:"/runs",component:tz},"View More"))))))});function vt(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function vn(){var e=vt(["\n ","\n query FetchRecentJobRuns($offset: Int, $limit: Int) {\n jobRuns(offset: $offset, limit: $limit) {\n results {\n ...RecentJobRunsPayload_ResultsFields\n }\n metadata {\n total\n }\n }\n }\n"]);return vn=function(){return e},e}var vr=5,vi=n0(vn(),g9),va=function(){var e=rv(vi,{variables:{offset:0,limit:vr},fetchPolicy:"cache-and-network"}),t=e.data,n=e.loading,r=e.error;return l.createElement(ve,{data:t,errorMsg:null==r?void 0:r.message,loading:n,maxRunsSize:vr})},vo=function(e){return(0,b.createStyles)({style:{textAlign:"center",padding:2.5*e.spacing.unit,position:"fixed",left:"0",bottom:"0",width:"100%",borderRadius:0},bareAnchor:{color:e.palette.common.black,textDecoration:"none"}})},vs=(0,b.withStyles)(vo)(function(e){var t=e.classes,n=(0,A.v9)(gE.N,A.wU),r=(0,A.I0)();return(0,l.useEffect)(function(){r((0,ty.DQ)())}),l.createElement(ii.default,{className:t.style},l.createElement(x.default,null,"Chainlink Node ",n.version," at commit"," ",l.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://github.com/smartcontractkit/chainlink/commit/".concat(n.commitSHA),className:t.bareAnchor},n.commitSHA)))}),vu=function(e){return(0,b.createStyles)({cell:{borderColor:e.palette.divider,borderTop:"1px solid",borderBottom:"none",paddingTop:2*e.spacing.unit,paddingBottom:2*e.spacing.unit,paddingLeft:2*e.spacing.unit},block:{display:"block"},overflowEllipsis:{textOverflow:"ellipsis",overflow:"hidden"}})},vc=(0,b.withStyles)(vu)(function(e){var t=e.classes,n=e.job;return l.createElement(ir.Z,null,l.createElement(r7.default,{scope:"row",className:t.cell},l.createElement(d.Z,{container:!0,spacing:0},l.createElement(d.Z,{item:!0,xs:12},l.createElement(ih,{href:"/jobs/".concat(n.id),classes:{linkContent:t.block}},l.createElement(x.default,{className:t.overflowEllipsis,variant:"body1",component:"span",color:"primary"},n.name||n.id))),l.createElement(d.Z,{item:!0,xs:12},l.createElement(x.default,{variant:"body1",color:"textSecondary"},"Created ",l.createElement(aO,{tooltip:!0},n.createdAt))))))});function vl(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function vf(){var e=vl(["\n fragment RecentJobsPayload_ResultsFields on Job {\n id\n name\n createdAt\n }\n"]);return vf=function(){return e},e}var vd=n0(vf()),vh=function(){return(0,b.createStyles)({cardHeader:{borderBottom:0},table:{tableLayout:"fixed"}})},vp=(0,b.withStyles)(vh)(function(e){var t,n,r=e.classes,i=e.data,a=e.errorMsg,o=e.loading;return l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Recent Jobs",className:r.cardHeader}),l.createElement(r8.Z,{className:r.table},l.createElement(r9.Z,null,l.createElement(g$,{visible:o}),l.createElement(gz,{visible:(null===(t=null==i?void 0:i.jobs.results)||void 0===t?void 0:t.length)===0},"No recently created jobs"),l.createElement(gU,{msg:a}),null===(n=null==i?void 0:i.jobs.results)||void 0===n?void 0:n.map(function(e,t){return l.createElement(vc,{job:e,key:t})}))))});function vb(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function vm(){var e=vb(["\n ","\n query FetchRecentJobs($offset: Int, $limit: Int) {\n jobs(offset: $offset, limit: $limit) {\n results {\n ...RecentJobsPayload_ResultsFields\n }\n }\n }\n"]);return vm=function(){return e},e}var vg=5,vv=n0(vm(),vd),vy=function(){var e=rv(vv,{variables:{offset:0,limit:vg},fetchPolicy:"cache-and-network"}),t=e.data,n=e.loading,r=e.error;return l.createElement(vp,{data:t,errorMsg:null==r?void 0:r.message,loading:n})},vw=function(){return l.createElement(ig,null,l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:8},l.createElement(va,null)),l.createElement(d.Z,{item:!0,xs:4},l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12},l.createElement(gY,null)),l.createElement(d.Z,{item:!0,xs:12},l.createElement(vy,null))))),l.createElement(vs,null))},v_=function(){return l.createElement(vw,null)},vE=function(){return l.createElement(v_,null)},vS=n(87239),vk=function(e){switch(e){case"DirectRequestSpec":return"Direct Request";case"FluxMonitorSpec":return"Flux Monitor";default:return e.replace(/Spec$/,"")}},vx=n(5022),vT=n(78718),vM=n.n(vT);function vO(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function vA(e){if(Array.isArray(e))return vO(e)}function vL(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vC(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function vI(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function vD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){vL(e,t,n[t])})}return e}function vN(e){return vA(e)||vC(e)||vP(e)||vI()}function vP(e,t){if(e){if("string"==typeof e)return vO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vO(e,t)}}var vR=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return vM().apply(void 0,[e,"type","schemaVersion","name","externalJobID","gasLimit","forwardingAllowed",].concat(vN(n)))},vj=function(e){var t=e.observationSource;return{observationSource:""===t?null:t}},vF=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return vM().apply(void 0,[e].concat(vN(n)))},vY=function(e){try{return vx.stringify(e)}catch(t){return console.error("Failed to stringify job spec with the following error: ".concat(t)),""}},vB=function(e){var t={};switch(e.spec.__typename){case"CronSpec":t=vD({},vR(e,"maxTaskDuration"),vF(e.spec,"schedule","evmChainID"),vj(e));break;case"DirectRequestSpec":t=vD({},vR(e,"maxTaskDuration"),vF(e.spec,"contractAddress","evmChainID","minIncomingConfirmations","minContractPaymentLinkJuels","requesters"),vj(e));break;case"FluxMonitorSpec":t=vD({},vR(e,"maxTaskDuration"),vF(e.spec,"absoluteThreshold","contractAddress","drumbeatEnabled","drumbeatSchedule","drumbeatRandomDelay","evmChainID","idleTimerPeriod","idleTimerDisabled","minPayment","pollTimerPeriod","pollTimerDisabled","threshold"),vj(e));break;case"KeeperSpec":t=vD({},vR(e),vF(e.spec,"contractAddress","evmChainID","fromAddress"),vj(e));break;case"OCRSpec":t=vD({},vR(e,"maxTaskDuration"),vF(e.spec,"blockchainTimeout","contractAddress","contractConfigConfirmations","contractConfigTrackerPollInterval","contractConfigTrackerSubscribeInterval","evmChainID","isBootstrapPeer","keyBundleID","observationTimeout","p2pv2Bootstrappers","transmitterAddress"),vj(e));break;case"OCR2Spec":t=vD({},vR(e,"maxTaskDuration"),vF(e.spec,"blockchainTimeout","contractID","contractConfigConfirmations","contractConfigTrackerPollInterval","ocrKeyBundleID","monitoringEndpoint","p2pv2Bootstrappers","relay","relayConfig","pluginType","pluginConfig","feedID"),vF(e.spec,"transmitterID"),vj(e));break;case"VRFSpec":t=vD({},vR(e),vF(e.spec,"coordinatorAddress","evmChainID","fromAddresses","minIncomingConfirmations","pollPeriod","publicKey","requestedConfsDelay","requestTimeout","batchCoordinatorAddress","batchFulfillmentEnabled","batchFulfillmentGasMultiplier","chunkSize","backoffInitialDelay","backoffMaxDelay","gasLanePrice","vrfOwnerAddress"),vj(e));break;case"BlockhashStoreSpec":t=vD({},vR(e),vF(e.spec,"coordinatorV1Address","coordinatorV2Address","coordinatorV2PlusAddress","waitBlocks","lookbackBlocks","blockhashStoreAddress","trustedBlockhashStoreAddress","trustedBlockhashStoreBatchSize","pollPeriod","runTimeout","evmChainID","fromAddresses"),vj(e));break;case"BlockHeaderFeederSpec":t=vD({},vR(e),vF(e.spec,"coordinatorV1Address","coordinatorV2Address","coordinatorV2PlusAddress","waitBlocks","lookbackBlocks","blockhashStoreAddress","batchBlockhashStoreAddress","pollPeriod","runTimeout","evmChainID","fromAddresses","getBlockhashesBatchSize","storeBlockhashesBatchSize"),vj(e));break;case"BootstrapSpec":t=vD({},vR(e),vF(e.spec,"contractID","relay","relayConfig","monitoringEndpoint","blockchainTimeout","contractConfigTrackerPollInterval","contractConfigConfirmations"));break;case"GatewaySpec":t=vD({},vR(e),vF(e.spec,"gatewayConfig"));break;case"WorkflowSpec":t=vD({},vR(e),vF(e.spec,"workflowID","workflow","workflowOwner"));break;case"StandardCapabilitiesSpec":t=vD({},vR(e),vF(e.spec,"command","config"));break;case"WebhookSpec":t=vD({},vR(e),vj(e));break;case"StreamSpec":t=vD({},vR(e,"maxTaskDuration"),vF(e.spec,"streamID"),vj(e));break;default:return{definition:""}}return{definition:vY(t)}};function vU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function vH(e){if(Array.isArray(e))return e}function v$(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function vz(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function vG(e,t){return vH(e)||v$(e,t)||vW(e,t)||vz()}function vW(e,t){if(e){if("string"==typeof e)return vU(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vU(e,t)}}var vK=function(e){var t=e.job,n=e.onDelete,r=vG(l.useState(null),2),i=r[0],a=r[1],o=vG(l.useState(!1),2),s=o[0],u=o[1],c=function(e){a(e.currentTarget)},f=function(){a(null)},h=vB(t).definition;return l.createElement(l.Fragment,null,l.createElement(oh,{actions:l.createElement("div",null,l.createElement(y.default,{onClick:c,"aria-label":"open-menu"},l.createElement(ol.Z,null)),l.createElement(t_.Z,{anchorEl:i,open:Boolean(i),onClose:f,disableAutoFocusItem:!0},l.createElement(tN,{to:"/jobs/new?definition=".concat(encodeURIComponent(h))},l.createElement(oc.Z,null,l.createElement(vS.Z,null)),l.createElement(E.Z,null,"Duplicate")),l.createElement(tE.default,{onClick:function(){return u(!0)}},l.createElement(oc.Z,null,l.createElement(ou.Z,null)),l.createElement(E.Z,null,"Delete"))))},l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12,sm:6,md:1},l.createElement(op,{title:"ID"}),l.createElement(ob,{value:t.id})),l.createElement(d.Z,{item:!0,xs:12,sm:6,md:2},l.createElement(op,{title:"Type"}),l.createElement(ob,{value:vk(t.spec.__typename)})),l.createElement(d.Z,{item:!0,xs:12,sm:6,md:5},l.createElement(op,{title:"External Job ID"}),l.createElement(ob,{value:vk(t.externalJobID)})),l.createElement(d.Z,{item:!0,xs:12,sm:6,md:4},l.createElement(op,{title:"Created"}),l.createElement(ob,null,l.createElement(aO,{tooltip:!0},t.createdAt))))),l.createElement(oC,{open:s,title:"Delete Job?",body:"Warning: This action cannot be undone!",confirmButtonText:"Confirm",onConfirm:function(){n(),u(!1)},cancelButtonText:"Cancel",onCancel:function(){return u(!1)}}))},vV=n(70398),vq=n(12794),vZ=n(75759);function vX(){return(vX=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var vJ=function(e){return l.createElement(vZ.Z,vX({},e,{component:tI.rU}),e.children)};function vQ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v1,v0=function(e){return(0,b.createStyles)({tabs:{marginTop:4*e.spacing.unit,marginBottom:2.5*e.spacing.unit,borderBottom:"1px solid ".concat(e.palette.grey["300"])},badge:{padding:"0 ".concat(2*e.spacing.unit,"px")}})};(v1=s||(s={}))[v1.Overview=0]="Overview",v1[v1.Definition=1]="Definition",v1[v1.Errors=2]="Errors",v1[v1.Runs=3]="Runs";var v2=(0,b.withStyles)(v0)(function(e){var t=e.classes,n=e.id,r=e.errorsCount,i=e.refetchRecentRuns,a=e.runsCount,o=(0,h.TH)().pathname,u=l.useMemo(function(){var e;return vQ(e={},s.Overview,"/jobs/".concat(n)),vQ(e,s.Definition,"/jobs/".concat(n,"/definition")),vQ(e,s.Errors,"/jobs/".concat(n,"/errors")),vQ(e,s.Runs,"/jobs/".concat(n,"/runs")),e},[n]);return l.createElement(vq.Z,{value:o,className:t.tabs,indicatorColor:"primary",onChange:function(e,t){t===u[s.Overview]&&i()}},l.createElement(vJ,{label:"Overview",to:u[s.Overview],value:u[s.Overview]}),l.createElement(vJ,{label:"Definition",to:u[s.Definition],value:u[s.Definition]}),l.createElement(vJ,{label:l.createElement(vV.Z,{badgeContent:r,color:"error",className:t.badge},"Errors"),to:u[s.Errors],value:u[s.Errors]}),l.createElement(vJ,{label:l.createElement(vV.Z,{badgeContent:a,color:"primary",className:t.badge,max:99999},"Runs"),to:u[s.Runs],value:u[s.Runs]}))}),v3=n(12740);function v4(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function v6(e){if(Array.isArray(e))return e}function v5(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function v8(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function v9(e,t){return v6(e)||v5(e,t)||v7(e,t)||v8()}function v7(e,t){if(e){if("string"==typeof e)return v4(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v4(e,t)}}var ye=function(e){return(0,b.createStyles)({dialogContent:{paddingTop:1*e.spacing.unit},textarea:{width:400},closeButton:{position:"absolute",right:e.spacing.unit,top:e.spacing.unit,color:e.palette.grey[500]}})},yt=(0,b.withStyles)(ye)(function(e){var t=e.open,n=e.onClose,r=e.onRun,i=e.classes,a=v9(l.useState(""),2),o=a[0],s=a[1],u=l.useCallback(function(){r(o),n()},[r,n,o]);return l.createElement(aD.Z,{onClose:n,open:t},l.createElement(oO.Z,{disableTypography:!0},l.createElement(x.default,{variant:"h5"},"Pipeline Input"),l.createElement(y.default,{"aria-label":"Close",className:i.closeButton,onClick:n},l.createElement(v3.Z,null))),l.createElement(oT.Z,{className:i.dialogContent},l.createElement(iw.Z,{className:i.textarea,multiline:!0,rows:6,variant:"outlined",onChange:function(e){return s(e.target.value)}})),l.createElement(ox.Z,null,l.createElement(aA.Z,{variant:"primary",onClick:u},"Run Job")))}),yn=n(74855);function yr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function yi(e){if(Array.isArray(e))return e}function ya(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function yo(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ys(e,t){return yi(e)||ya(e,t)||yu(e,t)||yo()}function yu(e,t){if(e){if("string"==typeof e)return yr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yr(e,t)}}var yc=function(e){var t=e.data,n=e.title,r=ys(l.useState(!1),2),i=r[0],a=r[1];return l.createElement(yn.CopyToClipboard,{text:t,onCopy:function(){return a(!0)}},l.createElement(a_.Z,{title:"Copied!",open:i,onClose:function(){return a(!1)}},l.createElement(aA.Z,{variant:"secondary",onMouseLeave:function(){return a(!1)}},n)))},yl=function(e){var t=vB(e.job).definition;return l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Definition",action:l.createElement(yc,{title:"Copy",data:t})}),l.createElement(aW.Z,null,l.createElement(x.default,{style:{margin:0},variant:"body1",component:"pre"},l.createElement(gd,{language:"toml",style:gs,"data-testid":"definition"},t))))},yf=function(e){var t=e.job,n=["Occurrences","Created","Last Seen","Message"];return l.createElement(r5.Z,null,l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,n.map(function(e){return l.createElement(r7.default,{key:e},e)}))),l.createElement(r9.Z,null,0===t.errors.length&&l.createElement(ir.Z,null,l.createElement(r7.default,{component:"th",scope:"row",colSpan:5},"No errors")),t.errors.map(function(e,t){return l.createElement(ir.Z,{key:t},l.createElement(r7.default,null,e.occurrences),l.createElement(r7.default,null,l.createElement(aO,{tooltip:!0},e.createdAt)),l.createElement(r7.default,null,l.createElement(aO,{tooltip:!0},e.updatedAt)),l.createElement(r7.default,null,e.description))}))))},yd=function(e){return(0,b.createStyles)({jobRunsCard:{overflow:"auto"},idCell:{width:"40%"},stampCell:{width:"30%"},statusCell:{textAlign:"end",width:"30%"},runDetails:{paddingTop:2*e.spacing.unit,paddingBottom:2*e.spacing.unit,paddingLeft:2*e.spacing.unit},stamp:{paddingLeft:e.spacing.unit},status:{paddingLeft:1.5*e.spacing.unit,paddingRight:1.5*e.spacing.unit,paddingTop:e.spacing.unit/2,paddingBottom:e.spacing.unit/2,borderRadius:2*e.spacing.unit,marginRight:e.spacing.unit,width:"fit-content",display:"inline-block",textTransform:"capitalize"},errored:{backgroundColor:e.palette.error.light,color:e.palette.error.main},running:{backgroundColor:e.palette.listPendingStatus.background,color:e.palette.listPendingStatus.color},completed:{backgroundColor:e.palette.listCompletedStatus.background,color:e.palette.listCompletedStatus.color},noRuns:{padding:2*e.spacing.unit}})},yh=function(e,t){switch(t){case"COMPLETED":case"ERRORED":case"RUNNING":return e[t.toLowerCase()];default:return null}},yp=(0,b.withStyles)(yd)(function(e){var t=e.classes,n=e.runs,r=(0,h.k6)();return l.createElement(r8.Z,{padding:"none"},l.createElement(r9.Z,null,0===n.length&&l.createElement(ir.Z,null,l.createElement(r7.default,{colSpan:5},l.createElement(x.default,{variant:"body1",color:"textSecondary",className:t.noRuns},"No jobs have been run yet"))),n.length>0&&n.map(function(e){return l.createElement(ir.Z,{key:e.id,style:{cursor:"pointer"},onClick:function(){return r.push("/runs/".concat(e.id))}},l.createElement(r7.default,{className:t.idCell,scope:"row"},l.createElement("div",{className:t.runDetails},l.createElement(x.default,{variant:"h5",color:"primary",component:"span"},e.id))),l.createElement(r7.default,{className:t.stampCell},l.createElement(x.default,{variant:"body1",color:"textSecondary",className:t.stamp},"Created ",l.createElement(aO,{tooltip:!0},e.createdAt))),l.createElement(r7.default,{className:t.statusCell,scope:"row"},l.createElement(x.default,{variant:"body1",className:O()(t.status,yh(t,e.status))},e.status.toLowerCase())))})))}),yb=n(16839),ym=n.n(yb);function yg(e){var t=e.replace(/\w+\s*=\s*<([^>]|[\r\n])*>/g,""),n=ym().read(t),r=n.edges();return n.nodes().map(function(e){var t={id:e,parentIds:r.filter(function(t){return t.w===e}).map(function(e){return e.v})};return Object.keys(n.node(e)).length>0&&(t.attributes=n.node(e)),t})}var yv=n(94164),yy=function(e){var t=e.data,n=[];return(null==t?void 0:t.attributes)&&Object.keys(t.attributes).forEach(function(e){var r;n.push(l.createElement("div",{key:e},l.createElement(x.default,{variant:"body1",color:"textSecondary",component:"div"},l.createElement("b",null,e,":")," ",null===(r=t.attributes)||void 0===r?void 0:r[e])))}),l.createElement("div",null,t&&l.createElement(x.default,{variant:"body1",color:"textPrimary"},l.createElement("b",null,t.id)),n)},yw=n(73343),y_=n(3379),yE=n.n(y_);function yS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function yk(e){if(Array.isArray(e))return e}function yx(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function yT(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function yM(e,t){return yk(e)||yx(e,t)||yO(e,t)||yT()}function yO(e,t){if(e){if("string"==typeof e)return yS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yS(e,t)}}var yA=function(e){var t,n=e.nodesData,r=yM(l.useState({}),2),i=r[0],a=r[1];l.useEffect(function(){var e=function(e){var t=!0,r=!1,i=void 0;try{for(var a,o=n[Symbol.iterator]();!(t=(a=o.next()).done);t=!0){var s=a.value;if(e===s.id)return s}}catch(u){r=!0,i=u}finally{try{t||null==o.return||o.return()}finally{if(r)throw i}}};if(n){var t={nodes:[],links:[]},r=[],i=[];n.map(function(e){t.nodes.push({id:e.id}),e.parentIds.map(function(n){t.links.push({source:n,target:e.id})}),r.push({id:e.id,width:90,height:40}),e.parentIds.map(function(t){i.push({id:"e".concat(e.id),sources:[e.id],targets:[t]})})});var o=function(t){var n,r=e(t.id);switch(null==r?void 0:null===(n=r.attributes)||void 0===n?void 0:n.status){case"COMPLETE":return l.createElement(g2,{className:"task-run-icon-success task-run-icon",id:"success-run-icon-".concat(t.id)});case"ERROR":return l.createElement(gK,{className:"task-run-icon-error task-run-icon",id:"error-run-icon-".concat(t.id)});default:return l.createElement(gQ,{className:"task-run-icon-pending task-run-icon",id:"pending-run-icon-".concat(t.id)})}};new(yE())().layout({id:"task-list-graph-d3",children:r,edges:i},{layoutOptions:{"elk.algorithm":"org.eclipse.elk.layered","elk.direction":"LEFT","elk.layered.nodePlacement.strategy":"SIMPLE","elk.layered.wrapping.strategy":"SINGLE_EDGE","elk.aspectRatio":"1.0f","org.eclipse.elk.padding":"[top=50, left=50, bottom=50, right=5]","elk.layered.spacing.edgeNodeBetweenLayers":"1","elk.zoomToFit":"TRUE","elk.layered.considerModelOrder.strategy":"PREFER_EDGES","elk.layered.unnecessaryBendpoints":"TRUE"}}).then(function(e){var n;t.nodes=[],null===(n=e.children)||void 0===n||n.map(function(e){e.x&&e.y&&t.nodes.push({id:e.id,x:"".concat(e.x),y:"".concat(e.y),viewGenerator:o,size:400})}),a(t)})}},[n]);var o=0;null===(t=i.nodes)||void 0===t||t.map(function(e){e.y&&o<parseInt(e.y,10)&&(o=parseInt(e.y,10))});var s={automaticRearrangeAfterDropNode:!1,collapsible:!1,directed:!0,disableLinkForce:!0,focusAnimationDuration:.75,focusZoom:1,height:o+50,highlightDegree:0,highlightOpacity:1,link:{color:"#d3d3d3",fontColor:"black",fontSize:12,fontWeight:"normal",highlightColor:"blue",highlightFontSize:8,highlightFontWeight:"bold",mouseCursor:"pointer",opacity:1,renderLabel:!1,strokeWidth:3,markerHeight:3,markerWidth:3},linkHighlightBehavior:!0,maxZoom:3,minZoom:.3,node:{color:"#d3d3d3",fontColor:"black",fontSize:14,fontWeight:"normal",highlightColor:"red",highlightFontSize:16,highlightFontWeight:"bold",highlightStrokeColor:"blue",labelProperty:"name",mouseCursor:"pointer",opacity:1,renderLabel:!0,strokeColor:"none",strokeWidth:2,labelPosition:"top"},nodeHighlightBehavior:!0,panAndZoom:!0,staticGraph:!0,width:"100%"},u=0,c=0,f=function(e){c=e.clientY,u=e.clientX};(0,l.useEffect)(function(){return window.addEventListener("mousemove",f),function(){window.removeEventListener("mousemove",f)}});var d=function(e){var t,n,r=document.getElementById("tooltip-d3-chart-".concat(e));if(r){var i=50,a=10;t=u+r.getBoundingClientRect().width+i>window.innerWidth?u-r.getBoundingClientRect().width-a:u+a,n=c+r.getBoundingClientRect().height+i>window.innerHeight?c-r.getBoundingClientRect().height-a:c+a,r.style.opacity=String(1),r.style.top="".concat(n,"px"),r.style.left="".concat(t,"px"),r.style.zIndex=String(1)}},h=function(e){var t=document.getElementById("tooltip-d3-chart-".concat(e));t&&(t.style.opacity=String(0),t.style.zIndex=String(-1))};return l.createElement("div",{style:{fontFamily:"sans-serif",fontWeight:"normal"}},l.createElement(yv.kJ,{id:"task-list-graph-d3",data:i,config:s,onMouseOverNode:d,onMouseOutNode:h},"D3 chart"),n.map(function(e){return l.createElement("div",{key:"d3-tooltip-key-".concat(e.id),id:"tooltip-d3-chart-".concat(e.id),style:{position:"absolute",opacity:"0",border:"1px solid rgba(0, 0, 0, 0.1)",padding:yw.r.spacing.unit,background:"white",borderRadius:5,zIndex:-1,inlineSize:"min-content"}},l.createElement(yy,{data:e}))}))};function yL(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function yC(e){if(Array.isArray(e))return e}function yI(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yD(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function yN(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function yP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){yI(e,t,n[t])})}return e}function yR(e,t){return yC(e)||yD(e,t)||yj(e,t)||yN()}function yj(e,t){if(e){if("string"==typeof e)return yL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yL(e,t)}}var yF=function(e){var t=e.attributes,n=e.observationSource,r=yR(l.useState(),2),i=r[0],a=r[1];return l.useEffect(function(){if(n&&""!==n)try{var e=yg("digraph {".concat(n,"}"));if(t)for(var r=0;r<e.length;r++){var i=e[r];t[i.id]&&(e[r].attributes=yP({},i.attributes,t[i.id]))}a({graph:e})}catch(o){a({errorMsg:"Failed to parse task graph"})}else a({errorMsg:"No Task Graph Found"})},[t,n,a]),l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Task List",id:"graph-max-width"}),l.createElement(aW.Z,null,i&&i.errorMsg&&l.createElement(x.default,{align:"center",variant:"subtitle1"},i.errorMsg),i&&i.graph&&l.createElement(yA,{nodesData:i.graph})))},yY=5,yB=function(e){var t=e.spacing;return(0,b.createStyles)({runDetails:{paddingTop:2*t.unit,paddingBottom:2*t.unit,paddingLeft:2*t.unit}})},yU=(0,b.withStyles)(yB)(function(e){var t=e.classes,n=e.job,r=l.useMemo(function(){return n.runs.results.map(function(e){var t,n=e.allErrors,r=e.id,i=e.createdAt;return{id:r,createdAt:i,errors:n,finishedAt:e.finishedAt,status:e.status}})},[n.runs]);return l.createElement(d.Z,{container:!0,spacing:32},l.createElement(d.Z,{item:!0,xs:12,sm:6},l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Recent job runs"}),l.createElement(yp,{runs:r}),n.runs.metadata.total>yY&&l.createElement("div",{className:t.runDetails},l.createElement(aA.Z,{href:"/jobs/".concat(n.id,"/runs"),component:tz},"View more")))),l.createElement(d.Z,{item:!0,xs:12,sm:6},l.createElement(yF,{observationSource:n.observationSource})))});function yH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function y$(e){if(Array.isArray(e))return e}function yz(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function yG(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function yW(e,t){return y$(e)||yz(e,t)||yK(e,t)||yG()}function yK(e,t){if(e){if("string"==typeof e)return yH(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yH(e,t)}}var yV=function(e){var t=e.fetchMore,n=e.job,r=(0,h.k6)(),i=(0,h.TH)(),a=new URLSearchParams(i.search),o=yW(l.useState({page:parseInt(a.get("page")||"1",10),pageSize:parseInt(a.get("size")||"10",10)}),2),s=o[0],u=s.page,c=s.pageSize,f=o[1];l.useEffect(function(){t(u,c)},[t,u,c]),l.useEffect(function(){r.replace({search:"?page=".concat(u,"&size=").concat(c)})},[r,u,c]);var d=l.useMemo(function(){return n.runs.results.map(function(e){var t,n=e.allErrors,r=e.id,i=e.createdAt;return{id:r,createdAt:i,errors:n,finishedAt:e.finishedAt,status:e.status}})},[n.runs]);return l.createElement(l.Fragment,null,l.createElement(r5.Z,null,l.createElement(yp,{runs:d}),l.createElement(it.Z,{component:"div",count:n.runs.metadata.total,rowsPerPage:c,rowsPerPageOptions:[10,25,50,100],page:u-1,onChangePage:function(e,t){f({page:t+1,pageSize:c})},onChangeRowsPerPage:function(e){f({page:1,pageSize:parseInt(e.target.value,10)})},backIconButtonProps:{"aria-label":"prev-page"},nextIconButtonProps:{"aria-label":"next-page"}})))};function yq(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function yZ(e){if(Array.isArray(e))return e}function yX(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function yJ(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function yQ(e,t){return yZ(e)||yX(e,t)||y0(e,t)||yJ()}function y1(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function y0(e,t){if(e){if("string"==typeof e)return yq(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yq(e,t)}}function y2(){var e=y1(["\n fragment JobPayload_Spec on JobSpec {\n ... on CronSpec {\n schedule\n evmChainID\n }\n ... on DirectRequestSpec {\n contractAddress\n evmChainID\n minIncomingConfirmations\n minContractPaymentLinkJuels\n requesters\n }\n ... on FluxMonitorSpec {\n absoluteThreshold\n contractAddress\n drumbeatEnabled\n drumbeatRandomDelay\n drumbeatSchedule\n evmChainID\n idleTimerDisabled\n idleTimerPeriod\n minPayment\n pollTimerDisabled\n pollTimerPeriod\n threshold\n }\n ... on KeeperSpec {\n contractAddress\n evmChainID\n fromAddress\n }\n ... on OCRSpec {\n blockchainTimeout\n contractAddress\n contractConfigConfirmations\n contractConfigTrackerPollInterval\n contractConfigTrackerSubscribeInterval\n evmChainID\n isBootstrapPeer\n keyBundleID\n observationTimeout\n p2pv2Bootstrappers\n transmitterAddress\n }\n ... on OCR2Spec {\n blockchainTimeout\n contractID\n contractConfigConfirmations\n contractConfigTrackerPollInterval\n ocrKeyBundleID\n monitoringEndpoint\n p2pv2Bootstrappers\n relay\n relayConfig\n transmitterID\n pluginType\n pluginConfig\n feedID\n }\n ... on VRFSpec {\n evmChainID\n gasLanePrice\n coordinatorAddress\n fromAddresses\n minIncomingConfirmations\n pollPeriod\n publicKey\n requestedConfsDelay\n batchCoordinatorAddress\n batchFulfillmentEnabled\n batchFulfillmentGasMultiplier\n chunkSize\n requestTimeout\n backoffInitialDelay\n backoffMaxDelay\n vrfOwnerAddress\n }\n ... on BlockhashStoreSpec {\n coordinatorV1Address\n coordinatorV2Address\n waitBlocks\n lookbackBlocks\n blockhashStoreAddress\n pollPeriod\n runTimeout\n evmChainID\n fromAddresses\n coordinatorV2PlusAddress\n trustedBlockhashStoreAddress\n trustedBlockhashStoreBatchSize\n }\n ... on BlockHeaderFeederSpec {\n coordinatorV1Address\n coordinatorV2Address\n waitBlocks\n lookbackBlocks\n blockhashStoreAddress\n batchBlockhashStoreAddress\n pollPeriod\n runTimeout\n evmChainID\n fromAddresses\n getBlockhashesBatchSize\n storeBlockhashesBatchSize\n coordinatorV2PlusAddress\n }\n ... on BootstrapSpec {\n contractID\n relay\n monitoringEndpoint\n relayConfig\n blockchainTimeout\n contractConfigTrackerPollInterval\n contractConfigConfirmations\n createdAt\n }\n ... on GatewaySpec {\n gatewayConfig\n createdAt\n }\n ... on WorkflowSpec {\n workflowID\n workflowOwner\n workflow\n }\n ... on StandardCapabilitiesSpec {\n command\n config\n createdAt\n }\n ... on StreamSpec {\n streamID\n }\n }\n"]);return y2=function(){return e},e}function y3(){var e=y1(["\n fragment JobPayload_RunsFields on JobRun {\n id\n allErrors\n status\n createdAt\n finishedAt\n }\n"]);return y3=function(){return e},e}function y4(){var e=y1(["\n fragment JobPayload_ErrorsFields on JobError {\n description\n occurrences\n createdAt\n updatedAt\n }\n"]);return y4=function(){return e},e}function y6(){var e=y1(["\n ","\n ","\n ","\n fragment JobPayload_Fields on Job {\n id\n name\n externalJobID\n observationSource\n createdAt\n schemaVersion\n type\n maxTaskDuration\n gasLimit\n forwardingAllowed\n spec {\n __typename\n ...JobPayload_Spec\n }\n runs(offset: $offset, limit: $limit) {\n results {\n ...JobPayload_RunsFields\n }\n metadata {\n total\n }\n }\n errors {\n ...JobPayload_ErrorsFields\n }\n }\n"]);return y6=function(){return e},e}var y5=n0(y2()),y8=n0(y3()),y9=n0(y4()),y7=n0(y6(),y5,y8,y9),we=function(e){var t=e.job,n=e.runsCount,r=e.onDelete,i=e.onRun,a=e.refetch,o=e.refetchRecentRuns,s=(0,h.$B)().path,u=yQ(l.useState(!1),2),c=u[0],f=u[1];return l.createElement(l.Fragment,null,l.createElement(ig,null,l.createElement(d.Z,{container:!0,spacing:32},l.createElement(d.Z,{item:!0,xs:9},l.createElement(iy,null,t.name||"--")),l.createElement(d.Z,{item:!0,xs:3,style:{textAlign:"right"}},"WebhookSpec"===t.spec.__typename&&l.createElement(aA.Z,{variant:"primary",onClick:function(){return f(!0)}},"Run"))),l.createElement(vK,{job:t,onDelete:r}),l.createElement(v2,{id:t.id,errorsCount:t.errors.length,runsCount:n,refetchRecentRuns:o}),l.createElement(h.rs,null,l.createElement(h.AW,{path:"".concat(s,"/definition")},l.createElement(yl,{job:t})),l.createElement(h.AW,{exact:!0,path:"".concat(s,"/errors")},l.createElement(yf,{job:t})),l.createElement(h.AW,{exact:!0,path:"".concat(s,"/runs")},l.createElement(yV,{job:t,fetchMore:a})),l.createElement(h.AW,{exact:!0,path:s},l.createElement(yU,{job:t})))),l.createElement(yt,{open:c,onClose:function(){return f(!1)},onRun:i}))};function wt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function wn(e){if(Array.isArray(e))return e}function wr(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function wi(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){wr(a,r,i,o,s,"next",e)}function s(e){wr(a,r,i,o,s,"throw",e)}o(void 0)})}}function wa(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function wo(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ws(e,t){return wn(e)||wa(e,t)||wc(e,t)||wo()}function wu(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function wc(e,t){if(e){if("string"==typeof e)return wt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wt(e,t)}}var wl=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};function wf(){var e=wu(["\n ","\n query FetchJob($id: ID!, $offset: Int, $limit: Int) {\n job(id: $id) {\n __typename\n ... on Job {\n ...JobPayload_Fields\n }\n ... on NotFoundError {\n message\n }\n }\n }\n"]);return wf=function(){return e},e}function wd(){var e=wu(["\n mutation DeleteJob($id: ID!) {\n deleteJob(id: $id) {\n ... on DeleteJobSuccess {\n job {\n id\n }\n }\n ... on NotFoundError {\n message\n }\n }\n }\n"]);return wd=function(){return e},e}var wh=5,wp=n0(wf(),y7),wb=n0(wd()),wm=function(e){var t=e.data;return l.createElement(l.Fragment,null,"Successfully created job run"," ",l.createElement(tz,{href:"/runs/".concat(t.id)},t.id))},wg=function(){var e=(0,h.UO)().id,t=(0,A.I0)(),n=(0,h.k6)(),r=(0,h.TH)().search,i=oq().handleMutationError,a=l.useMemo(function(){return new URLSearchParams(r)},[]),o=parseInt(a.get("page")||"1",10),s=parseInt(a.get("per")||wh.toString(),10),u=rv(wp,{variables:{id:e,offset:(o-1)*s,limit:s},fetchPolicy:"network-only"}),c=u.data,f=u.loading,d=u.error,p=u.refetch,b=ws(oo(wb),1)[0];if(f)return l.createElement(iR,null);if(d)return l.createElement(iD,{error:d});var m,g,v=(m=wi(function(){var r,a,o,s,u;return wl(this,function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),[4,b(((o={}).variables={id:e},o))];case 1:switch(null==(s=null===(r=(a=c.sent()).data)||void 0===r?void 0:r.deleteJob)?void 0:s.__typename){case"DeleteJobSuccess":n.push("/jobs"),setTimeout(function(){return t((0,ty.qt)("Successfully deleted job ".concat(e)))},200);break;case"NotFoundError":t((0,ty.LO)(s.message))}return[3,3];case 2:return i(u=c.sent()),[3,3];case 3:return[2]}})}),function(){return m.apply(this,arguments)}),y=(g=wi(function(n){return wl(this,function(r){switch(r.label){case 0:return[4,t((0,ty.tA)(e,n,wm,aN))];case 1:return r.sent(),p(),[2]}})}),function(e){return g.apply(this,arguments)}),w=function(e,t){p({offset:(e-1)*s,limit:t})},_=function(){p({offset:0,limit:wh})},E=null==c?void 0:c.job;switch(null==E?void 0:E.__typename){case"Job":return l.createElement(we,{job:E,runsCount:E.runs.metadata.total,onDelete:v,onRun:y,refetch:w,refetchRecentRuns:_});case"NotFoundError":return l.createElement(oa,null);default:return null}},wv=(0,b.withStyles)(iu)(function(e){var t=e.job,n=e.classes;return l.createElement(ir.Z,{className:n.row,hover:!0},l.createElement(r7.default,{className:n.cell,component:"th",scope:"row"},l.createElement(ih,{className:n.link,href:"/jobs/".concat(t.id)},t.id)),l.createElement(r7.default,null,""!=t.name?t.name:"--"),l.createElement(r7.default,null,vk(t.spec.__typename)),l.createElement(r7.default,null,t.externalJobID),l.createElement(r7.default,null,l.createElement(aO,{tooltip:!0},t.createdAt)))});function wy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ww(e){if(Array.isArray(e))return e}function w_(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function wE(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function wS(e,t){return ww(e)||w_(e,t)||wx(e,t)||wE()}function wk(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function wx(e,t){if(e){if("string"==typeof e)return wy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wy(e,t)}}function wT(){var e=wk(["\n fragment JobsPayload_ResultsFields on Job {\n id\n name\n externalJobID\n createdAt\n spec {\n __typename\n ... on OCRSpec {\n contractAddress\n keyBundleID\n transmitterAddress\n }\n }\n }\n"]);return wT=function(){return e},e}var wM=n0(wT()),wO=function(e){var t=e.toLowerCase();return function(e){return e.toLowerCase().includes(t)}},wA=function(e){return function(t){return""===e||wL(t,e)}};function wL(e,t){var n=wO(t),r=[e.id,e.name||"",e.spec.__typename,e.externalJobID,],i=e.spec;return"OCRSpec"==i.__typename&&["contractAddress","keyBundleID","transmitterAddress",].forEach(function(e){r.push(String(i[e]))}),r.some(n)}var wC=function(e){var t=e.jobs,n=e.page,r=e.pageSize,i=e.total,a=(0,h.k6)(),o=wS(l.useState(""),2),s=o[0],u=o[1],c=l.useMemo(function(){return wA(s.trim())},[s]);return l.createElement(ig,null,l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:9},l.createElement(iy,null,"Jobs")),l.createElement(d.Z,{item:!0,xs:3},l.createElement(d.Z,{container:!0,justify:"flex-end"},l.createElement(d.Z,{item:!0},l.createElement(aA.Z,{variant:"secondary",component:tz,href:"/jobs/new"},"New Job")))),l.createElement(d.Z,{item:!0,xs:12},l.createElement(iE,{value:s,onChange:u,placeholder:"Search jobs"}),l.createElement(r5.Z,null,l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,"ID"),l.createElement(r7.default,null,"Name"),l.createElement(r7.default,null,"Type"),l.createElement(r7.default,null,"External Job ID"),l.createElement(r7.default,null,"Created"))),l.createElement(r9.Z,null,0===t.length&&l.createElement(ir.Z,null,l.createElement(r7.default,{component:"th",scope:"row",colSpan:3},"You haven’t created any jobs yet. Create a new job"," ",l.createElement(ih,{href:"/jobs/new"},"here"))),t.filter(c).map(function(e){return l.createElement(wv,{key:e.id,job:e})}))),l.createElement(it.Z,{component:"div",count:i,rowsPerPage:r,rowsPerPageOptions:[r],page:n-1,onChangePage:function(e,t){a.push("/jobs?page=".concat(t+1,"&per=").concat(r))},onChangeRowsPerPage:function(){},backIconButtonProps:{"aria-label":"prev-page"},nextIconButtonProps:{"aria-label":"next-page"}})))))};function wI(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function wD(){var e=wI(["\n ","\n query FetchJobs($offset: Int, $limit: Int) {\n jobs(offset: $offset, limit: $limit) {\n results {\n ...JobsPayload_ResultsFields\n }\n metadata {\n total\n }\n }\n }\n"]);return wD=function(){return e},e}var wN=n0(wD(),wM),wP=function(){var e=ij(),t=parseInt(e.get("page")||"1",10),n=parseInt(e.get("per")||"1000",10),r=rv(wN,{variables:{offset:(t-1)*n,limit:n},fetchPolicy:"network-only"}),i=r.data,a=r.loading,o=r.error;return a?l.createElement(iR,null):o?l.createElement(iD,{error:o}):i?l.createElement(wC,{jobs:i.jobs.results,page:t,pageSize:n,total:i.jobs.metadata.total}):null},wR=["refetch","reobserve","fetchMore","updateQuery","startPolling","subscribeToMore",];function wj(e,t){var n,r=(0,l.useRef)(),i=(0,l.useRef)(),a=(0,l.useRef)(),o=r.current?(0,ra.J)(t,r.current):t,s=null!==(n=null==o?void 0:o.query)&&void 0!==n?n:e;i.current=o,a.current=s;var u=ry(rh(t&&t.client),s),c=u.useQuery((0,t0.pi)((0,t0.pi)({},o),{skip:!r.current})),f=c.observable.options.initialFetchPolicy||u.getDefaultFetchPolicy(),d=Object.assign(c,{called:!!r.current}),h=(0,l.useMemo)(function(){for(var e={},t=function(t){var n=d[t];e[t]=function(){return r.current||(r.current=Object.create(null),u.forceUpdate()),n.apply(this,arguments)}},n=0,i=wR;n<i.length;n++)t(i[n]);return e},[]);return Object.assign(d,h),[(0,l.useCallback)(function(e){r.current=e?(0,t0.pi)((0,t0.pi)({},e),{fetchPolicy:e.fetchPolicy||f}):{fetchPolicy:f};var t=(0,ra.J)(i.current,(0,t0.pi)({query:a.current},r.current)),n=u.executeQuery((0,t0.pi)((0,t0.pi)({},t),{skip:!1})).then(function(e){return Object.assign(e,h)});return n.catch(function(){}),n},[]),d]}function wF(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){wF(e,t,n[t])})}return e}function wB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wU(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):wB(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var wH=function(e){return e.errors.reduce(function(e,t){var n=t.path.replace(/^input\//,"");return wU(wY({},e),wF({},n,t.message))},{})},w$=n(23279),wz=n.n(w$),wG=bv().shape({toml:p0().required("Required").test("toml","Invalid TOML",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";try{return vx.parse(e),!0}catch(t){return!1}})}),wW=function(e){var t=e.initialValues,n=e.onSubmit,r=e.onTOMLChange;return l.createElement(hT,{initialValues:t,validationSchema:wG,onSubmit:n},function(e){var t=e.isSubmitting,n=e.values;return r&&r(n.toml),l.createElement(hR,{"data-testid":"job-form",noValidate:!0},l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:12},l.createElement(hP,{component:hX,id:"toml",name:"toml",label:"Job Spec (TOML)",required:!0,fullWidth:!0,multiline:!0,rows:10,rowsMax:25,variant:"outlined",autoComplete:"off",FormHelperTextProps:{"data-testid":"toml-helper-text"}})),l.createElement(d.Z,{item:!0,xs:12,md:7},l.createElement(ok.default,{variant:"contained",color:"primary",type:"submit",disabled:t,size:"large"},"Create Job"))))})},wK=n(50109),wV="persistSpec";function wq(e){var t=e.query,n=new URLSearchParams(t).get("definition");return n?(wK.t8(wV,n),{toml:n}):{toml:wK.U2(wV)||""}}var wZ=function(e){var t=e.onSubmit,n=e.onTOMLChange,r=wq({query:(0,h.TH)().search}),i=function(e){var t=e.replace(/[\u200B-\u200D\uFEFF]/g,"");wK.t8("".concat(wV),t),n&&n(t)};return l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"New Job"}),l.createElement(aW.Z,null,l.createElement(wW,{initialValues:r,onSubmit:t,onTOMLChange:i})))};function wX(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function wJ(e){if(Array.isArray(e))return e}function wQ(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function w1(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function w0(e,t){return wJ(e)||wQ(e,t)||w2(e,t)||w1()}function w2(e,t){if(e){if("string"==typeof e)return wX(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wX(e,t)}}var w3=function(e){var t=e.toml,n=w0(l.useState(""),2),r=n[0],i=n[1];return l.useEffect(function(){try{var e=vx.parse(t);e.observationSource?i(e.observationSource.trim()):i("")}catch(n){i("")}},[t]),l.createElement(yF,{observationSource:r})};function w4(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function w6(e){if(Array.isArray(e))return e}function w5(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function w8(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function w9(e,t){return w6(e)||w5(e,t)||w7(e,t)||w8()}function w7(e,t){if(e){if("string"==typeof e)return w4(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return w4(e,t)}}var _e=function(e){var t=e.onSubmit,n=w9(l.useState(""),2),r=n[0],i=n[1],a=l.useCallback(function(e){return wz()(function(){return i(e)},500)()},[i]);return l.createElement(ig,null,l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12,md:8},l.createElement(wZ,{onSubmit:t,onTOMLChange:a})),l.createElement(d.Z,{item:!0,xs:12,md:4},l.createElement(w3,{toml:r}))))};function _t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _n(e){if(Array.isArray(e))return e}function _r(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function _i(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){_r(a,r,i,o,s,"next",e)}function s(e){_r(a,r,i,o,s,"throw",e)}o(void 0)})}}function _a(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _o(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function _s(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _u(e,t){return _n(e)||_o(e,t)||_l(e,t)||_s()}function _c(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function _l(e,t){if(e){if("string"==typeof e)return _t(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _t(e,t)}}var _f=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};function _d(){var e=_c(["\n mutation CreateJob($input: CreateJobInput!) {\n createJob(input: $input) {\n ... on CreateJobSuccess {\n job {\n id\n }\n }\n ... on InputErrors {\n errors {\n path\n message\n code\n }\n }\n }\n }\n"]);return _d=function(){return e},e}var _h=n0(_d()),_p=function(e){var t=e.id;return l.createElement(l.Fragment,null,"Successfully created job"," ",l.createElement(tz,{id:"created-job",href:"/jobs/".concat(t)},t))},_b=function(){var e,t=(0,A.I0)(),n=oq().handleMutationError,r=_u(oo(_h),1)[0],i=_u(wj(wN,{variables:{offset:0,limit:1e3},fetchPolicy:"network-only"}),1)[0],a=(e=_i(function(e,a){var o,s,u,c,l,f,d,h,p,b,m,g,v,y,w;return _f(this,function(_){switch(_.label){case 0:return o=a.setErrors,[4,i()];case 1:s=_.sent(),_.label=2;case 2:return _.trys.push([2,4,,6]),[4,r(((l={}).variables={input:{TOML:e.toml}},l))];case 3:switch(f=null===(u=(c=_.sent()).data)||void 0===u?void 0:u.createJob,d={},null==f?void 0:f.__typename){case"CreateJobSuccess":t((0,ty.t5)(_p,(d.id=f.job.id,d)));break;case"InputErrors":t((0,ty.LO)("Invalid Input")),o(wH(f))}return[3,6];case 4:return h=_.sent(),[4,i()];case 5:return v=_.sent(),y=null===(p=s.data)||void 0===p?void 0:null===(b=p.jobs)||void 0===b?void 0:b.results,w=null===(m=v.data)||void 0===m?void 0:null===(g=m.jobs)||void 0===g?void 0:g.results,y&&w&&y.length<w.length&&_a(h,rs.cA)?t((0,ty.LO)("Job successfully created but could not start service: "+h.message)):n(h),[3,6];case 6:return[2]}})}),function(t,n){return e.apply(this,arguments)});return l.createElement(_e,{onSubmit:a})},_m=function(){var e=(0,h.$B)().path;return l.createElement(h.rs,null,l.createElement(h.AW,{path:"".concat(e,"/new")},l.createElement(_b,null)),l.createElement(h.AW,{path:"".concat(e,"/:id")},l.createElement(wg,null)),l.createElement(h.AW,{exact:!0,path:e},l.createElement(wP,null)))},_g=n(83173);function _v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _y(e){if(Array.isArray(e))return e}function _w(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function __(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _E(e,t){return _y(e)||_w(e,t)||_S(e,t)||__()}function _S(e,t){if(e){if("string"==typeof e)return _v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _v(e,t)}}var _k=function(e){return(0,b.createStyles)({button:{width:27,height:27,minHeight:27,marginLeft:e.spacing.unit,marginRight:e.spacing.unit},icon:{fontSize:18}})},_x=(0,b.withStyles)(_k)(function(e){var t=e.classes,n=e.data,r=_E(l.useState(!1),2),i=r[0],a=r[1];return l.createElement(yn.CopyToClipboard,{text:n,onCopy:function(){return a(!0)}},l.createElement(a_.Z,{title:"Copied!",open:i,onClose:function(){return a(!1)}},l.createElement(y.default,{className:t.button},l.createElement(_g.Z,{className:t.icon}))))});function _T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.start,r=void 0===n?6:n,i=t.end,a=void 0===i?4:i;return e.substring(0,r)+"..."+e.substring(e.length-a)}function _M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _O(e){if(Array.isArray(e))return e}function _A(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function _L(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){_A(a,r,i,o,s,"next",e)}function s(e){_A(a,r,i,o,s,"throw",e)}o(void 0)})}}function _C(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function _I(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _D(e,t){return _O(e)||_C(e,t)||_N(e,t)||_I()}function _N(e,t){if(e){if("string"==typeof e)return _M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _M(e,t)}}var _P=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},_R=function(e){return(0,b.createStyles)({container:{backgroundColor:e.palette.common.white,padding:5*e.spacing.unit,paddingBottom:0},chainId:{overflow:"hidden",textOverflow:"ellipsis"},badgePadding:{paddingLeft:2*e.spacing.unit,paddingRight:2*e.spacing.unit,marginLeft:-2*e.spacing.unit,marginRight:-2*e.spacing.unit,lineHeight:"1rem"},dialogPaper:{minHeight:"360px",maxHeight:"360px",minWidth:"670px",maxWidth:"670px",overflow:"hidden",borderRadius:3*e.spacing.unit},warningText:{fontWeight:500,marginLeft:3*e.spacing.unit,marginTop:3*e.spacing.unit,marginBottom:e.spacing.unit},closeButton:{marginRight:3*e.spacing.unit,marginTop:3*e.spacing.unit},infoText:{fontSize:2*e.spacing.unit,fontWeight:450,marginLeft:6*e.spacing.unit},modalContent:{width:"inherit"},deleteButton:{marginTop:4*e.spacing.unit},runJobButton:{marginBottom:3*e.spacing.unit},runJobModalContent:{overflow:"hidden"}})};function _j(e){var t,n=e.evmChainID,r=e.address,i={evmChainID:n,address:r,abandon:e.abandon,enabled:e.enabled};return iG.v2.evmKeys.chain(i)}var _F=function(){return l.createElement(l.Fragment,null,"Successfully updated EVM key")},_Y=function(e){var t=e.classes,n=e.ethKey,r=e.refetch,i=(0,A.I0)(),a=_D((0,l.useState)(!1),2),o=a[0],s=a[1],u=_D((0,l.useState)(!n.isDisabled),2),c=u[0],f=u[1],h=_D((0,l.useState)(!1),2),p=h[0],b=h[1],m=function(e){e.preventDefault(),w(p,c)},g=function(){f(!c)},v=function(){b(!p)},y=function(){s(!1),b(!1),f(!n.isDisabled)};function w(e,t){return _.apply(this,arguments)}function _(){return(_=_L(function(e,t){var a;return _P(this,function(o){return _j(((a={}).evmChainID=n.chain.id,a.address=n.address,a.abandon=e,a.enabled=t,a)).then(function(e){var t=e.data;r&&r(),y(),i((0,ty.t5)(_F,t))}).catch(function(e){r&&r(),y(),i((0,ty.cB)(aN,e))}),[2]})})).apply(this,arguments)}return l.createElement(l.Fragment,null,l.createElement(aD.Z,{open:o,classes:{paper:t.dialogPaper},onClose:y,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description"},l.createElement("form",{onSubmit:m},l.createElement(d.Z,{container:!0,spacing:0},l.createElement(d.Z,{item:!0,className:t.modalContent},l.createElement(d.Z,{container:!0,alignItems:"baseline",justify:"space-between"},l.createElement(d.Z,{item:!0},l.createElement(x.default,{variant:"h5",color:"secondary",className:t.warningText},"Key Admin Override"),l.createElement(x.default,{variant:"h6",color:"secondary",className:t.warningText},"Modifying key ",n.address," for chain ",n.chain.id)),l.createElement(d.Z,{item:!0},l.createElement(aI,{className:t.closeButton,onClick:y}))),l.createElement(d.Z,{container:!0,direction:"column"},l.createElement(b9.default,null,l.createElement(hz.Z,{className:t.infoText,color:"secondary",control:l.createElement(h$.Z,{name:"enabledCheckbox",checked:c,onChange:g}),label:"Enabled"})),l.createElement(b9.default,null,l.createElement(hz.Z,{className:t.infoText,color:"secondary",control:l.createElement(h$.Z,{name:"abandonCheckbox",checked:p,onChange:v}),label:"Abandon all current transactions (use with caution!)"})),l.createElement(d.Z,{container:!0,spacing:0,alignItems:"center",justify:"center"},l.createElement(d.Z,{item:!0,className:t.deleteButton},l.createElement(aA.Z,{variant:"danger",type:"submit"},"Update")))))))),l.createElement(ir.Z,{hover:!0},l.createElement(r7.default,null,l.createElement(x.default,{variant:"body1"},_T(n.address,{start:6,end:6})," ",l.createElement(_x,{data:n.address}))),l.createElement(r7.default,null,l.createElement(x.default,{variant:"body1"},n.chain.id)),l.createElement(r7.default,null,l.createElement(x.default,{variant:"body1"},n.isDisabled?"Disabled":"Enabled")),l.createElement(r7.default,null,l.createElement(x.default,{variant:"body1"},n.linkBalance&&gL(n.linkBalance))),l.createElement(r7.default,null,l.createElement(x.default,{variant:"body1"},n.ethBalance)),l.createElement(r7.default,null,l.createElement(x.default,{variant:"body1"},l.createElement(aO,{tooltip:!0},n.createdAt))),l.createElement(r7.default,null,l.createElement(x.default,{variant:"body1"},l.createElement(aA.Z,{onClick:function(){return s(!0)}},"Admin")))))},_B=(0,b.withStyles)(_R)(_Y),_U=function(e){var t,n,r=e.data,i=e.errorMsg,a=e.loading,o=e.refetch;return l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"EVM Chain Accounts"}),l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,"Address"),l.createElement(r7.default,null,"Chain ID"),l.createElement(r7.default,null,"Enabled"),l.createElement(r7.default,null,"LINK Balance"),l.createElement(r7.default,null,"Native Token Balance"),l.createElement(r7.default,null,"Created"),l.createElement(r7.default,null,"Actions"))),l.createElement(r9.Z,null,l.createElement(g$,{visible:a}),l.createElement(gz,{visible:(null===(t=null==r?void 0:r.ethKeys.results)||void 0===t?void 0:t.length)===0}),l.createElement(gU,{msg:i}),null===(n=null==r?void 0:r.ethKeys.results)||void 0===n?void 0:n.map(function(e,t){return l.createElement(_B,{ethKey:e,key:t,refetch:o})}))))};function _H(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function _$(){var e=_H(["\n fragment ETHKeysPayload_ResultsFields on EthKey {\n address\n chain {\n id\n }\n createdAt\n ethBalance\n isDisabled\n linkBalance\n }\n"]);return _$=function(){return e},e}function _z(){var e=_H(["\n ","\n query FetchETHKeys {\n ethKeys {\n results {\n ...ETHKeysPayload_ResultsFields\n }\n }\n }\n"]);return _z=function(){return e},e}var _G=n0(_$()),_W=n0(_z(),_G),_K=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return rv(_W,e)},_V=function(){var e=_K({fetchPolicy:"cache-and-network"}),t=e.data,n=e.loading,r=e.error,i=e.refetch;return l.createElement(_U,{loading:n,data:t,errorMsg:null==r?void 0:r.message,refetch:i})},_q=function(e){var t=e.csaKey;return l.createElement(ir.Z,{hover:!0},l.createElement(r7.default,null,l.createElement(x.default,{variant:"body1"},t.publicKey," ",l.createElement(_x,{data:t.publicKey}))))};function _Z(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function _X(){var e=_Z(["\n fragment CSAKeysPayload_ResultsFields on CSAKey {\n id\n publicKey\n }\n"]);return _X=function(){return e},e}var _J=n0(_X()),_Q=function(e){var t,n,r,i=e.data,a=e.errorMsg,o=e.loading,s=e.onCreate;return l.createElement(r5.Z,null,l.createElement(sl.Z,{action:(null===(t=null==i?void 0:i.csaKeys.results)||void 0===t?void 0:t.length)===0&&l.createElement(ok.default,{variant:"outlined",color:"primary",onClick:s},"New CSA Key"),title:"CSA Key",subheader:"Manage your CSA Key"}),l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,"Public Key"))),l.createElement(r9.Z,null,l.createElement(g$,{visible:o}),l.createElement(gz,{visible:(null===(n=null==i?void 0:i.csaKeys.results)||void 0===n?void 0:n.length)===0}),l.createElement(gU,{msg:a}),null===(r=null==i?void 0:i.csaKeys.results)||void 0===r?void 0:r.map(function(e,t){return l.createElement(_q,{csaKey:e,key:t})}))))};function _1(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _0(e){if(Array.isArray(e))return e}function _2(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function _3(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){_2(a,r,i,o,s,"next",e)}function s(e){_2(a,r,i,o,s,"throw",e)}o(void 0)})}}function _4(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function _6(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _5(e,t){return _0(e)||_4(e,t)||_9(e,t)||_6()}function _8(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function _9(e,t){if(e){if("string"==typeof e)return _1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _1(e,t)}}var _7=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};function Ee(){var e=_8(["\n ","\n query FetchCSAKeys {\n csaKeys {\n results {\n ...CSAKeysPayload_ResultsFields\n }\n }\n }\n"]);return Ee=function(){return e},e}function Et(){var e=_8(["\n mutation CreateCSAKey {\n createCSAKey {\n ... on CreateCSAKeySuccess {\n csaKey {\n id\n }\n }\n ... on CSAKeyExistsError {\n message\n }\n }\n }\n"]);return Et=function(){return e},e}var En=n0(Ee(),_J),Er=n0(Et()),Ei=function(){var e,t=(0,A.I0)(),n=oq().handleMutationError,r=rv(En,{fetchPolicy:"network-only"}),i=r.data,a=r.loading,o=r.error,s=r.refetch,u=_5(oo(Er),1)[0],c=(e=_3(function(){var e,r,i,a;return _7(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,u()];case 1:return(null==(i=null===(e=(r=o.sent()).data)||void 0===e?void 0:e.createCSAKey)?void 0:i.__typename)==="CreateCSAKeySuccess"&&(t((0,ty.qt)("CSA Key created")),s()),[3,3];case 2:return n(a=o.sent()),[3,3];case 3:return[2]}})}),function(){return e.apply(this,arguments)});return l.createElement(_Q,{loading:a,data:i,errorMsg:null==o?void 0:o.message,onCreate:c})},Ea=function(e){var t=e.keyType,n=e.keyValue;return(0,ty.qt)("Successfully created ".concat(t,": ").concat(n))},Eo=function(e){var t=e.keyType;return(0,ty.qt)("Successfully deleted ".concat(t," Key"))},Es=n(10632),Eu=n(90338),Ec=n(34064),El=function(e){return(0,b.createStyles)({listItemPrimary:{marginBottom:e.spacing.unit},listItemSecondary:{color:e.palette.grey[600]},avatar:{backgroundColor:e.palette.primary.main}})},Ef=(0,b.withStyles)(El)(function(e){var t=e.classes,n=e.primary,r=e.secondary;return l.createElement(w.default,{dense:!0},l.createElement(_.default,null,l.createElement(oc.Z,null,l.createElement(Eu.Z,{className:t.avatar},l.createElement(Ec.Z,null))),l.createElement(E.Z,{primary:l.createElement(x.default,{className:t.listItemPrimary,variant:"body1",component:"span"},n),secondary:r.map(function(e,n){return l.createElement(x.default,{key:n,className:t.listItemSecondary,variant:"subtitle2",component:"span"},e)})})))}),Ed=function(e){var t=e.bundle,n=e.onDelete;return l.createElement(ir.Z,{hover:!0},l.createElement(r7.default,null,l.createElement(Ef,{primary:l.createElement("b",null,"Key ID: ",t.id," ",l.createElement(_x,{data:t.id})),secondary:[l.createElement(l.Fragment,null,"Config Public Key: ",t.configPublicKey),l.createElement(l.Fragment,null,"Signing Address: ",t.onChainSigningAddress),l.createElement(l.Fragment,null,"Off-Chain Public Key: ",t.offChainPublicKey),]})),l.createElement(r7.default,{align:"right"},l.createElement(aA.Z,{onClick:n,variant:"danger",size:"medium"},"Delete")))};function Eh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ep(e){if(Array.isArray(e))return e}function Eb(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function Em(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){Eb(a,r,i,o,s,"next",e)}function s(e){Eb(a,r,i,o,s,"throw",e)}o(void 0)})}}function Eg(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function Ev(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ey(e,t){return Ep(e)||Eg(e,t)||Ew(e,t)||Ev()}function Ew(e,t){if(e){if("string"==typeof e)return Eh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Eh(e,t)}}var E_=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},EE=function(e){var t,n,r=e.data,i=e.errorMsg,a=e.loading,o=e.onCreate,s=e.onDelete,u=Ey(l.useState(null),2),c=u[0],f=u[1];return l.createElement(l.Fragment,null,l.createElement(r5.Z,null,l.createElement(sl.Z,{action:l.createElement(ok.default,{variant:"outlined",color:"primary",onClick:o},"New OCR Key"),title:"Off-Chain Reporting Keys",subheader:"Manage your Off-Chain Reporting Key Bundles"}),l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,"Key Bundle"),l.createElement(r7.default,{align:"right"}))),l.createElement(r9.Z,null,l.createElement(g$,{visible:a}),l.createElement(gz,{visible:(null===(t=null==r?void 0:r.ocrKeyBundles.results)||void 0===t?void 0:t.length)===0}),l.createElement(gU,{msg:i}),null===(n=null==r?void 0:r.ocrKeyBundles.results)||void 0===n?void 0:n.map(function(e,t){return l.createElement(Ed,{bundle:e,key:t,onDelete:function(){return f(e.id)}})})))),l.createElement(oC,{open:!!c,maxWidth:!1,title:"Delete OCR Key Bundle",body:l.createElement(Es.Z,{label:c}),confirmButtonText:"Confirm",onConfirm:Em(function(){return E_(this,function(e){switch(e.label){case 0:if(!c)return[3,2];return[4,s(c)];case 1:e.sent(),f(null),e.label=2;case 2:return[2]}})}),cancelButtonText:"Cancel",onCancel:function(){return f(null)}}))};function ES(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Ek(){var e=ES(["\n fragment OCRKeyBundlesPayload_ResultsFields on OCRKeyBundle {\n id\n configPublicKey\n offChainPublicKey\n onChainSigningAddress\n }\n"]);return Ek=function(){return e},e}function Ex(){var e=ES(["\n ","\n query FetchOCRKeyBundles {\n ocrKeyBundles {\n results {\n ...OCRKeyBundlesPayload_ResultsFields\n }\n }\n }\n"]);return Ex=function(){return e},e}var ET=n0(Ek()),EM=n0(Ex(),ET),EO=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return rv(EM,e)};function EA(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function EL(e){if(Array.isArray(e))return e}function EC(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function EI(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){EC(a,r,i,o,s,"next",e)}function s(e){EC(a,r,i,o,s,"throw",e)}o(void 0)})}}function ED(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function EN(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function EP(e,t){return EL(e)||ED(e,t)||Ej(e,t)||EN()}function ER(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Ej(e,t){if(e){if("string"==typeof e)return EA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return EA(e,t)}}var EF=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};function EY(){var e=ER(["\n mutation CreateOCRKeyBundle {\n createOCRKeyBundle {\n ... on CreateOCRKeyBundleSuccess {\n bundle {\n id\n }\n }\n }\n }\n"]);return EY=function(){return e},e}function EB(){var e=ER(["\n mutation DeleteOCRKeyBundle($id: ID!) {\n deleteOCRKeyBundle(id: $id) {\n ... on DeleteOCRKeyBundleSuccess {\n bundle {\n id\n }\n }\n }\n }\n"]);return EB=function(){return e},e}var EU=n0(EY()),EH=n0(EB()),E$=function(){var e,t,n=(0,A.I0)(),r=oq().handleMutationError,i=EO({fetchPolicy:"network-only"}),a=i.data,o=i.loading,s=i.error,u=i.refetch,c=EP(oo(EU),1)[0],f=EP(oo(EH),1)[0],d=(e=EI(function(){var e,t,i,a,o;return EF(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,c()];case 1:return i=null===(e=(t=s.sent()).data)||void 0===e?void 0:e.createOCRKeyBundle,a={},(null==i?void 0:i.__typename)==="CreateOCRKeyBundleSuccess"&&(n(Ea((a.keyType="Off-ChainReporting Key Bundle",a.keyValue=i.bundle.id,a))),u()),[3,3];case 2:return r(o=s.sent()),[3,3];case 3:return[2]}})}),function(){return e.apply(this,arguments)}),h=(t=EI(function(e){var t,i,a,o,s,c;return EF(this,function(l){switch(l.label){case 0:return l.trys.push([0,2,,3]),[4,f(((a={}).variables={id:e},a))];case 1:return o=null===(t=(i=l.sent()).data)||void 0===t?void 0:t.deleteOCRKeyBundle,s={},(null==o?void 0:o.__typename)==="DeleteOCRKeyBundleSuccess"&&(n(Eo((s.keyType="Off-ChainReporting Key Bundle",s))),u()),[3,3];case 2:return r(c=l.sent()),[3,3];case 3:return[2]}})}),function(e){return t.apply(this,arguments)});return l.createElement(EE,{loading:o,data:a,errorMsg:null==s?void 0:s.message,onCreate:d,onDelete:h})},Ez=function(e){var t=e.bundle,n=e.onDelete;return l.createElement(ir.Z,{hover:!0},l.createElement(r7.default,null,l.createElement(Ef,{primary:l.createElement("b",null,"Key ID: ",t.id," ",l.createElement(_x,{data:t.id})),secondary:[l.createElement(l.Fragment,null,"Chain Type: ",t.chainType),l.createElement(l.Fragment,null,"Config Public Key: ",t.configPublicKey),l.createElement(l.Fragment,null,"On-Chain Public Key: ",t.onChainPublicKey),l.createElement(l.Fragment,null,"Off-Chain Public Key: ",t.offChainPublicKey),]})),l.createElement(r7.default,{align:"right"},l.createElement(aA.Z,{onClick:n,variant:"danger",size:"medium"},"Delete")))};function EG(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function EW(){var e=EG(["\n fragment OCR2KeyBundlesPayload_ResultsFields on OCR2KeyBundle {\n id\n chainType\n configPublicKey\n onChainPublicKey\n offChainPublicKey\n }\n"]);return EW=function(){return e},e}function EK(){var e=EG(["\n ","\n query FetchOCR2KeyBundles {\n ocr2KeyBundles {\n results {\n ...OCR2KeyBundlesPayload_ResultsFields\n }\n }\n }\n"]);return EK=function(){return e},e}function EV(){var e=EG(["\n mutation DeleteOCR2KeyBundle($id: ID!) {\n deleteOCR2KeyBundle(id: $id) {\n ... on DeleteOCR2KeyBundleSuccess {\n bundle {\n id\n }\n }\n }\n }\n"]);return EV=function(){return e},e}function Eq(){var e=EG(["\n mutation createOCR2KeyBundle($chainType: OCR2ChainType!) {\n createOCR2KeyBundle(chainType: $chainType) {\n ... on CreateOCR2KeyBundleSuccess {\n bundle {\n chainType\n configPublicKey\n id\n offChainPublicKey\n onChainPublicKey\n }\n }\n }\n }\n"]);return Eq=function(){return e},e}function EZ(){var e=EG(['\n query GetChainFamily {\n __type(name: "OCR2ChainType") {\n enumValues {\n name\n }\n }\n }\n']);return EZ=function(){return e},e}var EX=n0(EW()),EJ=n0(EK(),EX),EQ=n0(EV()),E1=n0(Eq()),E0=n0(EZ()),E2=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return rv(EJ,e)},E3=function(){return oo(EQ)},E4=function(){return oo(E1)},E6=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return rv(E0,e)};function E5(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function E8(e){if(Array.isArray(e))return e}function E9(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function E7(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Se(e,t){return E8(e)||E9(e,t)||St(e,t)||E7()}function St(e,t){if(e){if("string"==typeof e)return E5(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return E5(e,t)}}var Sn=function(e){var t=e.showCreateKeyDialog,n=e.setToggleCreateKeyDialog,r=e.onCreate,i=Se(l.useState(void 0),2),a=i[0],o=i[1],s=E6(),u=s.loading,c=s.error,f=s.data;if(u||c)return l.createElement("div",null);var d=function(e){o(e.target.value)},h=function(){n(!1),void 0!=a&&r(a)},p=null==f?void 0:f.__type.enumValues.map(function(e){return e.name});return a||o(p[0]),l.createElement(oC,{open:t,maxWidth:!1,title:"Create OCR2 Key Bundle",body:l.createElement(iw.Z,{id:"ocr2-create-key",name:"ocr2 create key",fullWidth:!0,select:!0,label:"Chain type",value:a,onChange:d,helperText:"Create OCR2 Key bundle"},null==p?void 0:p.map(function(e){return l.createElement(tE.default,{key:e,value:e,name:e},e)})),confirmButtonText:"Create",confirmButtonEnabled:!a,onConfirm:h,cancelButtonText:"Cancel",onCancel:function(){return n(!1)}})};function Sr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Si(e){if(Array.isArray(e))return e}function Sa(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function So(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){Sa(a,r,i,o,s,"next",e)}function s(e){Sa(a,r,i,o,s,"throw",e)}o(void 0)})}}function Ss(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function Su(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Sc(e,t){return Si(e)||Ss(e,t)||Sl(e,t)||Su()}function Sl(e,t){if(e){if("string"==typeof e)return Sr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Sr(e,t)}}var Sf=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Sd=function(e){var t,n,r=e.data,i=e.loading,a=e.onDelete,o=e.onCreate,s=Sc(l.useState(null),2),u=s[0],c=s[1],f=Sc(l.useState(!1),2),d=f[0],h=f[1];return l.createElement(l.Fragment,null,l.createElement(r5.Z,null,l.createElement(sl.Z,{action:l.createElement(ok.default,{variant:"outlined",color:"primary",onClick:function(){return h(!0)}},"New OCR2 Key"),title:"Off-Chain Reporting 2 Keys",subheader:"Manage your Off-Chain Reporting 2 Key Bundles"}),l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,"Key Bundle"),l.createElement(r7.default,{align:"right"}))),l.createElement(r9.Z,null,l.createElement(g$,{visible:i}),l.createElement(gz,{visible:(null===(t=null==r?void 0:r.ocr2KeyBundles.results)||void 0===t?void 0:t.length)===0}),null===(n=null==r?void 0:r.ocr2KeyBundles.results)||void 0===n?void 0:n.map(function(e,t){return l.createElement(Ez,{bundle:e,key:t,onDelete:function(){return c(e.id)}})})))),l.createElement(oC,{open:!!u,maxWidth:!1,title:"Delete OCR2 Key Bundle",body:l.createElement(Es.Z,{label:u}),confirmButtonText:"Confirm",onConfirm:So(function(){return Sf(this,function(e){switch(e.label){case 0:if(!u)return[3,2];return[4,a(u)];case 1:e.sent(),c(null),e.label=2;case 2:return[2]}})}),cancelButtonText:"Cancel",onCancel:function(){return c(null)}}),l.createElement(Sn,{onCreate:o,showCreateKeyDialog:d,setToggleCreateKeyDialog:h}))};function Sh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Sp(e){if(Array.isArray(e))return e}function Sb(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Sm(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function Sg(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Sv(e,t){return Sp(e)||Sm(e,t)||Sy(e,t)||Sg()}function Sy(e,t){if(e){if("string"==typeof e)return Sh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Sh(e,t)}}var Sw=function(){var e=Sv(l.useState(),2),t=e[0],n=e[1],r=(0,h.k6)(),i=(0,A.I0)();return l.useEffect(function(){if(t){if(Sb(t,rs.cA)){var e=!0,n=!1,a=void 0;try{for(var o,s=t.graphQLErrors[Symbol.iterator]();!(e=(o=s.next()).done);e=!0){var u,c=o.value;if((null===(u=c.extensions)||void 0===u?void 0:u.code)=="UNAUTHORIZED"){i((0,ty.LO)("Unauthorized, please log in with proper credentials")),i((0,ty.Jc)()),r.push("/signin");return}}}catch(l){n=!0,a=l}finally{try{e||null==s.return||s.return()}finally{if(n)throw a}}}i((0,ty.LO)(t.message||"An error occurred"))}},[i,t,r]),{handleQueryError:n}};function S_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function SE(e){if(Array.isArray(e))return e}function SS(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function Sk(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){SS(a,r,i,o,s,"next",e)}function s(e){SS(a,r,i,o,s,"throw",e)}o(void 0)})}}function Sx(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function ST(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function SM(e,t){return SE(e)||Sx(e,t)||SO(e,t)||ST()}function SO(e,t){if(e){if("string"==typeof e)return S_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S_(e,t)}}var SA=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},SL=function(){var e,t,n=(0,A.I0)(),r=Sw().handleQueryError,i=E2({fetchPolicy:"network-only",onError:r}),a=i.data,o=i.loading,s=i.refetch,u=SM(E3(),1)[0],c=SM(E4(),1)[0],f=(e=Sk(function(e){var t,i,a,o,c,l;return SA(this,function(f){switch(f.label){case 0:return f.trys.push([0,2,,3]),[4,u(((a={}).variables={id:e},a))];case 1:return o=null===(t=(i=f.sent()).data)||void 0===t?void 0:t.deleteOCR2KeyBundle,c={},(null==o?void 0:o.__typename)==="DeleteOCR2KeyBundleSuccess"&&(n(Eo((c.keyType="Off-ChainReporting Key Bundle",c))),s()),[3,3];case 2:return r(l=f.sent()),[3,3];case 3:return[2]}})}),function(t){return e.apply(this,arguments)}),d=(t=Sk(function(e){var t,i,a,o,u;return SA(this,function(l){switch(l.label){case 0:return l.trys.push([0,2,,3]),[4,c(((a={}).variables={chainType:e},a))];case 1:return(null==(o=null===(t=(i=l.sent()).data)||void 0===t?void 0:t.createOCR2KeyBundle)?void 0:o.__typename)==="CreateOCR2KeyBundleSuccess"&&(n((0,ty.qt)(e+" OCR2 key bundle created")),s()),[3,3];case 2:return r(u=l.sent()),[3,3];case 3:return[2]}})}),function(e){return t.apply(this,arguments)});return l.createElement(Sd,{loading:o,data:a,onDelete:f,onCreate:d})},SC=function(e){return(0,b.createStyles)({cardContent:{padding:0,"&:last-child":{padding:0}},avatar:{backgroundColor:e.palette.grey[800]}})},SI=(0,b.withStyles)(SC)(function(e){var t=e.classes,n=e.p2pKey,r=e.onDelete;return l.createElement(ir.Z,{hover:!0},l.createElement(r7.default,null,l.createElement(Ef,{classes:{avatar:t.avatar},primary:l.createElement("b",null,"Peer ID: ",n.peerID," ",l.createElement(_x,{data:n.peerID})),secondary:[l.createElement(l.Fragment,null,"Public Key: ",n.publicKey)]})),l.createElement(r7.default,{align:"right"},l.createElement(aA.Z,{onClick:r,variant:"danger",size:"medium"},"Delete")))});function SD(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function SN(e){if(Array.isArray(e))return e}function SP(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function SR(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){SP(a,r,i,o,s,"next",e)}function s(e){SP(a,r,i,o,s,"throw",e)}o(void 0)})}}function Sj(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function SF(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function SY(e,t){return SN(e)||Sj(e,t)||SB(e,t)||SF()}function SB(e,t){if(e){if("string"==typeof e)return SD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return SD(e,t)}}var SU=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},SH=function(e){var t,n,r=e.data,i=e.errorMsg,a=e.loading,o=e.onCreate,s=e.onDelete,u=SY(l.useState(null),2),c=u[0],f=u[1];return l.createElement(l.Fragment,null,l.createElement(r5.Z,null,l.createElement(sl.Z,{action:l.createElement(ok.default,{variant:"outlined",color:"primary",onClick:o},"New P2P Key"),title:"P2P Keys",subheader:"Manage your P2P Key Bundles"}),l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,"Key Bundle"),l.createElement(r7.default,{align:"right"}))),l.createElement(r9.Z,null,l.createElement(g$,{visible:a}),l.createElement(gz,{visible:(null===(t=null==r?void 0:r.p2pKeys.results)||void 0===t?void 0:t.length)===0}),l.createElement(gU,{msg:i}),null===(n=null==r?void 0:r.p2pKeys.results)||void 0===n?void 0:n.map(function(e,t){return l.createElement(SI,{p2pKey:e,key:t,onDelete:function(){return f(e.id)}})})))),l.createElement(oC,{open:!!c,maxWidth:!1,title:"Delete OCR Key Bundle",body:l.createElement(Es.Z,{label:c}),confirmButtonText:"Confirm",onConfirm:SR(function(){return SU(this,function(e){switch(e.label){case 0:if(!c)return[3,2];return[4,s(c)];case 1:e.sent(),f(null),e.label=2;case 2:return[2]}})}),cancelButtonText:"Cancel",onCancel:function(){return f(null)}}))};function S$(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Sz(){var e=S$(["\n fragment P2PKeysPayload_ResultsFields on P2PKey {\n id\n peerID\n publicKey\n }\n"]);return Sz=function(){return e},e}function SG(){var e=S$(["\n ","\n query FetchP2PKeys {\n p2pKeys {\n results {\n ...P2PKeysPayload_ResultsFields\n }\n }\n }\n"]);return SG=function(){return e},e}var SW=n0(Sz()),SK=n0(SG(),SW),SV=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return rv(SK,e)};function Sq(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function SZ(e){if(Array.isArray(e))return e}function SX(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function SJ(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){SX(a,r,i,o,s,"next",e)}function s(e){SX(a,r,i,o,s,"throw",e)}o(void 0)})}}function SQ(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function S1(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function S0(e,t){return SZ(e)||SQ(e,t)||S3(e,t)||S1()}function S2(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function S3(e,t){if(e){if("string"==typeof e)return Sq(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Sq(e,t)}}var S4=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};function S6(){var e=S2(["\n ","\n mutation CreateP2PKey {\n createP2PKey {\n ... on CreateP2PKeySuccess {\n p2pKey {\n ...P2PKeysPayload_ResultsFields\n }\n }\n }\n }\n"]);return S6=function(){return e},e}function S5(){var e=S2(["\n ","\n mutation DeleteP2PKey($id: ID!) {\n deleteP2PKey(id: $id) {\n ... on DeleteP2PKeySuccess {\n p2pKey {\n ...P2PKeysPayload_ResultsFields\n }\n }\n }\n }\n"]);return S5=function(){return e},e}var S8=n0(S6(),SW),S9=n0(S5(),SW),S7=function(){var e,t,n=(0,A.I0)(),r=oq().handleMutationError,i=SV(),a=i.data,o=i.loading,s=i.error,u=i.refetch,c=S0(oo(S8),1)[0],f=S0(oo(S9),1)[0],d=(e=SJ(function(){var e,t,i,a,o;return S4(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,c()];case 1:return i=null===(e=(t=s.sent()).data)||void 0===e?void 0:e.createP2PKey,a={},(null==i?void 0:i.__typename)==="CreateP2PKeySuccess"&&(n(Ea((a.keyType="P2P Key",a.keyValue=i.p2pKey.id,a))),u()),[3,3];case 2:return r(o=s.sent()),[3,3];case 3:return[2]}})}),function(){return e.apply(this,arguments)}),h=(t=SJ(function(e){var t,i,a,o,s,c;return S4(this,function(l){switch(l.label){case 0:return l.trys.push([0,2,,3]),[4,f(((a={}).variables={id:e},a))];case 1:return o=null===(t=(i=l.sent()).data)||void 0===t?void 0:t.deleteP2PKey,s={},(null==o?void 0:o.__typename)==="DeleteP2PKeySuccess"&&(n(Eo((s.keyType="P2P",s))),u()),[3,3];case 2:return r(c=l.sent()),[3,3];case 3:return[2]}})}),function(e){return t.apply(this,arguments)});return l.createElement(SH,{loading:o,data:a,errorMsg:null==s?void 0:s.message,onCreate:d,onDelete:h})},ke=function(e){var t=e.isCSAKeysFeatureEnabled;return l.createElement(ig,null,l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12},l.createElement(E$,null)),l.createElement(d.Z,{item:!0,xs:12},l.createElement(SL,null)),l.createElement(d.Z,{item:!0,xs:12},l.createElement(S7,null)),l.createElement(d.Z,{item:!0,xs:12},l.createElement(_V,null)),l.createElement(d.Z,{item:!0,xs:12},t&&l.createElement(Ei,null))))},kt=function(){var e=rL(i.CSA);return l.createElement(ke,{isCSAKeysFeatureEnabled:e})},kn=function(){return l.createElement(kt,null)},kr=function(e){var t=e.errors;return l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Errors"}),l.createElement("ul",null,t.map(function(e,t){return l.createElement("li",{key:e+t},l.createElement(x.default,{variant:"body1"},e))})))},ki=function(e){var t=e.run;return l.createElement(oh,null,l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12,sm:4,md:2},l.createElement(op,{title:"ID"}),l.createElement(ob,{value:t.id})),l.createElement(d.Z,{item:!0,xs:12,sm:4,md:6},l.createElement(op,{title:"Job"}),l.createElement(ih,{href:"/jobs/".concat(t.job.id),color:"primary"},t.job.name)),l.createElement(d.Z,{item:!0,xs:12,sm:6,md:2},l.createElement(op,{title:"Started"}),l.createElement(ob,null,l.createElement(aO,{tooltip:!0},t.createdAt))),l.createElement(d.Z,{item:!0,xs:12,sm:6,md:2},l.createElement(op,{title:"Finished"}),l.createElement(ob,null,t.finishedAt?l.createElement(aO,{tooltip:!0},t.finishedAt):"--"))))};function ka(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ko,ks=function(e){return(0,b.createStyles)({tabs:{marginTop:4*e.spacing.unit,marginBottom:2.5*e.spacing.unit,borderBottom:"1px solid ".concat(e.palette.grey["300"])},badge:{padding:"0 ".concat(2*e.spacing.unit,"px")}})};(ko=u||(u={}))[ko.Overview=0]="Overview",ko[ko.JSON=1]="JSON";var ku=(0,b.withStyles)(ks)(function(e){var t=e.classes,n=e.id,r=(0,h.TH)().pathname,i=l.useMemo(function(){var e;return ka(e={},u.Overview,"/runs/".concat(n)),ka(e,u.JSON,"/runs/".concat(n,"/json")),e},[n]);return l.createElement(vq.Z,{value:r,className:t.tabs,indicatorColor:"primary"},l.createElement(vJ,{label:"Overview",to:i[u.Overview],value:i[u.Overview]}),l.createElement(vJ,{label:"JSON",to:i[u.JSON],value:i[u.JSON]}))}),kc=1e3,kl=60,kf=3600;function kd(e,t){if(""===e&&""===t)return"";var n=kh(new Date(e),new Date(t));return kp(Math.floor(n/kf),Math.floor(n%kf/kl),Math.ceil(n%kf%kl))}function kh(e,t){return t.getTime()/kc-e.getTime()/kc}function kp(e,t,n){return"".concat(e?"".concat(e,"h"):"").concat(t?"".concat(t,"m"):"").concat(n,"s")}var kb=function(e){var t=e.start,n=e.end,r=e.className;return l.createElement(x.default,{variant:"h6",className:r},kd(t,n))};function km(e){return"string"!=typeof e?e:e.toLowerCase().replace(/_/g," ").replace(/(?:^|\s|-)\S/g,function(e){return e.toUpperCase()})}var kg,kv=function(e){return(0,b.createStyles)({cardContent:{display:"flex","&:last-child":{paddingBottom:2*e.spacing.unit}},completed:{backgroundColor:e.palette.success.light},errored:{backgroundColor:e.palette.error.light},running:{backgroundColor:e.palette.warning.light},body:{marginLeft:2*e.spacing.unit},statusText:{display:"inline-block",textTransform:"capitalize",color:e.palette.secondary.main},elapsedText:{color:e.typography.display1.color}})},ky=(0,b.withStyles)(kv)(function(e){var t=e.classes,n=e.status,r=e.startedAt,i=e.finishedAt,a=l.useMemo(function(){switch(n){case"COMPLETED":case"ERRORED":return i;case"RUNNING":return Date.now();default:return null}},[n,i]),o=t[n.toLowerCase()]||t.running;return l.createElement(r5.Z,null,l.createElement(aW.Z,{className:O()(t.cardContent,o)},l.createElement(g3,{width:64,status:n}),l.createElement("div",{className:t.body},l.createElement(x.default,{className:t.statusText,variant:"h5"},km(n)),a&&l.createElement(kb,{start:r,end:a,className:t.elapsedText}))))});(kg=c||(c={})).UNKNOWN="UNKNOWN",kg.PENDING="PENDING",kg.ERROR="ERROR",kg.COMPLETE="COMPLETE";var kw=function(e){var t=e.status,n=e.width,r=e.height;switch(t){case c.COMPLETE:return l.createElement(g2,{width:n,height:r,"data-testid":"complete-run-icon"});case c.ERROR:return l.createElement(gK,{width:n,height:r,"data-testid":"error-run-icon"});case c.PENDING:return l.createElement(gQ,{width:n,height:r,"data-testid":"pending-run-icon"});default:return l.createElement(gZ,{width:n,height:r,"data-testid":"default-run-icon"})}};function k_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function kE(e){if(Array.isArray(e))return e}function kS(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function kk(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function kx(e,t){return kE(e)||kS(e,t)||kT(e,t)||kk()}function kT(e,t){if(e){if("string"==typeof e)return k_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k_(e,t)}}var kM=function(e){return(0,b.createStyles)({root:{display:"flex",borderBottom:"1px solid rgba(0, 0, 0, 0.12);",padding:2*e.spacing.unit,"&:last-child":{borderBottom:"none"}},content:{flex:1,overflow:"auto",paddingLeft:2*e.spacing.unit},heading:{lineHeight:"".concat(5*e.spacing.unit,"px")},subheading:{color:e.palette.grey[500]},text:{marginBottom:e.spacing.unit,marginTop:e.spacing.unit},attributeKey:{fontWeight:e.typography.fontWeightLight}})},kO=(0,b.withStyles)(kM)(function(e){var t,n=e.attrs,r=e.classes,i=e.dotID,a=e.output,o=e.error,s=e.type;return t=o?c.ERROR:"null"==a?c.PENDING:c.COMPLETE,l.createElement("div",{className:r.root},l.createElement("div",null,l.createElement(kw,{status:t,width:40,height:40})),l.createElement("div",{className:r.content},l.createElement(x.default,{className:r.heading,variant:"h5"},i," ",l.createElement("small",{className:r.subheading},s)),[c.COMPLETE,c.ERROR].includes(t)&&l.createElement(x.default,{className:r.text,variant:"body1"},t===c.COMPLETE?a:o),n&&Object.entries(n).map(function(e){var t=kx(e,2),n=t[0],i=t[1];return"type"===n?null:l.createElement(x.default,{key:n,variant:"body1"},l.createElement("span",{className:r.attributeKey},n),": ",i)})))});function kA(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kL(){return(kL=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function kC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){kA(e,t,n[t])})}return e}function kI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kD(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):kI(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var kN=function(e){var t=e.taskRuns,n=e.observationSource,r=l.useMemo(function(){return yg("digraph {".concat(n,"}")).map(function(e){var n=t.find(function(t){return t.dotID===e.id});if(n)return kD(kC({},n),{attrs:e.attributes})})},[n,t]);return l.createElement(r5.Z,null,r.map(function(e,t){return e?l.createElement(kO,kL({},e,{key:t})):null}))},kP=n(63731),kR=n.n(kP),kj=n(93379),kF=n.n(kj),kY=n(97362),kB=n.n(kY),kU={};kU.insert="head",kU.singleton=!1,kF()(kB(),kU),kB().locals;var kH=function(e){var t=e.object;return l.createElement("div",{dangerouslySetInnerHTML:{__html:kR()(t)},"data-testid":"pretty-json"})};function k$(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kz(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){k$(e,t,n[t])})}return e}function kG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kW(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):kG(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function kK(e,t){if(null==e)return{};var n,r,i=kV(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function kV(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var kq=function(e){var t=e.run,n=l.useMemo(function(){var e=t.inputs,n=t.outputs,r=t.taskRuns,i=kK(t,["inputs","outputs","taskRuns"]),a={};try{a=JSON.parse(e)}catch(o){a={}}return kW(kz({},i),{inputs:a,outputs:n,taskRuns:r})},[t]);return l.createElement(r5.Z,null,l.createElement(aW.Z,null,l.createElement(kH,{object:n})))};function kZ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){kZ(e,t,n[t])})}return e}function kJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kQ(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):kJ(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function k1(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function k0(){var e=k1(["\n fragment JobRunPayload_TaskRunsFields on TaskRun {\n id\n createdAt\n dotID\n error\n finishedAt\n output\n type\n }\n"]);return k0=function(){return e},e}function k2(){var e=k1(["\n ","\n fragment JobRunPayload_Fields on JobRun {\n id\n allErrors\n createdAt\n fatalErrors\n finishedAt\n inputs\n job {\n id\n name\n observationSource\n }\n outputs\n status\n taskRuns {\n ...JobRunPayload_TaskRunsFields\n }\n }\n"]);return k2=function(){return e},e}var k3=n0(k0()),k4=n0(k2(),k3),k6=function(e){var t=e.run,n=(0,h.$B)().path,r=t.taskRuns.reduce(function(e,t){var n;return n=t.error?c.ERROR:"null"==t.output?c.PENDING:c.COMPLETE,kQ(kX({},e),kZ({},t.dotID,{status:n}))},{});return 0==t.allErrors.length&&yg("digraph {".concat(t.job.observationSource,"}")).forEach(function(e){var t;r[e.id]=kQ(kX({},e.attributes),{status:(null===(t=r[e.id])||void 0===t?void 0:t.status)||c.COMPLETE})}),l.createElement(ig,null,l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:12},l.createElement(iy,null,"Job Run #",t.id))),l.createElement(ki,{run:t}),l.createElement(ku,{id:t.id}),l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:4},l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12},l.createElement(ky,{status:t.status,startedAt:t.createdAt,finishedAt:t.finishedAt})),l.createElement(d.Z,{item:!0,xs:12},l.createElement(yF,{observationSource:t.job.observationSource,attributes:r})))),l.createElement(d.Z,{item:!0,xs:8},l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12},t.allErrors.length>0&&l.createElement(kr,{errors:t.allErrors})),l.createElement(d.Z,{item:!0,xs:12},l.createElement(h.rs,null,l.createElement(h.AW,{path:"".concat(n,"/json")},l.createElement(kq,{run:t})),l.createElement(h.AW,{path:n},t.taskRuns.length>0&&l.createElement(kN,{taskRuns:t.taskRuns,observationSource:t.job.observationSource}))))))))};function k5(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function k8(){var e=k5(["\n ","\n query FetchJobRun($id: ID!) {\n jobRun(id: $id) {\n __typename\n ... on JobRun {\n ...JobRunPayload_Fields\n }\n ... on NotFoundError {\n message\n }\n }\n }\n"]);return k8=function(){return e},e}var k9=n0(k8(),k4),k7=function(){var e=rv(k9,{variables:{id:(0,h.UO)().id}}),t=e.data,n=e.loading,r=e.error;if(n)return l.createElement(iR,null);if(r)return l.createElement(iD,{error:r});var i=null==t?void 0:t.jobRun;switch(null==i?void 0:i.__typename){case"JobRun":return l.createElement(k6,{run:i});case"NotFoundError":return l.createElement(oa,null);default:return null}};function xe(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function xt(){var e=xe(["\n fragment JobRunsPayload_ResultsFields on JobRun {\n id\n allErrors\n createdAt\n finishedAt\n status\n job {\n id\n }\n }\n"]);return xt=function(){return e},e}var xn=n0(xt()),xr=function(e){var t=e.loading,n=e.data,r=e.page,i=e.pageSize,a=(0,h.k6)(),o=l.useMemo(function(){return null==n?void 0:n.jobRuns.results.map(function(e){var t,n=e.allErrors,r=e.id,i=e.createdAt;return{id:r,createdAt:i,errors:n,finishedAt:e.finishedAt,status:e.status}})},[n]);return l.createElement(ig,null,l.createElement(d.Z,{container:!0,spacing:32},l.createElement(d.Z,{item:!0,xs:12},l.createElement(iy,null,"Job Runs")),t&&l.createElement(iR,null),n&&o&&l.createElement(d.Z,{item:!0,xs:12},l.createElement(r5.Z,null,l.createElement(yp,{runs:o}),l.createElement(it.Z,{component:"div",count:n.jobRuns.metadata.total,rowsPerPage:i,rowsPerPageOptions:[i],page:r-1,onChangePage:function(e,t){a.push("/runs?page=".concat(t+1,"&per=").concat(i))},onChangeRowsPerPage:function(){},backIconButtonProps:{"aria-label":"prev-page"},nextIconButtonProps:{"aria-label":"next-page"}})))))};function xi(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function xa(){var e=xi(["\n ","\n query FetchJobRuns($offset: Int, $limit: Int) {\n jobRuns(offset: $offset, limit: $limit) {\n results {\n ...JobRunsPayload_ResultsFields\n }\n metadata {\n total\n }\n }\n }\n"]);return xa=function(){return e},e}var xo=n0(xa(),xn),xs=function(){var e=ij(),t=parseInt(e.get("page")||"1",10),n=parseInt(e.get("per")||"25",10),r=rv(xo,{variables:{offset:(t-1)*n,limit:n},fetchPolicy:"cache-and-network"}),i=r.data,a=r.loading,o=r.error;return o?l.createElement(iD,{error:o}):l.createElement(xr,{loading:a,data:i,page:t,pageSize:n})},xu=function(){var e=(0,h.$B)().path;return l.createElement(h.rs,null,l.createElement(h.AW,{exact:!0,path:e},l.createElement(xs,null)),l.createElement(h.AW,{path:"".concat(e,"/:id")},l.createElement(k7,null)))};function xc(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function xl(){var e=xc(["\n fragment FetchFeedsManagersPayload_ResultsFields on FeedsManager {\n __typename\n id\n name\n uri\n publicKey\n isConnectionActive\n createdAt\n disabledAt\n }\n query FetchFeedsManagers {\n feedsManagers {\n results {\n ...FetchFeedsManagersPayload_ResultsFields\n }\n }\n }\n"]);return xl=function(){return e},e}var xf=n0(xl()),xd=function(e){return rv(xf,e)},xh=n(47559),xp=n(83165),xb=n(47298),xm=n(81395),xg=function(){return(0,b.createStyles)({root:{display:"flex"},activeIcon:{color:xh.default[500]},inactiveIcon:{color:xp.default[500]},text:{marginLeft:4}})},xv=(0,b.withStyles)(xg)(function(e){var t=e.isActive,n=e.activeText,r=e.inactiveText,i=e.classes;return l.createElement("div",{className:i.root},t?l.createElement(xm.Z,{fontSize:"small",className:i.activeIcon}):l.createElement(xb.Z,{fontSize:"small",className:i.inactiveIcon}),l.createElement(x.default,{variant:"body1",inline:!0,className:i.text},t?n:r))}),xy=(0,b.withStyles)(iu)(function(e){var t=e.jobDistributor,n=e.classes;return l.createElement(ir.Z,{className:n.row,hover:!0},l.createElement(r7.default,{className:n.cell,component:"th",scope:"row"},l.createElement(ih,{className:n.link,href:"/job_distributors/".concat(t.id)},t.name)),l.createElement(r7.default,null,l.createElement(xv,{isActive:t.isConnectionActive,activeText:"Connected",inactiveText:"Disconnected"})),l.createElement(r7.default,null,l.createElement(xv,{isActive:!t.disabledAt,activeText:"Enabled",inactiveText:"Disabled"})),l.createElement(r7.default,null,_T(t.publicKey,{start:6,end:6}),l.createElement(_x,{data:t.publicKey})),l.createElement(r7.default,null,t.uri))}),xw=function(e){var t=e.jobDistributors;return l.createElement(ig,null,l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:9},l.createElement(iy,null,"Job Distributors")),l.createElement(d.Z,{item:!0,xs:3},l.createElement(d.Z,{container:!0,justify:"flex-end"},l.createElement(d.Z,{item:!0},l.createElement(aA.Z,{variant:"secondary",component:tz,href:"/job_distributors/new"},"New Job Distributor")))),l.createElement(d.Z,{item:!0,xs:12},l.createElement(r5.Z,null,l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,"Name"),l.createElement(r7.default,null,"Connection Status"),l.createElement(r7.default,null,"Status"),l.createElement(r7.default,null,"CSA Public Key"),l.createElement(r7.default,null,"RPC URL"))),l.createElement(r9.Z,null,0===t.length&&l.createElement(ir.Z,null,l.createElement(r7.default,{component:"th",scope:"row",colSpan:3},"Job Distributors have not been registered")),t.map(function(e){return l.createElement(xy,{key:e.id,jobDistributor:e})})))))))},x_=function(){var e,t=xd({fetchPolicy:"cache-and-network"}),n=t.data,r=t.loading,i=t.error;return r?l.createElement(iR,null):i?l.createElement(iD,{error:i}):l.createElement(xw,{jobDistributors:null!==(e=null==n?void 0:n.feedsManagers.results)&&void 0!==e?e:[]})},xE=bv().shape({name:p0().required("Required"),uri:p0().required("Required"),publicKey:p0().required("Required")}),xS=function(e){var t=e.initialValues,n=e.onSubmit;return l.createElement(hT,{initialValues:t,validationSchema:xE,onSubmit:n},function(e){var t=e.isSubmitting,n=e.submitForm;return l.createElement(hR,{"data-testid":"feeds-manager-form"},l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"name",name:"name",label:"Name",required:!0,fullWidth:!0,FormHelperTextProps:{"data-testid":"name-helper-text"}})),l.createElement(d.Z,{item:!0,xs:!1,md:6}),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"uri",name:"uri",label:"URI",required:!0,fullWidth:!0,helperText:"Provided by the Job Distributor operator",FormHelperTextProps:{"data-testid":"uri-helper-text"}})),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"publicKey",name:"publicKey",label:"Public Key",required:!0,fullWidth:!0,helperText:"Provided by the Job Distributor operator",FormHelperTextProps:{"data-testid":"publicKey-helper-text"}})),l.createElement(d.Z,{item:!0,xs:12},l.createElement(ok.default,{variant:"contained",color:"primary",disabled:t,onClick:n},"Submit"))))})},xk=function(e){var t=e.data,n=e.onSubmit,r={name:t.name,uri:t.uri,publicKey:t.publicKey};return l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12,md:11,lg:9},l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Edit Job Distributor"}),l.createElement(aW.Z,null,l.createElement(xS,{initialValues:r,onSubmit:n})))))};function xx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function xT(e){if(Array.isArray(e))return e}function xM(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function xO(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){xM(a,r,i,o,s,"next",e)}function s(e){xM(a,r,i,o,s,"throw",e)}o(void 0)})}}function xA(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xL(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function xC(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function xI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){xA(e,t,n[t])})}return e}function xD(e,t){return xT(e)||xL(e,t)||xP(e,t)||xC()}function xN(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function xP(e,t){if(e){if("string"==typeof e)return xx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xx(e,t)}}var xR=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};function xj(){var e=xN(["\n mutation UpdateFeedsManager($id: ID!, $input: UpdateFeedsManagerInput!) {\n updateFeedsManager(id: $id, input: $input) {\n ... on UpdateFeedsManagerSuccess {\n feedsManager {\n id\n name\n uri\n publicKey\n isConnectionActive\n createdAt\n }\n }\n ... on NotFoundError {\n message\n code\n }\n ... on InputErrors {\n errors {\n path\n message\n code\n }\n }\n }\n }\n"]);return xj=function(){return e},e}var xF=n0(xj()),xY=function(){var e=(0,h.UO)().id,t=(0,h.k6)(),n=(0,A.I0)(),r=oq().handleMutationError,i=xd(),a=i.data,o=i.loading,s=i.error,u=xD(oo(xF),1)[0];if(o)return l.createElement(iR,null);if(s)return l.createElement(iD,{error:s});var c=null==a?void 0:a.feedsManagers.results.filter(function(t){return t.id===e})[0];if(!c)return l.createElement(h.l_,{to:{pathname:"/job_distributors"}});var f,d=(f=xO(function(e,i){var a,o,s,l,f,d;return xR(this,function(h){switch(h.label){case 0:a=i.setErrors,h.label=1;case 1:return h.trys.push([1,3,,4]),[4,u(((l={}).variables={id:c.id,input:xI({},e)},l))];case 2:switch(null==(f=null===(o=(s=h.sent()).data)||void 0===o?void 0:o.updateFeedsManager)?void 0:f.__typename){case"UpdateFeedsManagerSuccess":t.push("/job_distributors"),n((0,ty.qt)("Job Distributor Updated"));break;case"NotFoundError":n((0,ty.LO)(f.message));break;case"InputErrors":n((0,ty.LO)("Invalid Input")),a(wH(f))}return[3,4];case 3:return r(d=h.sent()),[3,4];case 4:return[2]}})}),function(e,t){return f.apply(this,arguments)});return l.createElement(xk,{data:c,onSubmit:d})};function xB(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function xU(){var e=xB(["\n fragment FeedsManager_ChainConfigFields on FeedsManagerChainConfig {\n id\n chainID\n chainType\n accountAddr\n adminAddr\n accountAddrPubKey\n fluxMonitorJobConfig {\n enabled\n }\n ocr1JobConfig {\n enabled\n isBootstrap\n multiaddr\n p2pPeerID\n keyBundleID\n }\n ocr2JobConfig {\n enabled\n isBootstrap\n multiaddr\n forwarderAddress\n p2pPeerID\n keyBundleID\n plugins {\n commit\n execute\n median\n mercury\n rebalancer\n }\n }\n }\n"]);return xU=function(){return e},e}function xH(){var e=xB(["\n ","\n fragment FeedsManagerFields on FeedsManager {\n id\n name\n uri\n publicKey\n isConnectionActive\n disabledAt\n chainConfigs {\n ...FeedsManager_ChainConfigFields\n }\n }\n"]);return xH=function(){return e},e}function x$(){var e=xB(["\n fragment FeedsManager_JobProposalsFields on JobProposal {\n id\n name\n externalJobID\n remoteUUID\n status\n pendingUpdate\n latestSpec {\n createdAt\n version\n }\n }\n"]);return x$=function(){return e},e}function xz(){var e=xB(["\n ","\n ","\n fragment FeedsManagerPayload_ResultsFields on FeedsManager {\n ...FeedsManagerFields\n jobProposals {\n ...FeedsManager_JobProposalsFields\n }\n }\n"]);return xz=function(){return e},e}function xG(){var e=xB(["\n ","\n query FetchFeedManagerWithProposals($id: ID!) {\n feedsManager(id: $id) {\n ...FeedsManagerPayload_ResultsFields\n ... on NotFoundError {\n message\n code\n }\n }\n }\n"]);return xG=function(){return e},e}var xW=n0(xU()),xK=n0(xH(),xW),xV=n0(x$()),xq=n0(xz(),xK,xV),xZ=n0(xG(),xq),xX=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return rv(xZ,e)},xJ=function(){return(0,b.createStyles)({root:{fontSize:24}})},xQ=(0,b.withStyles)(xJ)(function(e){var t=e.children,n=e.classes;return l.createElement(x.default,{variant:"h2",className:n.root},t)}),x1=n(9290),x0=n(74923);function x2(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function x3(e){if(Array.isArray(e))return e}function x4(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function x6(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function x5(e,t){return x3(e)||x4(e,t)||x8(e,t)||x6()}function x8(e,t){if(e){if("string"==typeof e)return x2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return x2(e,t)}}var x9=function(e){var t=e.manager,n=e.onEnable,r=e.onDisable,i=x5(l.useState(null),2),a=i[0],o=i[1],s=function(e){o(e.currentTarget)},u=function(){o(null)},c=function(){t.disabledAt?n():r(),u()};return l.createElement(oh,{actions:l.createElement("div",null,l.createElement(y.default,{onClick:s,"aria-label":"open-menu"},l.createElement(ol.Z,null)),l.createElement(t_.Z,{anchorEl:a,open:Boolean(a),onClose:u},l.createElement(tN,{to:"/job_distributors/".concat(t.id,"/edit")},l.createElement(oc.Z,null,l.createElement(os.Z,null)),l.createElement(E.Z,null,"Edit")),l.createElement(tE.default,{onClick:c},l.createElement(oc.Z,null,t.disabledAt?l.createElement(x0.Z,{style:{color:"green"}}):l.createElement(x1.Z,{style:{color:"gray"}})),l.createElement(E.Z,null,t.disabledAt?"Enable":"Disable"))))},l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12,sm:6,md:3},l.createElement(op,{title:"Connection Status"}),l.createElement(xv,{isActive:t.isConnectionActive,activeText:"Connected",inactiveText:"Disconnected"})),l.createElement(d.Z,{item:!0,xs:12,sm:6,md:3},l.createElement(op,{title:"Status"}),l.createElement(xv,{isActive:!t.disabledAt,activeText:"Enabled",inactiveText:"Disabled"})),l.createElement(d.Z,{item:!0,xs:12,sm:6,md:3},l.createElement(op,{title:"Name"}),l.createElement(ob,{value:t.name})),l.createElement(d.Z,{item:!0,xs:12,sm:6,md:3},l.createElement(op,{title:"CSA Public Key"}),l.createElement(ob,null,_T(t.publicKey,{start:6,end:6}),l.createElement(_x,{data:t.publicKey}))),l.createElement(d.Z,{item:!0,xs:12,sm:6,md:3},l.createElement(op,{title:"RPC URL"}),l.createElement(ob,{value:t.uri}))))},x7=(0,b.withStyles)(iu)(function(e){var t=e.classes,n=e.proposals;return l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,"ID"),l.createElement(r7.default,null,"Name"),l.createElement(r7.default,null,"External Job ID"),l.createElement(r7.default,null,"Latest Version"),l.createElement(r7.default,null,"Last Proposed"),l.createElement(r7.default,null))),l.createElement(r9.Z,null,null==n?void 0:n.map(function(e){return l.createElement(ir.Z,{key:e.id,className:t.row,hover:!0},l.createElement(r7.default,{className:t.cell,component:"th",scope:"row"},l.createElement(ih,{className:t.link,href:"/job_proposals/".concat(e.id)},e.id)),l.createElement(r7.default,null,e.name||"--"),l.createElement(r7.default,null,e.externalJobID||"--"),l.createElement(r7.default,null,e.latestSpec.version),l.createElement(r7.default,null,l.createElement(aO,{tooltip:!0},e.latestSpec.createdAt)),l.createElement(r7.default,{align:"right"},e.pendingUpdate&&l.createElement(Es.Z,{color:"primary"},"Update Available")))})))}),Te=(0,b.withStyles)(iu)(function(e){var t=e.classes,n=e.proposals;return l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,"ID"),l.createElement(r7.default,null,"Name"),l.createElement(r7.default,null,"Latest Version"),l.createElement(r7.default,null,"Last Proposed"),l.createElement(r7.default,null))),l.createElement(r9.Z,null,null==n?void 0:n.map(function(e){return l.createElement(ir.Z,{key:e.id,className:t.row,hover:!0},l.createElement(r7.default,{className:t.cell,component:"th",scope:"row"},l.createElement(ih,{className:t.link,href:"/job_proposals/".concat(e.id)},e.id)),l.createElement(r7.default,null,e.name||"--"),l.createElement(r7.default,null,e.latestSpec.version),l.createElement(r7.default,null,l.createElement(aO,{tooltip:!0},e.latestSpec.createdAt)),l.createElement(r7.default,{align:"right"},e.pendingUpdate&&l.createElement(Es.Z,{label:"Update Available",color:"primary"})))})))}),Tt=(0,b.withStyles)(iu)(function(e){var t=e.classes,n=e.proposals;return l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,"ID"),l.createElement(r7.default,null,"Name"),l.createElement(r7.default,null,"Last Proposed"))),l.createElement(r9.Z,null,null==n?void 0:n.map(function(e){return l.createElement(ir.Z,{key:e.id,className:t.row,hover:!0},l.createElement(r7.default,{className:t.cell,component:"th",scope:"row"},l.createElement(ih,{className:t.link,href:"/job_proposals/".concat(e.id)},e.id)),l.createElement(r7.default,null,e.name||"--"),l.createElement(r7.default,null,l.createElement(aO,{tooltip:!0},e.latestSpec.createdAt)))})))}),Tn=(0,b.withStyles)(iu)(function(e){var t=e.classes,n=e.proposals;return l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,"ID"),l.createElement(r7.default,null,"Name"),l.createElement(r7.default,null,"External Job ID"),l.createElement(r7.default,null,"Latest Version"),l.createElement(r7.default,null,"Last Proposed"))),l.createElement(r9.Z,null,null==n?void 0:n.map(function(e){return l.createElement(ir.Z,{key:e.id,className:t.row,hover:!0},l.createElement(r7.default,{className:t.cell,component:"th",scope:"row"},l.createElement(ih,{className:t.link,href:"/job_proposals/".concat(e.id)},e.id)),l.createElement(r7.default,null,e.name||"--"),l.createElement(r7.default,null,e.externalJobID||"--"),l.createElement(r7.default,null,e.latestSpec.version),l.createElement(r7.default,null,l.createElement(aO,{tooltip:!0},e.latestSpec.createdAt)))})))});function Tr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ti(e){if(Array.isArray(e))return e}function Ta(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function To(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ts(e,t){return Ti(e)||Ta(e,t)||Tu(e,t)||To()}function Tu(e,t){if(e){if("string"==typeof e)return Tr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Tr(e,t)}}var Tc={0:"PENDING",1:"UPDATES",2:"APPROVED",3:"REJECTED",4:"CANCELLED",5:"DELETED",6:"REVOKED"},Tl=function(e){return(0,b.createStyles)({tabsRoot:{borderBottom:"1px solid #e8e8e8"},badge:{padding:"0 ".concat(2*e.spacing.unit,"px")}})},Tf=function(e){var t=e.toLowerCase();return function(e){return e.toLowerCase().includes(t)}},Td=function(e){return function(t){return""===e||Th(t,e)}};function Th(e,t){var n,r=Tf(t),i=[e.id,e.remoteUUID,null!==(n=e.name)&&void 0!==n?n:"",];return e.externalJobID&&i.push(e.externalJobID),i.some(r)}var Tp=(0,b.withStyles)(Tl)(function(e){var t=e.classes,n=e.proposals,r=Ts(l.useState(0),2),i=r[0],a=r[1],o=Ts(l.useState(""),2),s=o[0],u=o[1],c=l.useMemo(function(){var e={PENDING:0,UPDATES:0,APPROVED:0,REJECTED:0,CANCELLED:0,DELETED:0,REVOKED:0};return n.forEach(function(t){if(t.pendingUpdate)switch(e.UPDATES++,t.status){case"APPROVED":e.APPROVED++;break;case"CANCELLED":e.CANCELLED++;break;case"REJECTED":e.REJECTED++;break;case"DELETED":e.DELETED++;break;case"REVOKED":e.REVOKED++}"PENDING"===t.status&&e.PENDING++}),e},[n]),f=l.useMemo(function(){return n?"UPDATES"===Tc[i]?n.filter(function(e){return e.pendingUpdate&&Td(s)(e)}).sort(function(e,t){return t.latestSpec.createdAt-e.latestSpec.createdAt}):n.filter(function(e){return e.status===Tc[i]&&Td(s)(e)}).sort(function(e,t){return t.latestSpec.createdAt-e.latestSpec.createdAt}):[]},[i,n,s]),d=function(e){switch(Tc[i]){case"PENDING":return l.createElement(Tt,{proposals:e});case"UPDATES":return l.createElement(Tn,{proposals:e});case"REJECTED":case"CANCELLED":case"DELETED":case"REVOKED":return l.createElement(Te,{proposals:e});case"APPROVED":return l.createElement(x7,{proposals:e});default:return null}};return l.createElement(l.Fragment,null,l.createElement(iE,{value:s,onChange:u,placeholder:"Search job proposals"}),l.createElement(r5.Z,null,l.createElement(vq.Z,{value:i,className:t.tabsRoot,indicatorColor:"primary",onChange:function(e,t){a(t)}},l.createElement(vZ.Z,{label:l.createElement(vV.Z,{color:"primary",badgeContent:c.PENDING,className:t.badge,"data-testid":"pending-badge"},"New")}),l.createElement(vZ.Z,{label:l.createElement(vV.Z,{color:"primary",badgeContent:c.UPDATES,className:t.badge,"data-testid":"updates-badge"},"Updates")}),l.createElement(vZ.Z,{label:l.createElement(vV.Z,{color:"primary",badgeContent:c.APPROVED,className:t.badge,"data-testid":"approved-badge"},"Approved")}),l.createElement(vZ.Z,{label:l.createElement(vV.Z,{color:"primary",badgeContent:c.REJECTED,className:t.badge,"data-testid":"rejected-badge"},"Rejected")}),l.createElement(vZ.Z,{label:l.createElement(vV.Z,{color:"primary",badgeContent:c.CANCELLED,className:t.badge,"data-testid":"cancelled-badge"},"Cancelled")}),l.createElement(vZ.Z,{label:l.createElement(vV.Z,{color:"primary",badgeContent:c.DELETED,className:t.badge,"data-testid":"deleted-badge"},"Deleted")}),l.createElement(vZ.Z,{label:l.createElement(vV.Z,{color:"primary",badgeContent:c.REVOKED,className:t.badge,"data-testid":"revoked-badge"},"Revoked")})),d(f)))}),Tb=n(57234),Tm={EVM:"EVM",APTOS:"APTOS",SOLANA:"SOLANA",STARKNET:"STARKNET",COSMOS:"COSMOS"};function Tg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Tv(e){if(Array.isArray(e))return e}function Ty(){return(Ty=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Tw(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function T_(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function TE(e,t){if(null==e)return{};var n,r,i=TS(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function TS(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function Tk(e,t){return Tv(e)||Tw(e,t)||Tx(e,t)||T_()}function Tx(e,t){if(e){if("string"==typeof e)return Tg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Tg(e,t)}}var TT=function(e){return"SN_MAIN"===e||"SN_SEPOLIA"===e},TM=bv().shape({chainID:p0().required("Required"),chainType:p0().required("Required"),accountAddr:p0().required("Required"),accountAddrPubKey:p0().nullable(),adminAddr:p0(),ocr1Multiaddr:p0().when(["ocr1Enabled","ocr1IsBootstrap"],{is:function(e,t){return e&&t},then:p0().required("Required").nullable()}).nullable(),ocr1P2PPeerID:p0().when(["ocr1Enabled","ocr1IsBootstrap"],{is:function(e,t){return e&&!t},then:p0().required("Required").nullable()}).nullable(),ocr1KeyBundleID:p0().when(["ocr1Enabled","ocr1IsBootstrap"],{is:function(e,t){return e&&!t},then:p0().required("Required").nullable()}).nullable(),ocr2Multiaddr:p0().when(["ocr2Enabled","ocr2IsBootstrap"],{is:function(e,t){return e&&t},then:p0().required("Required").nullable()}).nullable(),ocr2P2PPeerID:p0().when(["ocr2Enabled","ocr2IsBootstrap"],{is:function(e,t){return e&&!t},then:p0().required("Required").nullable()}).nullable(),ocr2KeyBundleID:p0().when(["ocr2Enabled","ocr2IsBootstrap"],{is:function(e,t){return e&&!t},then:p0().required("Required").nullable()}).nullable(),ocr2CommitPluginEnabled:pV().required("Required"),ocr2ExecutePluginEnabled:pV().required("Required"),ocr2MedianPluginEnabled:pV().required("Required"),ocr2MercuryPluginEnabled:pV().required("Required"),ocr2ForwarderAddress:p0().nullable()}),TO=function(e){return(0,b.createStyles)({supportedJobOptionsPaper:{padding:2*e.spacing.unit}})},TA=function(e){var t=e.addresses,n=TE(e,["addresses"]),r=h_(),i=r.values,a=i.chainID,o=i.accountAddr,s=r.setFieldValue,u=Tk(l.useState(!1),2),c=u[0],f=u[1],d=l.useRef();l.useEffect(function(){d.current=a},[a]),l.useEffect(function(){a!==d.current&&(s(n.name,""),f(!1))},[a,s,n.name]);var h=function(e){var t=e.target.value;"custom"===t?(f(!0),s(n.name,"")):(f(!1),s(n.name,t))};return l.createElement(l.Fragment,null,!TT(a)&&l.createElement(hP,Ty({},n,{select:!0,value:c?"custom":o,onChange:h}),t.map(function(e){return l.createElement(tE.default,{key:e,value:e},e)})),TT(a)&&l.createElement(hP,{component:hX,id:"accountAddr",name:"accountAddr",label:"Enter your account address",inputProps:{"data-testid":"customAccountAddr-input"},helperText:"The account address used for this chain",required:!0,fullWidth:!0}),TT(a)&&l.createElement("div",null,l.createElement(hP,{component:hX,id:"accountAddrPubKey",name:"accountAddrPubKey",label:"Account Address Public Key",required:!0,fullWidth:!0,helperText:"The public key for your account address",FormHelperTextProps:{"data-testid":"accountAddrPubKey-helper-text"}})))},TL=(0,b.withStyles)(TO)(function(e){var t=e.classes,n=e.editing,r=void 0!==n&&n,i=e.innerRef,a=e.initialValues,o=e.onSubmit,s=e.chains,u=void 0===s?[]:s,c=e.accountsEVM,f=void 0===c?[]:c,h=e.accountsAptos,p=void 0===h?[]:h,b=e.p2pKeys,m=void 0===b?[]:b,g=e.ocrKeys,v=void 0===g?[]:g,y=e.ocr2Keys,w=void 0===y?[]:y,_=e.showSubmit,E=void 0!==_&&_;return l.createElement(hT,{innerRef:i,initialValues:a,validationSchema:TM,onSubmit:o},function(e){var n=e.values,i=[];return n.chainType===Tm.EVM&&(i=f.filter(function(e){return e.chain.id==n.chainID&&!e.isDisabled}).map(function(e){return e.address})),n.chainType===Tm.APTOS&&(i=p.map(function(e){return e.account})),l.createElement(hR,{"data-testid":"feeds-manager-form",id:"chain-configuration-form",noValidate:!0},l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"chainType",name:"chainType",label:"Chain Type",select:!0,required:!0,fullWidth:!0,disabled:r},l.createElement(tE.default,{key:Tm.EVM,value:Tm.EVM},"EVM"),l.createElement(tE.default,{key:Tm.APTOS,value:Tm.APTOS},"APTOS"))),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"chainID",name:"chainID",label:"Chain ID",required:!0,fullWidth:!0,select:!0,disabled:r,inputProps:{"data-testid":"chainID-input"},FormHelperTextProps:{"data-testid":"chainID-helper-text"}},u.filter(function(e){return e.network.toUpperCase()===n.chainType}).map(function(e){return l.createElement(tE.default,{key:e.id,value:e.id},e.id)}))),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(TA,{component:hX,id:"accountAddr",name:"accountAddr",label:"Account Address",inputProps:{"data-testid":"accountAddr-input"},required:!0,fullWidth:!0,select:!0,helperText:"The account address used for this chain",addresses:i,FormHelperTextProps:{"data-testid":"accountAddr-helper-text"}})),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"adminAddr",name:"adminAddr",label:"Admin Address",fullWidth:!0,helperText:"The address used for LINK payments",FormHelperTextProps:{"data-testid":"adminAddr-helper-text"}})),l.createElement(d.Z,{item:!0,xs:12},l.createElement(x.default,null,"Supported Job Types")),l.createElement(d.Z,{item:!0,xs:12},l.createElement(hP,{component:h2,name:"fluxMonitorEnabled",type:"checkbox",Label:{label:"Flux Monitor"}})),l.createElement(d.Z,{item:!0,xs:12},l.createElement(hP,{component:h2,name:"ocr1Enabled",type:"checkbox",Label:{label:"OCR"}}),n.ocr1Enabled&&l.createElement(ii.default,{className:t.supportedJobOptionsPaper},l.createElement(d.Z,{container:!0,spacing:8},l.createElement(l.Fragment,null,l.createElement(d.Z,{item:!0,xs:12},l.createElement(hP,{component:h2,name:"ocr1IsBootstrap",type:"checkbox",Label:{label:"Is this node running as a bootstrap peer?"}})),n.ocr1IsBootstrap?l.createElement(d.Z,{item:!0,xs:12},l.createElement(hP,{component:hX,id:"ocr1Multiaddr",name:"ocr1Multiaddr",label:"Multiaddr",required:!0,fullWidth:!0,helperText:"The OCR Multiaddr which oracles use to query for network information",FormHelperTextProps:{"data-testid":"ocr1Multiaddr-helper-text"}})):l.createElement(l.Fragment,null,l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"ocr1P2PPeerID",name:"ocr1P2PPeerID",label:"Peer ID",select:!0,required:!0,fullWidth:!0,helperText:"The Peer ID used for this chain",FormHelperTextProps:{"data-testid":"ocr1P2PPeerID-helper-text"}},m.map(function(e){return l.createElement(tE.default,{key:e.peerID,value:e.peerID},e.peerID)}))),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"ocr1KeyBundleID",name:"ocr1KeyBundleID",label:"Key Bundle ID",select:!0,required:!0,fullWidth:!0,helperText:"The OCR Key Bundle ID used for this chain",FormHelperTextProps:{"data-testid":"ocr1KeyBundleID-helper-text"}},v.map(function(e){return l.createElement(tE.default,{key:e.id,value:e.id},e.id)})))))))),l.createElement(d.Z,{item:!0,xs:12},l.createElement(hP,{component:h2,name:"ocr2Enabled",type:"checkbox",Label:{label:"OCR2"}}),n.ocr2Enabled&&l.createElement(ii.default,{className:t.supportedJobOptionsPaper},l.createElement(d.Z,{container:!0,spacing:8},l.createElement(l.Fragment,null,l.createElement(d.Z,{item:!0,xs:12},l.createElement(hP,{component:h2,name:"ocr2IsBootstrap",type:"checkbox",Label:{label:"Is this node running as a bootstrap peer?"}})),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"ocr2P2PPeerID",name:"ocr2P2PPeerID",label:"Peer ID",select:!0,required:!n.ocr2IsBootstrap,fullWidth:!0,helperText:"The Peer ID used for this chain",FormHelperTextProps:{"data-testid":"ocr2P2PPeerID-helper-text"}},m.map(function(e){return l.createElement(tE.default,{key:e.peerID,value:e.peerID},e.peerID)}))),n.ocr2IsBootstrap?l.createElement(d.Z,{item:!0,xs:12},l.createElement(hP,{component:hX,id:"ocr2Multiaddr",name:"ocr2Multiaddr",label:"Multiaddr",required:!0,fullWidth:!0,helperText:"The OCR2 Multiaddr which oracles use to query for network information",FormHelperTextProps:{"data-testid":"ocr2Multiaddr-helper-text"}})):l.createElement(l.Fragment,null,l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"ocr2KeyBundleID",name:"ocr2KeyBundleID",label:"Key Bundle ID",select:!0,required:!0,fullWidth:!0,helperText:"The OCR2 Key Bundle ID used for this chain",FormHelperTextProps:{"data-testid":"ocr2KeyBundleID-helper-text"}},w.map(function(e){return l.createElement(tE.default,{key:e.id,value:e.id},e.id)}))),l.createElement(d.Z,{item:!0,xs:12},l.createElement(x.default,null,"Supported Plugins")),l.createElement(d.Z,{item:!0,xs:6},l.createElement(hP,{component:h2,name:"ocr2CommitPluginEnabled",type:"checkbox",Label:{label:"Commit"}})),l.createElement(d.Z,{item:!0,xs:6},l.createElement(hP,{component:h2,name:"ocr2ExecutePluginEnabled",type:"checkbox",Label:{label:"Execute"}})),l.createElement(d.Z,{item:!0,xs:6},l.createElement(hP,{component:h2,name:"ocr2RebalancerPluginEnabled",type:"checkbox",Label:{label:"Rebalancer"}})),l.createElement(d.Z,{item:!0,xs:6},l.createElement(hP,{component:h2,name:"ocr2MedianPluginEnabled",type:"checkbox",Label:{label:"Median"}})),l.createElement(d.Z,{item:!0,xs:6},l.createElement(hP,{component:h2,name:"ocr2MercuryPluginEnabled",type:"checkbox",Label:{label:"Mercury"}})),l.createElement(d.Z,{item:!0,xs:12,md:12},l.createElement(hP,{component:hX,id:"ocr2ForwarderAddress",name:"ocr2ForwarderAddress",label:"Forwarder Address (optional)",fullWidth:!0,helperText:"The forwarder address from the Operator Forwarder Contract",FormHelperTextProps:{"data-testid":"ocr2ForwarderAddress-helper-text"}}))))))),E&&l.createElement(d.Z,{item:!0,xs:12,md:7},l.createElement(ok.default,{variant:"contained",color:"primary",type:"submit",size:"large"},"Submit"))))})});function TC(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function TI(){var e=TC(["\n fragment AptosKeysPayload_ResultsFields on AptosKey {\n account\n id\n }\n"]);return TI=function(){return e},e}function TD(){var e=TC(["\n ","\n query FetchAptosKeys {\n aptosKeys {\n results {\n ...AptosKeysPayload_ResultsFields\n }\n }\n }\n"]);return TD=function(){return e},e}var TN=n0(TI()),TP=n0(TD(),TN),TR=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return rv(TP,e)},Tj=function(e){var t=e.onClose,n=e.open,r=e.onSubmit,i=l.useRef(),a=i$({fetchPolicy:"network-only"}).data,o=_K({fetchPolicy:"cache-and-network"}).data,s=TR({fetchPolicy:"cache-and-network"}).data,u=SV({fetchPolicy:"cache-and-network"}).data,c=EO({fetchPolicy:"cache-and-network"}).data,f=E2({fetchPolicy:"cache-and-network"}).data,d={chainID:"",chainType:Tm.EVM,accountAddr:"",adminAddr:"",accountAddrPubKey:"",fluxMonitorEnabled:!1,ocr1Enabled:!1,ocr1IsBootstrap:!1,ocr1Multiaddr:"",ocr1P2PPeerID:"",ocr1KeyBundleID:"",ocr2Enabled:!1,ocr2IsBootstrap:!1,ocr2Multiaddr:"",ocr2P2PPeerID:"",ocr2KeyBundleID:"",ocr2CommitPluginEnabled:!1,ocr2ExecutePluginEnabled:!1,ocr2MedianPluginEnabled:!1,ocr2MercuryPluginEnabled:!1,ocr2RebalancerPluginEnabled:!1,ocr2ForwarderAddress:""},h=a?a.chains.results:[],p=o?o.ethKeys.results:[],b=s?s.aptosKeys.results:[],m=u?u.p2pKeys.results:[],g=c?c.ocrKeyBundles.results:[],v=f?f.ocr2KeyBundles.results:[];return l.createElement(aD.Z,{onClose:t,open:n,disableBackdropClick:!0},l.createElement(oO.Z,{disableTypography:!0},l.createElement(x.default,{variant:"body2"},"New Supported Chain")),l.createElement(oT.Z,null,l.createElement(TL,{innerRef:i,initialValues:d,onSubmit:r,chains:h,accountsEVM:p,accountsAptos:b,p2pKeys:m,ocrKeys:g,ocr2Keys:v})),l.createElement(ox.Z,null,l.createElement(ok.default,{onClick:t},"Cancel"),l.createElement(ok.default,{color:"primary",type:"submit",form:"chain-configuration-form",variant:"contained"},"Submit")))},TF=function(e){var t=e.cfg,n=e.onClose,r=e.open,i=e.onSubmit,a=l.useRef(),o=i$({fetchPolicy:"network-only"}).data,s=_K({fetchPolicy:"cache-and-network"}).data,u=TR({fetchPolicy:"cache-and-network"}).data,c=SV({fetchPolicy:"cache-and-network"}).data,f=EO({fetchPolicy:"cache-and-network"}).data,d=E2({fetchPolicy:"cache-and-network"}).data;if(!t)return null;var h={chainID:t.chainID,chainType:Tm.EVM,accountAddr:t.accountAddr,adminAddr:t.adminAddr,accountAddrPubKey:t.accountAddrPubKey,fluxMonitorEnabled:t.fluxMonitorJobConfig.enabled,ocr1Enabled:t.ocr1JobConfig.enabled,ocr1IsBootstrap:t.ocr1JobConfig.isBootstrap,ocr1Multiaddr:t.ocr1JobConfig.multiaddr,ocr1P2PPeerID:t.ocr1JobConfig.p2pPeerID,ocr1KeyBundleID:t.ocr1JobConfig.keyBundleID,ocr2Enabled:t.ocr2JobConfig.enabled,ocr2IsBootstrap:t.ocr2JobConfig.isBootstrap,ocr2Multiaddr:t.ocr2JobConfig.multiaddr,ocr2P2PPeerID:t.ocr2JobConfig.p2pPeerID,ocr2KeyBundleID:t.ocr2JobConfig.keyBundleID,ocr2CommitPluginEnabled:t.ocr2JobConfig.plugins.commit,ocr2ExecutePluginEnabled:t.ocr2JobConfig.plugins.execute,ocr2MedianPluginEnabled:t.ocr2JobConfig.plugins.median,ocr2MercuryPluginEnabled:t.ocr2JobConfig.plugins.mercury,ocr2RebalancerPluginEnabled:t.ocr2JobConfig.plugins.rebalancer,ocr2ForwarderAddress:t.ocr2JobConfig.forwarderAddress},p=o?o.chains.results:[],b=s?s.ethKeys.results:[],m=u?u.aptosKeys.results:[],g=c?c.p2pKeys.results:[],v=f?f.ocrKeyBundles.results:[],y=d?d.ocr2KeyBundles.results:[];return l.createElement(aD.Z,{onClose:n,open:r,disableBackdropClick:!0},l.createElement(oO.Z,{disableTypography:!0},l.createElement(x.default,{variant:"body2"},"Edit Supported Chain")),l.createElement(oT.Z,null,l.createElement(TL,{innerRef:a,initialValues:h,onSubmit:i,chains:p,accountsEVM:b,accountsAptos:m,p2pKeys:g,ocrKeys:v,ocr2Keys:y,editing:!0})),l.createElement(ox.Z,null,l.createElement(ok.default,{onClick:n},"Cancel"),l.createElement(ok.default,{color:"primary",type:"submit",form:"chain-configuration-form",variant:"contained"},"Submit")))};function TY(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function TB(e){if(Array.isArray(e))return e}function TU(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function TH(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){TU(a,r,i,o,s,"next",e)}function s(e){TU(a,r,i,o,s,"throw",e)}o(void 0)})}}function T$(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function Tz(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function TG(e,t){return TB(e)||T$(e,t)||TK(e,t)||Tz()}function TW(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function TK(e,t){if(e){if("string"==typeof e)return TY(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return TY(e,t)}}var TV=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};function Tq(){var e=TW(["\n mutation CreateFeedsManagerChainConfig(\n $input: CreateFeedsManagerChainConfigInput!\n ) {\n createFeedsManagerChainConfig(input: $input) {\n ... on CreateFeedsManagerChainConfigSuccess {\n chainConfig {\n id\n }\n }\n ... on NotFoundError {\n message\n code\n }\n ... on InputErrors {\n errors {\n path\n message\n code\n }\n }\n }\n }\n"]);return Tq=function(){return e},e}function TZ(){var e=TW(["\n mutation DeleteFeedsManagerChainConfig($id: ID!) {\n deleteFeedsManagerChainConfig(id: $id) {\n ... on DeleteFeedsManagerChainConfigSuccess {\n chainConfig {\n id\n }\n }\n ... on NotFoundError {\n message\n code\n }\n }\n }\n"]);return TZ=function(){return e},e}function TX(){var e=TW(["\n mutation UpdateFeedsManagerChainConfig(\n $id: ID!\n $input: UpdateFeedsManagerChainConfigInput!\n ) {\n updateFeedsManagerChainConfig(id: $id, input: $input) {\n __typename\n ... on UpdateFeedsManagerChainConfigSuccess {\n chainConfig {\n id\n }\n }\n ... on NotFoundError {\n message\n code\n }\n ... on InputErrors {\n errors {\n path\n message\n code\n }\n }\n }\n }\n"]);return TX=function(){return e},e}var TJ=n0(Tq()),TQ=n0(TZ()),T1=n0(TX()),T0=function(e){return(0,b.createStyles)({card:{marginBottom:2*e.spacing.unit},panel:{borderBottom:"1px solid ".concat(e.palette.divider)},panelExpanded:{margin:0},chip:{marginRight:2*e.spacing.unit},title:{fontSize:e.typography.body2.fontSize,fontWeight:e.typography.body2.fontWeight,color:e.typography.body2.color},panelDetails:{display:"block"},jobTypeContainer:{borderLeft:"2px solid ".concat(e.palette.primary.main),marginLeft:-8,paddingLeft:8},panelDetailsActions:{display:"flex",justifyContent:"flex-end",gap:"".concat(2*e.spacing.unit,"px")}})},T2=function(e){return l.createElement(l.Fragment,null,l.createElement(d.Z,{item:!0,xs:12,md:5},l.createElement(op,{title:"Multiaddr"}),l.createElement(ob,{value:e.multiaddr})),"OCR2JobConfig"===e.__typename&&l.createElement(d.Z,{item:!0,xs:12,md:5},l.createElement(op,{title:"P2P Peer ID"}),l.createElement(ob,{value:e.p2pPeerID})))},T3=function(e){return l.createElement(l.Fragment,null,l.createElement(d.Z,{item:!0,xs:12,md:5},l.createElement(op,{title:"P2P Peer ID"}),l.createElement(ob,{value:e.p2pPeerID})),l.createElement(d.Z,{item:!0,xs:12,md:5},l.createElement(op,{title:"OCR Key ID"}),l.createElement(ob,{value:e.keyBundleID})))},T4=(0,b.withStyles)(T0)(function(e){var t=e.cfg,n=e.classes;return t.enabled?l.createElement(d.Z,{item:!0,xs:12,md:12},l.createElement("div",{className:n.jobTypeContainer},l.createElement(op,{title:"Job Type"}),l.createElement(ob,{value:"Flux Monitor"}))):null}),T6=(0,b.withStyles)(T0)(function(e){var t=e.cfg,n=e.classes;return t.enabled?l.createElement(l.Fragment,null,l.createElement(d.Z,{item:!0,xs:12,md:2},l.createElement("div",{className:n.jobTypeContainer},l.createElement(op,{title:"Job Type"}),l.createElement(ob,{value:"OCR ".concat(t.isBootstrap?"(Bootstrap)":"")}))),t.isBootstrap?T2(t):T3(t)):null}),T5=(0,b.withStyles)(T0)(function(e){var t=e.cfg,n=e.classes;return t.enabled?l.createElement(l.Fragment,null,l.createElement(d.Z,{item:!0,xs:12,md:2},l.createElement("div",{className:n.jobTypeContainer},l.createElement(op,{title:"Job Type"}),l.createElement(ob,{value:"OCR2 ".concat(t.isBootstrap?"(Bootstrap)":"")}))),t.isBootstrap?T2(t):T3(t)):null}),T8=(0,b.withStyles)(T0)(function(e){var t,n,r,i=e.classes,a=e.cfgs,o=e.mgrID,s=(0,A.I0)(),u=oq().handleMutationError,c=TG(l.useState(!1),2),f=c[0],h=c[1],p=TG(l.useState(null),2),b=p[0],m=p[1],g=TG(l.useState(null),2),v=g[0],w=g[1],_=function(e){w(e.currentTarget)},S=function(){w(null)},k=function(e){m(e)},T=function(){m(null)},M=function(){return null!==b},O=TG(oo(TJ,{refetchQueries:[xZ]}),1)[0],L=TG(oo(TQ,{refetchQueries:[xZ]}),1)[0],C=TG(oo(T1,{refetchQueries:[xZ]}),1)[0],I=(t=TH(function(e){var t,n,r,i,a;return TV(this,function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),[4,O(((r={}).variables={input:{feedsManagerID:o,chainID:e.chainID,chainType:e.chainType,accountAddr:e.accountAddr,adminAddr:e.adminAddr,accountAddrPubKey:e.accountAddrPubKey,fluxMonitorEnabled:e.fluxMonitorEnabled,ocr1Enabled:e.ocr1Enabled,ocr1IsBootstrap:e.ocr1IsBootstrap,ocr1Multiaddr:""!==e.ocr1Multiaddr?e.ocr1Multiaddr:null,ocr1P2PPeerID:""!==e.ocr1P2PPeerID?e.ocr1P2PPeerID:null,ocr1KeyBundleID:""!=e.ocr1KeyBundleID?e.ocr1KeyBundleID:null,ocr2Enabled:e.ocr2Enabled,ocr2IsBootstrap:e.ocr2IsBootstrap,ocr2Multiaddr:""!==e.ocr2Multiaddr?e.ocr2Multiaddr:null,ocr2P2PPeerID:""!==e.ocr2P2PPeerID?e.ocr2P2PPeerID:null,ocr2KeyBundleID:""!=e.ocr2KeyBundleID?e.ocr2KeyBundleID:null,ocr2Plugins:'{"commit":'.concat(e.ocr2CommitPluginEnabled,',"execute":').concat(e.ocr2ExecutePluginEnabled,',"median":').concat(e.ocr2MedianPluginEnabled,',"mercury":').concat(e.ocr2MercuryPluginEnabled,',"rebalancer":').concat(e.ocr2RebalancerPluginEnabled,"}"),ocr2ForwarderAddress:""!==e.ocr2ForwarderAddress?e.ocr2ForwarderAddress:null}},r))];case 1:switch(null==(i=null===(t=(n=c.sent()).data)||void 0===t?void 0:t.createFeedsManagerChainConfig)?void 0:i.__typename){case"CreateFeedsManagerChainConfigSuccess":s((0,ty.qt)("Added new supported chain"));break;case"NotFoundError":s((0,ty.LO)(i.message))}return[3,3];case 2:return u(a=c.sent()),[3,3];case 3:return[2]}})}),function(e){return t.apply(this,arguments)}),D=(n=TH(function(e){var t,n,r,i,a;return TV(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,L(((r={}).variables={id:e},r))];case 1:switch(null==(i=null===(t=(n=o.sent()).data)||void 0===t?void 0:t.deleteFeedsManagerChainConfig)?void 0:i.__typename){case"DeleteFeedsManagerChainConfigSuccess":s((0,ty.qt)("Deleted supported chain"));break;case"NotFoundError":s((0,ty.LO)(i.message))}return[3,3];case 2:return u(a=o.sent()),[3,3];case 3:return[2]}})}),function(e){return n.apply(this,arguments)}),N=(r=TH(function(e){var t,n,r,i,a;return TV(this,function(o){switch(o.label){case 0:if(!b)return[2];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,C(((r={}).variables={id:b.id,input:{accountAddr:e.accountAddr,adminAddr:e.adminAddr,accountAddrPubKey:e.accountAddrPubKey,fluxMonitorEnabled:e.fluxMonitorEnabled,ocr1Enabled:e.ocr1Enabled,ocr1IsBootstrap:e.ocr1IsBootstrap,ocr1Multiaddr:""!==e.ocr1Multiaddr?e.ocr1Multiaddr:null,ocr1P2PPeerID:""!==e.ocr1P2PPeerID?e.ocr1P2PPeerID:null,ocr1KeyBundleID:""!=e.ocr1KeyBundleID?e.ocr1KeyBundleID:null,ocr2Enabled:e.ocr2Enabled,ocr2IsBootstrap:e.ocr2IsBootstrap,ocr2Multiaddr:""!==e.ocr2Multiaddr?e.ocr2Multiaddr:null,ocr2P2PPeerID:""!==e.ocr2P2PPeerID?e.ocr2P2PPeerID:null,ocr2KeyBundleID:""!=e.ocr2KeyBundleID?e.ocr2KeyBundleID:null,ocr2Plugins:'{"commit":'.concat(e.ocr2CommitPluginEnabled,',"execute":').concat(e.ocr2ExecutePluginEnabled,',"median":').concat(e.ocr2MedianPluginEnabled,',"mercury":').concat(e.ocr2MercuryPluginEnabled,',"rebalancer":').concat(e.ocr2RebalancerPluginEnabled,"}"),ocr2ForwarderAddress:""!==e.ocr2ForwarderAddress?e.ocr2ForwarderAddress:null}},r))];case 2:switch(null==(i=null===(t=(n=o.sent()).data)||void 0===t?void 0:t.updateFeedsManagerChainConfig)?void 0:i.__typename){case"UpdateFeedsManagerChainConfigSuccess":S(),s((0,ty.qt)("Updated supported chain"));break;case"NotFoundError":s((0,ty.LO)(i.message))}return[3,4];case 3:return u(a=o.sent()),[3,4];case 4:return[2]}})}),function(e){return r.apply(this,arguments)});return l.createElement(r5.Z,{className:i.card},l.createElement(sl.Z,{title:"Supported Chains",classes:{title:i.title},action:l.createElement(l.Fragment,null,l.createElement(y.default,{onClick:_,"aria-label":"open-menu"},l.createElement(ol.Z,null)),l.createElement(t_.Z,{anchorEl:v,open:Boolean(v),onClose:S},l.createElement(tE.default,{onClick:function(){h(!0),S()}},l.createElement(oc.Z,null,l.createElement(Tb.Z,null)),l.createElement(E.Z,null,"New"))))}),a.map(function(e){return l.createElement(mP.Z,{key:e.id,defaultExpanded:!1,classes:{root:i.panel,expanded:i.panelExpanded}},l.createElement(mR.Z,{expandIcon:l.createElement(gh.Z,null)},l.createElement(Es.Z,{label:e.chainType,color:"primary",className:i.chip}),l.createElement(x.default,{style:{lineHeight:"30px"}},"Chain ID: ",e.chainID)),l.createElement(mj.Z,{className:i.panelDetails},l.createElement(d.Z,{container:!0,spacing:40},l.createElement(d.Z,{item:!0,xs:12},l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12,sm:6},l.createElement(op,{title:"Account Address"}),l.createElement(ob,{value:e.accountAddr})),("SN_MAIN"===e.chainID||"SN_SEPOLIA"===e.chainID)&&l.createElement(d.Z,{item:!0,xs:12,sm:6},l.createElement(op,{title:"Account Address Public Key"}),l.createElement(ob,{value:e.accountAddrPubKey})),l.createElement(d.Z,{item:!0,xs:12,sm:6},l.createElement(op,{title:"Admin Address"}),l.createElement(ob,{value:e.adminAddr})),l.createElement(T4,{cfg:e.fluxMonitorJobConfig}),l.createElement(T6,{cfg:e.ocr1JobConfig}),l.createElement(T5,{cfg:e.ocr2JobConfig}))),l.createElement(d.Z,{item:!0,xs:12},l.createElement("div",{className:i.panelDetailsActions},l.createElement(aA.Z,{onClick:function(){return k(e)}},"Edit"),l.createElement(aA.Z,{onClick:function(){return D(e.id)},variant:"danger"},"Delete"))))))}),f&&l.createElement(Tj,{open:f,onClose:function(){return h(!1)},onSubmit:I}),M()&&l.createElement(TF,{cfg:b,open:M(),onClose:T,onSubmit:N}))}),T9=function(e){var t=e.manager,n=e.onDisable,r=e.onEnable;return l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:12},l.createElement(iy,null,"Job Distributors")),l.createElement(d.Z,{item:!0,xs:12},l.createElement(x9,{manager:t,onDisable:n,onEnable:r})),l.createElement(d.Z,{item:!0,xs:12},l.createElement(T8,{cfgs:t.chainConfigs,mgrID:t.id})),l.createElement(d.Z,{item:!0,xs:12},l.createElement(xQ,null,"Job Proposals")),l.createElement(d.Z,{item:!0,xs:12},l.createElement(Tp,{proposals:t.jobProposals})))};function T7(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Me(e){if(Array.isArray(e))return e}function Mt(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function Mn(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){Mt(a,r,i,o,s,"next",e)}function s(e){Mt(a,r,i,o,s,"throw",e)}o(void 0)})}}function Mr(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function Mi(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ma(e,t){return Me(e)||Mr(e,t)||Ms(e,t)||Mi()}function Mo(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Ms(e,t){if(e){if("string"==typeof e)return T7(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return T7(e,t)}}var Mu=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};function Mc(){var e=Mo(["\n mutation EnableFeedsManager($id: ID!) {\n enableFeedsManager(id: $id) {\n ... on EnableFeedsManagerSuccess {\n feedsManager {\n id\n name\n uri\n publicKey\n isConnectionActive\n createdAt\n disabledAt\n }\n }\n ... on NotFoundError {\n message\n code\n }\n }\n }\n"]);return Mc=function(){return e},e}function Ml(){var e=Mo(["\n mutation DisableFeedsManager($id: ID!) {\n disableFeedsManager(id: $id) {\n ... on DisableFeedsManagerSuccess {\n feedsManager {\n id\n name\n uri\n publicKey\n isConnectionActive\n createdAt\n disabledAt\n }\n }\n ... on NotFoundError {\n message\n code\n }\n }\n }\n"]);return Ml=function(){return e},e}var Mf=n0(Mc()),Md=n0(Ml()),Mh=function(){var e=(0,h.UO)().id,t=oq().handleMutationError,n=(0,A.I0)(),r=xX({variables:{id:e},fetchPolicy:"cache-and-network"}),i=r.data,a=r.loading,o=r.error,s=Ma(oo(Mf),2),u=s[0],c=s[1].loading,f=Ma(oo(Md),2),d=f[0],p=f[1].loading;if(a||c||p)return l.createElement(iR,null);if(o)return l.createElement(iD,{error:o});var b,m,g=(b=Mn(function(){var r,i,a,o,s;return Mu(this,function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),[4,u(((a={}).variables={id:e},a))];case 1:switch(null==(o=null===(r=(i=c.sent()).data)||void 0===r?void 0:r.enableFeedsManager)?void 0:o.__typename){case"EnableFeedsManagerSuccess":n((0,ty.qt)("Job Distributor Enabled"));break;case"NotFoundError":n((0,ty.LO)(o.message))}return[3,3];case 2:return t(s=c.sent()),[3,3];case 3:return[2]}})}),function(){return b.apply(this,arguments)}),v=(m=Mn(function(){var r,i,a,o,s;return Mu(this,function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),[4,d(((a={}).variables={id:e},a))];case 1:switch(null==(o=null===(r=(i=u.sent()).data)||void 0===r?void 0:r.disableFeedsManager)?void 0:o.__typename){case"DisableFeedsManagerSuccess":n((0,ty.qt)("Job Distributor Disabled"));break;case"NotFoundError":n((0,ty.LO)(o.message))}return[3,3];case 2:return t(s=u.sent()),[3,3];case 3:return[2]}})}),function(){return m.apply(this,arguments)}),y=null==i?void 0:i.feedsManager;switch(null==y?void 0:y.__typename){case"NotFoundError":return l.createElement(oa,null);case"FeedsManager":return l.createElement(T9,{manager:y,onEnable:g,onDisable:v});default:return l.createElement(h.l_,{to:{pathname:"/job_distributors"}})}},Mp={name:"",uri:"",publicKey:""},Mb=function(e){var t=e.onSubmit;return l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12,md:11,lg:9},l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Register Job Distributor"}),l.createElement(aW.Z,null,l.createElement(xS,{initialValues:Mp,onSubmit:t})))))};function Mm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Mg(e){if(Array.isArray(e))return e}function Mv(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function My(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){Mv(a,r,i,o,s,"next",e)}function s(e){Mv(a,r,i,o,s,"throw",e)}o(void 0)})}}function Mw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M_(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function ME(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function MS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Mw(e,t,n[t])})}return e}function Mk(e,t){return Mg(e)||M_(e,t)||MT(e,t)||ME()}function Mx(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function MT(e,t){if(e){if("string"==typeof e)return Mm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mm(e,t)}}var MM=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};function MO(){var e=Mx(["\n mutation CreateFeedsManager($input: CreateFeedsManagerInput!) {\n createFeedsManager(input: $input) {\n ... on CreateFeedsManagerSuccess {\n feedsManager {\n id\n name\n uri\n publicKey\n isConnectionActive\n createdAt\n }\n }\n ... on SingleFeedsManagerError {\n message\n code\n }\n ... on DuplicateFeedsManagerError {\n message\n code\n }\n ... on NotFoundError {\n message\n code\n }\n ... on InputErrors {\n errors {\n path\n message\n code\n }\n }\n }\n }\n"]);return MO=function(){return e},e}var MA=n0(MO()),ML=function(){var e,t=(0,h.k6)(),n=(0,A.I0)(),r=oq().handleMutationError,i=Mk(oo(MA,{refetchQueries:[{query:xf}]}),1)[0],a=(e=My(function(e,a){var o,s,u,c,l,f;return MM(this,function(d){switch(d.label){case 0:o=a.setErrors,d.label=1;case 1:return d.trys.push([1,3,,4]),[4,i(((c={}).variables={input:MS({},e)},c))];case 2:switch(null==(l=null===(s=(u=d.sent()).data)||void 0===s?void 0:s.createFeedsManager)?void 0:l.__typename){case"CreateFeedsManagerSuccess":t.push("/job_distributors"),n((0,ty.qt)("Job Distributor Created"));break;case"SingleFeedsManagerError":case"DuplicateFeedsManagerError":case"NotFoundError":n((0,ty.LO)(l.message));break;case"InputErrors":n((0,ty.LO)("Invalid Input")),o(wH(l))}return[3,4];case 3:return r(f=d.sent()),[3,4];case 4:return[2]}})}),function(t,n){return e.apply(this,arguments)});return l.createElement(Mb,{onSubmit:a})},MC=function(){var e=(0,h.$B)().path;return l.createElement(ig,null,l.createElement(h.rs,null,l.createElement(h.AW,{exact:!0,path:e},l.createElement(x_,null)),l.createElement(h.AW,{exact:!0,path:"".concat(e,"/new")},l.createElement(ML,null)),l.createElement(h.AW,{exact:!0,path:"".concat(e,"/:id")},l.createElement(Mh,null)),l.createElement(h.AW,{exact:!0,path:"".concat(e,"/:id/edit")},l.createElement(xY,null))))},MI=function(e){var t=e.proposal,n=t.specs.find(function(e){return"APPROVED"===e.status});return l.createElement(oh,null,l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12,sm:4,md:2},l.createElement(op,{title:"Status"}),l.createElement(ob,{value:km(t.status)})),l.createElement(d.Z,{item:!0,xs:12,sm:4,md:4},l.createElement(op,{title:"FMS UUID"}),l.createElement(ob,{value:t.remoteUUID})),l.createElement(d.Z,{item:!0,xs:12,sm:4,md:4},l.createElement(op,{title:"External Job ID"}),t.jobID&&t.externalJobID?l.createElement(ob,null,l.createElement(ih,{color:"primary",href:"/jobs/".concat(t.jobID)},t.externalJobID)):l.createElement(ob,{value:t.externalJobID||"--"})),l.createElement(d.Z,{item:!0,xs:12,sm:4,md:2},l.createElement(op,{title:"Approved Version"}),l.createElement(ob,{value:n?n.version:"--"}))))};function MD(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function MN(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){MD(a,r,i,o,s,"next",e)}function s(e){MD(a,r,i,o,s,"throw",e)}o(void 0)})}}var MP=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},MR=function(){return(0,b.createStyles)({paperRoot:{width:700}})},Mj=bv().shape({definition:p0().required("Required")}),MF=(0,b.withStyles)(MR)(function(e){var t,n=e.classes,r=e.initialValues,i=e.onClose,a=e.onSubmit,o=e.open;return l.createElement(hT,{initialValues:r,validationSchema:Mj,onSubmit:(t=MN(function(e,t){return MP(this,function(n){switch(n.label){case 0:return[4,a(e,t)];case 1:return n.sent(),i(),[2]}})}),function(e,n){return t.apply(this,arguments)})},function(e){var t=e.isSubmitting,r=e.submitForm;return l.createElement(hR,null,l.createElement(aD.Z,{open:o,onClose:i,classes:{paper:n.paperRoot}},l.createElement(oO.Z,{disableTypography:!0},l.createElement(x.default,{variant:"h5"},"Edit Job Spec")),l.createElement(oT.Z,null,l.createElement(hP,{component:hX,id:"definition",name:"definition",label:"Job Spec",variant:"outlined",multiline:!0,rows:10,rowsMax:25,required:!0,autoComplete:"off",margin:"normal",fullWidth:!0,spellCheck:"false"})),l.createElement(ox.Z,null,l.createElement(ok.default,{onClick:i,variant:"text"},"Cancel"),l.createElement(ok.default,{variant:"contained",color:"primary",disabled:t,onClick:r},"Submit"))))})});function MY(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function MB(e){if(Array.isArray(e))return e}function MU(e){if(Array.isArray(e))return MY(e)}function MH(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function M$(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function Mz(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function MG(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function MW(e,t){return MB(e)||M$(e,t)||Mq(e,t)||Mz()}function MK(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function MV(e){return MU(e)||MH(e)||Mq(e)||MG()}function Mq(e,t){if(e){if("string"==typeof e)return MY(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return MY(e,t)}}function MZ(){var e=MK(["\n fragment JobProposal_SpecsFields on JobProposalSpec {\n id\n definition\n status\n version\n createdAt\n }\n"]);return MZ=function(){return e},e}var MX=n0(MZ()),MJ=function(e){return(0,b.createStyles)({versionText:{marginRight:2*e.spacing.unit},proposedAtContainer:{flex:1,textAlign:"right"},expansionPanelDetails:{display:"block"},actions:{display:"flex",marginBottom:2*e.spacing.unit},editContainer:{flex:1},actionsContainer:{flex:1,textAlign:"right"}})},MQ={approve:{title:"Approve Job Proposal",body:"Approving this job proposal will start running a new job. WARNING: If a job using the same contract address already exists, it will be deleted before running the new one."},cancel:{title:"Cancel Job Proposal",body:"Cancelling this job proposal will delete the running job. Are you sure you want to cancel this job proposal?"},reject:{title:"Reject Job Proposal",body:"Are you sure you want to reject this job proposal?"}},M1=(0,b.withStyles)(MJ)(function(e){var t=e.classes,n=e.onApprove,r=e.onCancel,i=e.onReject,a=e.onUpdateSpec,o=e.specs,s=e.proposal,u=MW(l.useState(null),2),c=u[0],f=u[1],d=MW(l.useState(!1),2),h=d[0],p=d[1],b=function(e,t){f({action:e,id:t})},m=l.useMemo(function(){return o.reduce(function(e,t){return e.version>t.version?e:t})},[o]),g=l.useMemo(function(){return MV(o).sort(function(e,t){return t.version-e.version})},[o]),v=function(e,t,n){switch(e){case"PENDING":return l.createElement(l.Fragment,null,l.createElement(ok.default,{variant:"text",color:"secondary",onClick:function(){return b("reject",t)}},"Reject"),m.id===t&&"DELETED"!==n.status&&"REVOKED"!==n.status&&l.createElement(ok.default,{variant:"contained",color:"primary",onClick:function(){return b("approve",t)}},"Approve"),m.id===t&&"DELETED"===n.status&&n.pendingUpdate&&l.createElement(l.Fragment,null,l.createElement(ok.default,{variant:"contained",color:"primary",onClick:function(){return b("cancel",t)}},"Cancel"),l.createElement(x.default,{color:"error"},"This proposal was deleted. Cancel the spec to delete any running jobs")));case"APPROVED":return l.createElement(l.Fragment,null,l.createElement(ok.default,{variant:"contained",onClick:function(){return b("cancel",t)}},"Cancel"),"DELETED"===n.status&&n.pendingUpdate&&l.createElement(x.default,{color:"error"},"This proposal was deleted. Cancel the spec to delete any running jobs"));case"CANCELLED":if(m.id===t&&"DELETED"!==n.status&&"REVOKED"!==n.status)return l.createElement(ok.default,{variant:"contained",color:"primary",onClick:function(){return b("approve",t)}},"Approve");return null;default:return null}};return l.createElement("div",null,g.map(function(e,n){return l.createElement(mP.Z,{defaultExpanded:0===n,key:n},l.createElement(mR.Z,{expandIcon:l.createElement(gh.Z,null)},l.createElement(x.default,{className:t.versionText},"Version ",e.version),l.createElement(Es.Z,{label:e.status,color:"APPROVED"===e.status?"primary":"default",variant:"REJECTED"===e.status||"CANCELLED"===e.status?"outlined":"default"}),l.createElement("div",{className:t.proposedAtContainer},l.createElement(x.default,null,"Proposed ",l.createElement(aO,{tooltip:!0},e.createdAt)))),l.createElement(mj.Z,{className:t.expansionPanelDetails},l.createElement("div",{className:t.actions},l.createElement("div",{className:t.editContainer},0===n&&("PENDING"===e.status||"CANCELLED"===e.status)&&"DELETED"!==s.status&&"REVOKED"!==s.status&&l.createElement(ok.default,{variant:"contained",onClick:function(){return p(!0)}},"Edit")),l.createElement("div",{className:t.actionsContainer},v(e.status,e.id,s))),l.createElement(gd,{language:"toml",style:gs,"data-testid":"codeblock"},e.definition)))}),l.createElement(oC,{open:null!=c,title:c?MQ[c.action].title:"",body:c?MQ[c.action].body:"",onConfirm:function(){if(c){switch(c.action){case"approve":n(c.id);break;case"cancel":r(c.id);break;case"reject":i(c.id)}f(null)}},cancelButtonText:"Cancel",onCancel:function(){return f(null)}}),l.createElement(MF,{open:h,onClose:function(){return p(!1)},initialValues:{definition:m.definition,id:m.id},onSubmit:a}))});function M0(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function M2(){var e=M0(["\n ","\n fragment JobProposalPayloadFields on JobProposal {\n id\n externalJobID\n remoteUUID\n jobID\n specs {\n ...JobProposal_SpecsFields\n }\n status\n pendingUpdate\n }\n"]);return M2=function(){return e},e}var M3=n0(M2(),MX),M4=function(e){var t=e.onApprove,n=e.onCancel,r=e.onReject,i=e.onUpdateSpec,a=e.proposal;return l.createElement(ig,null,l.createElement(d.Z,{container:!0,spacing:32},l.createElement(d.Z,{item:!0,xs:9},l.createElement(iy,null,"Job Proposal #",a.id))),l.createElement(MI,{proposal:a}),l.createElement(d.Z,{container:!0,spacing:32},l.createElement(d.Z,{item:!0,xs:9},l.createElement(xQ,null,"Specs"))),l.createElement(d.Z,{container:!0,spacing:32},l.createElement(d.Z,{item:!0,xs:12},l.createElement(M1,{proposal:a,specs:a.specs,onReject:r,onApprove:t,onCancel:n,onUpdateSpec:i}))))};function M6(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function M5(e){if(Array.isArray(e))return e}function M8(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function M9(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){M8(a,r,i,o,s,"next",e)}function s(e){M8(a,r,i,o,s,"throw",e)}o(void 0)})}}function M7(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function Oe(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ot(e,t){return M5(e)||M7(e,t)||Or(e,t)||Oe()}function On(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Or(e,t){if(e){if("string"==typeof e)return M6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return M6(e,t)}}var Oi=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};function Oa(){var e=On(["\n ","\n query FetchJobProposal($id: ID!) {\n jobProposal(id: $id) {\n __typename\n ... on JobProposal {\n ...JobProposalPayloadFields\n }\n ... on NotFoundError {\n message\n }\n }\n }\n"]);return Oa=function(){return e},e}function Oo(){var e=On(["\n mutation UpdateJobProposalSpecDefinition(\n $id: ID!\n $input: UpdateJobProposalSpecDefinitionInput!\n ) {\n updateJobProposalSpecDefinition(id: $id, input: $input) {\n ... on UpdateJobProposalSpecDefinitionSuccess {\n __typename\n }\n ... on NotFoundError {\n message\n }\n }\n }\n"]);return Oo=function(){return e},e}function Os(){var e=On(["\n mutation RejectJobProposalSpec($id: ID!) {\n rejectJobProposalSpec(id: $id) {\n ... on RejectJobProposalSpecSuccess {\n spec {\n id\n }\n }\n ... on NotFoundError {\n message\n }\n }\n }\n"]);return Os=function(){return e},e}function Ou(){var e=On(["\n mutation ApproveJobProposalSpec($id: ID!, $force: Boolean) {\n approveJobProposalSpec(id: $id, force: $force) {\n ... on ApproveJobProposalSpecSuccess {\n spec {\n id\n }\n }\n ... on NotFoundError {\n message\n }\n }\n }\n"]);return Ou=function(){return e},e}function Oc(){var e=On(["\n mutation CancelJobProposalSpec($id: ID!) {\n cancelJobProposalSpec(id: $id) {\n ... on CancelJobProposalSpecSuccess {\n spec {\n id\n }\n }\n ... on NotFoundError {\n message\n }\n }\n }\n"]);return Oc=function(){return e},e}var Ol=n0(Oa(),M3),Of=n0(Oo()),Od=n0(Os()),Oh=n0(Ou()),Op=n0(Oc()),Ob=function(){var e=(0,h.UO)().id,t=(0,A.I0)(),n=(0,h.k6)(),r=oq().handleMutationError,i=rv(Ol,{variables:{id:e}}),a=i.data,o=i.loading,s=i.error,u=Ot(oo(Of,{refetchQueries:[Ol]}),1)[0],c=Ot(oo(Od,{refetchQueries:[Ol]}),1)[0],f=Ot(oo(Oh,{refetchQueries:[Ol]}),1)[0],d=Ot(oo(Op,{refetchQueries:[Ol]}),1)[0];if(o)return l.createElement(iR,null);if(s)return l.createElement(iD,{error:s});var p,b,m,g,v=(p=M9(function(e){var n,i,a,o,s;return Oi(this,function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),[4,u(((a={}).variables={id:e.id,input:{definition:e.definition}},a))];case 1:switch(null==(o=null===(n=(i=c.sent()).data)||void 0===n?void 0:n.updateJobProposalSpecDefinition)?void 0:o.__typename){case"UpdateJobProposalSpecDefinitionSuccess":t((0,ty.qt)("Spec updated"));break;case"NotFoundError":t((0,ty.LO)(o.message))}return[3,3];case 2:return r(s=c.sent()),[3,3];case 3:return[2]}})}),function(e){return p.apply(this,arguments)}),y=(b=M9(function(e){var n,i,a,o,s;return Oi(this,function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),[4,c(((a={}).variables={id:e},a))];case 1:switch(null==(o=null===(n=(i=u.sent()).data)||void 0===n?void 0:n.rejectJobProposalSpec)?void 0:o.__typename){case"RejectJobProposalSpecSuccess":t((0,ty.qt)("Spec rejected"));break;case"NotFoundError":t((0,ty.LO)(o.message))}return[3,3];case 2:return r(s=u.sent()),[3,3];case 3:return[2]}})}),function(e){return b.apply(this,arguments)}),w=(m=M9(function(e){var n,i,a,o,s;return Oi(this,function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),[4,d(((a={}).variables={id:e},a))];case 1:switch(null==(o=null===(n=(i=u.sent()).data)||void 0===n?void 0:n.cancelJobProposalSpec)?void 0:o.__typename){case"CancelJobProposalSpecSuccess":t((0,ty.qt)("Spec cancelled"));break;case"NotFoundError":t((0,ty.LO)(o.message))}return[3,3];case 2:return r(s=u.sent()),[3,3];case 3:return[2]}})}),function(e){return m.apply(this,arguments)}),_=(g=M9(function(e){var i,a,o,s,u;return Oi(this,function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),[4,f(((o={}).variables={id:e,force:!0},o))];case 1:switch(null==(s=null===(i=(a=c.sent()).data)||void 0===i?void 0:i.approveJobProposalSpec)?void 0:s.__typename){case"ApproveJobProposalSpecSuccess":n.push("/job_distributors"),setTimeout(function(){return t((0,ty.qt)("Spec approved"))},200);break;case"NotFoundError":t((0,ty.LO)(s.message))}return[3,3];case 2:return r(u=c.sent()),[3,3];case 3:return[2]}})}),function(e){return g.apply(this,arguments)}),E=null==a?void 0:a.jobProposal;switch(null==E?void 0:E.__typename){case"JobProposal":return l.createElement(M4,{proposal:E,onApprove:_,onCancel:w,onReject:y,onUpdateSpec:v});case"NotFoundError":return l.createElement(oa,null);default:return null}},Om=function(){var e=(0,h.$B)().path;return l.createElement(l.Fragment,null,l.createElement(h.AW,{exact:!0,path:"".concat(e,"/:id")},l.createElement(Ob,null)))},Og=function(e){var t=e.node;return l.createElement(oh,null,l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12,sm:4,md:3},l.createElement(op,{title:"EVM Chain ID"}),l.createElement(ob,{value:t.chain.id})),l.createElement(d.Z,{item:!0,xs:!1,sm:!1,md:4}),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(op,{title:"HTTP URL"}),l.createElement(ob,{value:""!==t.httpURL?t.httpURL:"--"})),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(op,{title:"WS URL"}),l.createElement(ob,{value:""!==t.wsURL?t.wsURL:"--"}))))};function Ov(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Oy(){var e=Ov(["\n fragment NodePayload_Fields on Node {\n id\n name\n chain {\n id\n }\n httpURL\n wsURL\n state\n sendOnly\n order\n }\n"]);return Oy=function(){return e},e}var Ow=n0(Oy()),O_=function(e){var t=e.node;return l.createElement(l.Fragment,null,l.createElement(ig,null,l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:12},l.createElement(iy,null,t.name)),l.createElement(d.Z,{item:!0,xs:12},l.createElement(Og,{node:t})))))};function OE(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function OS(){var e=OE(["\n ","\n query FetchNode($id: ID!) {\n node(id: $id) {\n __typename\n ... on Node {\n ...NodePayload_Fields\n }\n ... on NotFoundError {\n message\n }\n }\n }\n"]);return OS=function(){return e},e}var Ok=n0(OS(),Ow),Ox=function(){var e=rv(Ok,{variables:{id:(0,h.UO)().id}}),t=e.data,n=e.loading,r=e.error;if(n)return l.createElement(iR,null);if(r)return l.createElement(iD,{error:r});var i=null==t?void 0:t.node;switch(null==i?void 0:i.__typename){case"Node":return l.createElement(O_,{node:i});case"NotFoundError":return l.createElement(oa,null);default:return null}},OT=(0,b.withStyles)(iu)(function(e){var t=e.node,n=e.classes;return l.createElement(ir.Z,{className:n.row,hover:!0},l.createElement(r7.default,{className:n.cell,component:"th",scope:"row"},l.createElement(ih,{className:n.link,href:"/nodes/".concat(t.name)},t.name)),l.createElement(r7.default,null,t.chain.id),l.createElement(r7.default,null,t.state),l.createElement(r7.default,null,t.sendOnly?"SendOnly":"Primary"),l.createElement(r7.default,null,t.order?t.order:"NA"))});function OM(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function OO(e){if(Array.isArray(e))return e}function OA(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function OL(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function OC(e,t){return OO(e)||OA(e,t)||OD(e,t)||OL()}function OI(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function OD(e,t){if(e){if("string"==typeof e)return OM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return OM(e,t)}}function ON(){var e=OI(["\n fragment NodesPayload_ResultsFields on Node {\n id\n chain {\n id\n }\n name\n state\n sendOnly\n order\n }\n"]);return ON=function(){return e},e}var OP=n0(ON()),OR=function(e){var t=e.toLowerCase();return function(e){return e.toLowerCase().includes(t)}},Oj=function(e){return function(t){return""===e||OF(t,e)}};function OF(e,t){var n;return[e.id,e.name,e.chain.id].some(OR(t))}var OY=function(e){var t=e.nodes,n=e.page,r=e.pageSize,i=e.total,a=(0,h.k6)(),o=OC(l.useState(""),2),s=o[0],u=o[1],c=l.useMemo(function(){return t.filter(Oj(s.trim()))},[s,t]);return l.createElement(ig,null,l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:9},l.createElement(iy,null,"Nodes")),l.createElement(d.Z,{item:!0,xs:12},l.createElement(iE,{value:s,onChange:u,placeholder:"Search nodes"}),l.createElement(r5.Z,null,l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,"Name"),l.createElement(r7.default,null,"EVM Chain ID"),l.createElement(r7.default,null,"State"),l.createElement(r7.default,null,"Type"),l.createElement(r7.default,null,"Order"))),l.createElement(r9.Z,null,0===c.length&&l.createElement(ir.Z,null,l.createElement(r7.default,{component:"th",scope:"row",colSpan:4},"No nodes found")),c.map(function(e){return l.createElement(OT,{key:e.id,node:e})}))),l.createElement(it.Z,{component:"div",count:i,rowsPerPage:r,rowsPerPageOptions:[r],page:n-1,onChangePage:function(e,t){a.push("/nodes?page=".concat(t+1,"&per=").concat(r))},onChangeRowsPerPage:function(){},backIconButtonProps:{"aria-label":"prev-page"},nextIconButtonProps:{"aria-label":"next-page"}})))))};function OB(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function OU(){var e=OB(["\n ","\n query FetchNodes($offset: Int, $limit: Int) {\n nodes(offset: $offset, limit: $limit) {\n results {\n ...NodesPayload_ResultsFields\n }\n metadata {\n total\n }\n }\n }\n"]);return OU=function(){return e},e}var OH=n0(OU(),OP),O$=function(){var e=ij(),t=parseInt(e.get("page")||"1",10),n=parseInt(e.get("per")||"100",10),r=rv(OH,{variables:{offset:(t-1)*n,limit:n},fetchPolicy:"network-only"}),i=r.data,a=r.loading,o=r.error;return a?l.createElement(iR,null):o?l.createElement(iD,{error:o}):i?l.createElement(OY,{nodes:i.nodes.results,page:t,pageSize:n,total:i.nodes.metadata.total}):null},Oz=function(){var e=(0,h.$B)().path;return l.createElement(h.rs,null,l.createElement(h.AW,{path:"".concat(e,"/:id")},l.createElement(Ox,null)),l.createElement(h.AW,{exact:!0,path:e},l.createElement(O$,null)))},OG=function(e){var t=e.tx;return l.createElement(oh,null,l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12},l.createElement(op,{title:"Txn Hash"}),l.createElement(ob,{value:t.hash})),l.createElement(d.Z,{item:!0,xs:12,md:3},l.createElement(op,{title:"Chain ID"}),l.createElement(ob,{value:t.chain.id})),l.createElement(d.Z,{item:!0,xs:12,md:3},l.createElement(op,{title:"Status"}),l.createElement(ob,{value:km(t.state)})),l.createElement(d.Z,{item:!0,xs:12,md:3},l.createElement(op,{title:"Nonce"}),l.createElement(ob,{value:t.nonce})),l.createElement(d.Z,{item:!0,xs:12,md:3},l.createElement(op,{title:"Sent At (Block)"}),l.createElement(ob,{value:t.sentAt})),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(op,{title:"From"}),l.createElement(ob,{value:t.from})),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(op,{title:"To"}),l.createElement(ob,{value:t.to})),l.createElement(d.Z,{item:!0,xs:12,md:3},l.createElement(op,{title:"Value"}),l.createElement(ob,{value:t.value})),l.createElement(d.Z,{item:!0,xs:!1,md:3}),l.createElement(d.Z,{item:!0,xs:12,md:3},l.createElement(op,{title:"Gas Price"}),l.createElement(ob,{value:t.gasPrice})),l.createElement(d.Z,{item:!0,xs:12,md:3},l.createElement(op,{title:"Gas Limit"}),l.createElement(ob,{value:t.gasLimit})),l.createElement(d.Z,{item:!0,xs:12},l.createElement(op,{title:"Raw Hex"}),l.createElement(om,null,t.hex)),l.createElement(d.Z,{item:!0,xs:12},l.createElement(op,{title:"Data"}),l.createElement(om,null,t.data))))};function OW(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function OK(){var e=OW(["\n fragment EthTransactionPayloadFields on EthTransaction {\n chain {\n id\n }\n data\n from\n gasLimit\n gasPrice\n hash\n hex\n nonce\n sentAt\n state\n to\n value\n }\n"]);return OK=function(){return e},e}var OV=n0(OK()),Oq=function(e){var t=e.tx;return l.createElement(ig,null,l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:12},l.createElement(iy,null,"Transaction Details")),l.createElement(d.Z,{item:!0,xs:12},l.createElement(OG,{tx:t}))))};function OZ(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function OX(){var e=OZ(["\n ","\n query FetchEthTransaction($hash: ID!) {\n ethTransaction(hash: $hash) {\n __typename\n ... on EthTransaction {\n ...EthTransactionPayloadFields\n }\n ... on NotFoundError {\n message\n }\n }\n }\n"]);return OX=function(){return e},e}var OJ=n0(OX(),OV),OQ=function(){var e=rv(OJ,{variables:{hash:(0,h.UO)().id}}),t=e.data,n=e.loading,r=e.error;if(n)return l.createElement(iR,null);if(r)return l.createElement(iD,{error:r});var i=null==t?void 0:t.ethTransaction;switch(null==i?void 0:i.__typename){case"EthTransaction":return l.createElement(Oq,{tx:i});case"NotFoundError":return l.createElement(oa,null);default:return null}},O1=(0,b.withStyles)(iu)(function(e){var t=e.tx,n=e.classes;return l.createElement(ir.Z,{className:n.row,hover:!0},l.createElement(r7.default,{className:n.cell,component:"th",scope:"row"},l.createElement(ih,{className:n.link,href:"/transactions/".concat(t.hash)},_T(t.hash,{start:8,end:8}))),l.createElement(r7.default,null,t.chain.id),l.createElement(r7.default,null,_T(t.from,{start:8,end:8})),l.createElement(r7.default,null,_T(t.to,{start:8,end:8})),l.createElement(r7.default,null,t.nonce),l.createElement(r7.default,null,t.sentAt||"--"))});function O0(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function O2(){var e=O0(["\n fragment EthTransactionsPayload_ResultsFields on EthTransaction {\n chain {\n id\n }\n from\n hash\n to\n nonce\n sentAt\n }\n"]);return O2=function(){return e},e}var O3=n0(O2()),O4=function(e){var t=e.data,n=e.loading,r=e.page,i=e.pageSize,a=(0,h.k6)();return l.createElement(ig,null,l.createElement(d.Z,{container:!0,spacing:32},l.createElement(d.Z,{item:!0,xs:12},l.createElement(iy,null,"Transactions")),n&&l.createElement(iR,null),t&&l.createElement(d.Z,{item:!0,xs:12},l.createElement(r5.Z,null,l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,"Txn Hash"),l.createElement(r7.default,null,"Chain ID"),l.createElement(r7.default,null,"From"),l.createElement(r7.default,null,"To"),l.createElement(r7.default,null,"Nonce"),l.createElement(r7.default,null,"Block"))),l.createElement(r9.Z,null,(null==t?void 0:t.ethTransactions.results.length)===0&&l.createElement(ir.Z,null,l.createElement(r7.default,{component:"th",scope:"row",colSpan:6},"You haven’t created any transactions yet")),null==t?void 0:t.ethTransactions.results.map(function(e,t){return l.createElement(O1,{tx:e,key:t})}))),l.createElement(it.Z,{component:"div",count:t.ethTransactions.metadata.total,rowsPerPage:i,rowsPerPageOptions:[10,25,50,100],page:r-1,onChangePage:function(e,t){a.push("/transactions?page=".concat(t+1,"&per=").concat(i))},onChangeRowsPerPage:function(e){a.push("/transactions?page=".concat(r,"&per=").concat(parseInt(e.target.value,10)))},backIconButtonProps:{"aria-label":"prev-page"},nextIconButtonProps:{"aria-label":"next-page"}})))))};function O6(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function O5(){var e=O6(["\n ","\n query FetchEthTransactions($offset: Int, $limit: Int) {\n ethTransactions(offset: $offset, limit: $limit) {\n results {\n ...EthTransactionsPayload_ResultsFields\n }\n metadata {\n total\n }\n }\n }\n"]);return O5=function(){return e},e}var O8=n0(O5(),O3),O9=function(){var e=ij(),t=parseInt(e.get("page")||"1",10),n=parseInt(e.get("per")||"25",10),r=rv(O8,{variables:{offset:(t-1)*n,limit:n},fetchPolicy:"cache-and-network"}),i=r.data,a=r.loading,o=r.error;return o?l.createElement(iD,{error:o}):l.createElement(O4,{data:i,loading:a,page:t,pageSize:n})},O7=function(){var e=(0,h.$B)().path;return l.createElement(h.rs,null,l.createElement(h.AW,{path:"".concat(e,"/:id")},l.createElement(OQ,null)),l.createElement(h.AW,{exact:!0,path:e},l.createElement(O9,null)))};function Ae(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function At(e){if(Array.isArray(e))return e}function An(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function Ar(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ai(e,t){return At(e)||An(e,t)||Aa(e,t)||Ar()}function Aa(e,t){if(e){if("string"==typeof e)return Ae(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ae(e,t)}}e=n.hmd(e);var Ao=function(e){return{content:{marginTop:0,marginBottom:5*e.spacing.unit}}},As=function(e){var t=e.classes,n=Ai(l.useState(0),2),r=n[0],i=n[1],a=null;return l.createElement(d.Z,{container:!0,spacing:0},l.createElement(d.Z,{item:!0,xs:12},l.createElement(rQ,{onResize:function(e,t){return i(t)},drawerContainer:a}),l.createElement("main",{ref:function(e){a=e},style:{paddingTop:r}},l.createElement(r1.ZP,null),l.createElement("div",{className:t.content},l.createElement(h.rs,null,l.createElement(r6,{exact:!0,path:"/"},l.createElement(vE,null)),l.createElement(r6,{exact:!0,path:"/chains"},l.createElement(iz,null)),l.createElement(r6,{path:"/chains/:chainId"},l.createElement(a7,null)),l.createElement(r6,{path:"/bridges"},l.createElement(b6,null)),l.createElement(r6,{path:"/config"},l.createElement(gM,null)),l.createElement(r6,{path:"/job_distributors"},l.createElement(MC,null)),l.createElement(r6,{path:"/job_proposals"},l.createElement(Om,null)),l.createElement(r6,{path:"/jobs"},l.createElement(_m,null)),l.createElement(r6,{path:"/runs"},l.createElement(xu,null)),l.createElement(r6,{path:"/keys"},l.createElement(kn,null)),l.createElement(r6,{path:"/nodes"},l.createElement(Oz,null)),l.createElement(r6,{path:"/transactions"},l.createElement(O7,null)),l.createElement(r6,{component:oa}))))))};let Au=(0,p.wU)(e)((0,b.withStyles)(Ao)(As))},26842(e,t,n){"use strict";n.d(t,{iw:()=>U,tA:()=>$,KL:()=>H,Iw:()=>V,DQ:()=>W,cB:()=>T,LO:()=>M,t5:()=>k,qt:()=>x,Jc:()=>C,L7:()=>Y,EO:()=>B});var r,i,a=n(66289),o=n(41800),s=n.n(o),u=n(67932);(i=r||(r={})).IN_PROGRESS="in_progress",i.PENDING_INCOMING_CONFIRMATIONS="pending_incoming_confirmations",i.PENDING_CONNECTION="pending_connection",i.PENDING_BRIDGE="pending_bridge",i.PENDING_SLEEP="pending_sleep",i.ERRORED="errored",i.COMPLETED="completed";var c=n(87013),l=n(19084),f=n(34823);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function h(e){if(Array.isArray(e))return d(e)}function p(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function b(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){p(a,r,i,o,s,"next",e)}function s(e){p(a,r,i,o,s,"throw",e)}o(void 0)})}}function m(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function g(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function v(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function y(e){return h(e)||g(e)||w(e)||v()}function w(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}}var _=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},E=function(e,t){return{type:t,error:e.stack,errors:[]}},S=function(e,t){return function(n){m(n,a._7)?I(e):e(E(n,t))}},k=function(e,t){return{type:l.Ih.NOTIFY_SUCCESS,component:e,props:t}},x=function(e){return{type:l.Ih.NOTIFY_SUCCESS_MSG,msg:e}},T=function(e,t){return{type:l.Ih.NOTIFY_ERROR,component:e,error:t}},M=function(e){return{type:l.Ih.NOTIFY_ERROR_MSG,msg:e}},O=function(e){return{type:l.Mk.RECEIVE_SIGNIN_SUCCESS,authenticated:e.data.attributes.authenticated}},A=function(){return{type:l.Mk.RECEIVE_SIGNIN_FAIL}};function L(e){return function(t){return t({type:l.Mk.REQUEST_SIGNIN}),u.i.createSession(e).then(function(e){return t(O(e))}).catch(function(n){if(m(n,a._7))try{if(0==n.errors.length||null===n.errors[0].detail){t(A());return}n.errors[0].detail.json().then(function(n){if(!n){t(A());return}try{var r=JSON.parse(n.errors[0].detail);if(r.publicKey.challenge=D(r.publicKey.challenge),r.publicKey.allowCredentials.forEach(function(e){e.id=D(e.id)}),void 0===navigator.credentials){alert("Could not access credential subsystem in the browser. Must be using HTTPS or localhost."),t(A());return}navigator.credentials.get({publicKey:r.publicKey}).then(function(n){if(null===n){t(A());return}var r=n,i=r.response,a=i.authenticatorData,o=i.clientDataJSON,s=r.rawId,c=i.signature,l=i.userHandle,f=JSON.stringify({id:n.id,rawId:N(s),type:n.type,response:{authenticatorData:N(a),clientDataJSON:N(o),signature:N(c),userHandle:N(l)}});return e.webauthndata=f,u.i.createSession(e).then(function(e){return t(O(e))}).catch(function(e){t(A())})})}catch(i){t(A())}}).catch(function(e){t(A())})}catch(r){t(A())}else t(E(n,l.Mk.RECEIVE_SIGNIN_ERROR))})}}var C=function(){return{type:l.Mk.RECEIVE_SIGNOUT_SUCCESS,authenticated:!1}};function I(e){return u.i.destroySession().then(function(){return e(C())}).catch(function(t){if(m(t,a._7)){e(C());return}e(E(t,l.Mk.RECEIVE_SIGNIN_ERROR))})}function D(e){return Uint8Array.from(atob(e),function(e){return e.charCodeAt(0)})}function N(e){if(null===e)return"";var t=new Uint8Array(e),n=String.fromCharCode.apply(null,Array.from(t));return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function P(e){var t=e.data.attributes.settings;return t.publicKey.challenge=D(t.publicKey.challenge),t.publicKey.user.id=D(t.publicKey.user.id),t.publicKey.excludeCredentials&&t.publicKey.excludeCredentials.forEach(function(e){e.id=D(e.id)}),navigator.credentials.create({publicKey:t.publicKey})}function R(){if(void 0===navigator.credentials){alert("Could not access credential subsystem in the browser. Must be using HTTPS or localhost.");return}return u.v2.webauthn.beginKeyRegistration({}).then(function(e){return P(e).then(function(e){if(null===e){alert("Error, could not generate credential. User declined to enroll?");return}var t=e,n=t.response,r={id:e.id,rawId:N(t.rawId),type:e.type,response:{attestationObject:N(n.attestationObject),clientDataJSON:N(n.clientDataJSON)}};return u.v2.webauthn.finishKeyRegistration(r)})}).catch(function(e){alert("Key registration error, ensure MFA_RPID and MFA_RPORIGIN environment variables are set.\n"+e)})}var j={type:l.jp.RECEIVE_CREATE_SUCCESS},F=function(e){return{type:l.jp.RECEIVE_DELETE_SUCCESS,id:e}},Y=function(e){return L(e)},B=function(){return I},U=function(){return R()},H=function(e,t,n){return function(r){return r({type:l.jp.REQUEST_DELETE}),u.v2.chains.destroyChain(e).then(function(n){r(F(e)),r(k(t,n))}).catch(function(e){S(r,l.jp.RECEIVE_DELETE_ERROR)(e),r(T(n,e))})}},$=function(e,t,n,r){return function(i){return i({type:l.jp.REQUEST_CREATE}),u.v2.jobs.createJobRunV2(e,t).then(function(e){i(j),i(k(n,e))}).catch(function(e){S(i,l.jp.RECEIVE_CREATE_ERROR)(e),i(T(r,e))})}},z=function(e){return function(t){m(t,a._7)?e(C()):e(T(function(e){return e.msg},t))}};function G(e,t,n,r){var i="UPSERT"===t?"REQUEST_".concat(e):"REQUEST_".concat(t,"_").concat(e),a="UPSERT"===t?"RESPONSE_".concat(e):"RESPONSE_".concat(t,"_").concat(e),o="".concat(t,"_").concat(e);return function(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return function(e){return e({type:i}),n.apply(void 0,y(t)).then(function(t){e({type:o,data:r(t)})}).catch(z(e)).finally(function(){return e({type:a})})}}}function W(){var e;return e=b(function(e,t){var n,r,i,a,o,s,d,h,p,b,m;return _(this,function(g){switch(g.label){case 0:if(e(n=((r={}).type=l.Y0.FETCH_BUILD_INFO_REQUESTED,r)),i=(0,f.N)(t()),o={},i.commitSHA!==c.Y.commitSHA&&i.version!==c.Y.version)return e(a=(o.type=l.Y0.FETCH_BUILD_INFO_SUCCEEDED,o.buildInfo=i,o)),[2];g.label=1;case 1:return g.trys.push([1,3,,4]),[4,u.v2.buildInfo.show()];case 2:return s=g.sent(),e(d=((h={}).type=l.Y0.FETCH_BUILD_INFO_SUCCEEDED,h.buildInfo=s,h)),[3,4];case 3:return p=g.sent(),e(b=((m={}).type=l.Y0.FETCH_BUILD_INFO_FAILED,m.error=p,m)),z(e)(p),[3,4];case 4:return[2]}})}),function(t,n){return e.apply(this,arguments)}}function K(e,t,n){return G(e,"DELETE",t,n)}var V=function(e){return K("ERRORED_JOB_RUNS",u.v2.bulkDeleteRuns.bulkDeleteJobRuns,s())({status:[r.ERRORED],updatedBefore:e})}},67932(e,t,n){"use strict";n.d(t,{i:()=>j,v2:()=>F});var r=n(66289);function i(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var a="/sessions",o="/sessions",s=function e(t){var n=this;i(this,e),this.api=t,this.createSession=function(e){return n.create(e)},this.destroySession=function(){return n.destroy()},this.create=this.api.createResource(a),this.destroy=this.api.deleteResource(o)};function u(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var c="/v2/bulk_delete_runs",l=function e(t){var n=this;u(this,e),this.api=t,this.bulkDeleteJobRuns=function(e){return n.destroy(e)},this.destroy=this.api.deleteResource(c)};function f(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var d="/v2/chains/evm",h="".concat(d,"/:id"),p=function e(t){var n=this;f(this,e),this.api=t,this.getChains=function(){return n.index()},this.createChain=function(e){return n.create(e)},this.destroyChain=function(e){return n.destroy(void 0,{id:e})},this.updateChain=function(e,t){return n.update(t,{id:e})},this.index=this.api.fetchResource(d),this.create=this.api.createResource(d),this.destroy=this.api.deleteResource(h),this.update=this.api.updateResource(h)};function b(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var m="/v2/keys/evm/chain",g=function e(t){var n=this;b(this,e),this.api=t,this.chain=function(e){var t=new URLSearchParams;t.append("address",e.address),t.append("evmChainID",e.evmChainID),null!==e.abandon&&t.append("abandon",String(e.abandon)),null!==e.enabled&&t.append("enabled",String(e.enabled));var r=m+"?"+t.toString();return n.api.createResource(r)()}};function v(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var y="/v2/jobs",w="".concat(y,"/:specId/runs"),_=function e(t){var n=this;v(this,e),this.api=t,this.createJobRunV2=function(e,t){return n.post(t,{specId:e})},this.post=this.api.createResource(w,!0)};function E(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var S="/v2/log",k=function e(t){var n=this;E(this,e),this.api=t,this.getLogConfig=function(){return n.show()},this.updateLogConfig=function(e){return n.update(e)},this.show=this.api.fetchResource(S),this.update=this.api.updateResource(S)};function x(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var T="/v2/nodes",M=function e(t){var n=this;x(this,e),this.api=t,this.getNodes=function(){return n.index()},this.createNode=function(e){return n.create(e)},this.index=this.api.fetchResource(T),this.create=this.api.createResource(T)};function O(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var A="/v2/enroll_webauthn",L=function e(t){var n=this;O(this,e),this.api=t,this.beginKeyRegistration=function(e){return n.create(e)},this.finishKeyRegistration=function(e){return n.put(e)},this.create=this.api.fetchResource(A),this.put=this.api.createResource(A)};function C(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var I="/v2/build_info",D=function e(t){var n=this;C(this,e),this.api=t,this.show=function(){return n.api.GET(I)()}};function N(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var P=function e(t){N(this,e),this.api=t,this.buildInfo=new D(this.api),this.bulkDeleteRuns=new l(this.api),this.chains=new p(this.api),this.logConfig=new k(this.api),this.nodes=new M(this.api),this.jobs=new _(this.api),this.webauthn=new L(this.api),this.evmKeys=new g(this.api)},R=new r.V0({base:void 0}),j=new s(R),F=new P(R)},1398(e,t,n){"use strict";n.d(t,{Z:()=>d});var r=n(67294),i=n(32316),a=n(83638),o=n(94184),s=n.n(o);function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var c=function(e){var t=e.palette;return(0,i.createStyles)({default:{borderColor:"#BECAD6","&:hover":{backgroundColor:t.common.white,borderColor:"#BECAD6",boxShadow:"0 2px 4px 0 rgba(0,123,255,0.06), 0 2px 2px 0 rgba(0,0,0,0.06)"}},primary:{boxShadow:"0 0",backgroundColor:t.primary.main,color:t.common.white,"&:hover":{backgroundColor:t.primary.main,boxShadow:"0 2px 4px 0 rgba(0,123,255,0.19), 0 2px 2px 0 rgba(0,0,0,0.15)"}},secondary:{"&:hover":{backgroundColor:t.common.white}},danger:{borderColor:t.error.main,color:t.error.main,"&:hover":{backgroundColor:t.common.white,borderColor:t.error.main,boxShadow:"0 2px 4px 0 rgba(0,123,255,0.06), 0 2px 2px 0 rgba(0,0,0,0.06)"}},defaultRipple:{color:t.text.secondary}})},l=function(e,t){switch(e){case"primary":return{variant:"contained"};case"secondary":case"danger":return{variant:"outlined",color:"primary"};default:return{variant:"outlined",color:"secondary",TouchRippleProps:{classes:{root:t.defaultRipple}}}}},f=function(e){var t=e.variant,n=void 0===t?"default":t,i=e.disabled,o=e.type,c=e.component,f=e.href,d=e.classes,h=e.className,p=e.children,b=e.onClick,m=e.onMouseLeave,g=Object.assign({component:c,disabled:i,href:f,onClick:b,type:o,size:e.size,onMouseLeave:m},l(n,d)),v=s()(d[n],h);return r.createElement(a.default,u({},g,{className:v}),p)};let d=(0,i.withStyles)(c)(f)},5536(e,t,n){"use strict";n.d(t,{T:()=>c});var r=n(67294),i=n(32316);function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var o=(0,i.createStyles)({animate:{animation:"spin 4s linear infinite"},"@keyframes spin":{"100%":{transform:"rotate(360deg)"}}}),s=function(e){var t=e.src,n=e.width,i=e.height,a=e.alt,o=e.classes,s=e.spin,u=void 0!==s&&s;return r.createElement("img",{src:t,className:u?o.animate:"",alt:a,width:n,height:i})},u=(0,i.withStyles)(o)(s),c=function(e){return r.createElement(u,a({},e))}},3950(e,t,n){"use strict";n.d(t,{ZP:()=>x,jK:()=>v});var r=n(67294),i=n(37703),a=n(45697),o=n.n(a),s=n(82204),u=n(71426),c=n(94184),l=n.n(c),f=n(32316),d=function(e){var t=e.palette.success||{},n=e.palette.warning||{};return{base:{paddingLeft:5*e.spacing.unit,paddingRight:5*e.spacing.unit},success:{backgroundColor:t.main,color:t.contrastText},error:{backgroundColor:e.palette.error.dark,color:e.palette.error.contrastText},warning:{backgroundColor:n.contrastText,color:n.main}}},h=function(e){var t,n=e.success,r=e.error,i=e.warning,a=e.classes,o=e.className;return n?t=a.success:r?t=a.error:i&&(t=a.warning),l()(a.base,o,t)},p=function(e){return r.createElement(s.Z,{className:h(e),square:!0},r.createElement(u.default,{variant:"body2",color:"inherit",component:"div"},e.children))};p.defaultProps={success:!1,error:!1,warning:!1},p.propTypes={success:o().bool,error:o().bool,warning:o().bool};let b=(0,f.withStyles)(d)(p);var m=function(){return r.createElement(r.Fragment,null,"Unhandled error. Please help us by opening a"," ",r.createElement("a",{href:"https://github.com/smartcontractkit/chainlink/issues/new"},"bug report"))};let g=m;function v(e){return"string"==typeof e?e:e.component?e.component(e.props):r.createElement(g,null)}function y(e,t){var n;return n="string"==typeof e?e:e.component?e.component(e.props):r.createElement(g,null),r.createElement("p",{key:t},n)}var w=function(e){var t=e.notifications;return r.createElement(b,{error:!0},t.map(y))},_=function(e){var t=e.notifications;return r.createElement(b,{success:!0},t.map(y))},E=function(e){var t=e.errors,n=e.successes;return r.createElement("div",null,(null==t?void 0:t.length)>0&&r.createElement(w,{notifications:t}),n.length>0&&r.createElement(_,{notifications:n}))},S=function(e){return{errors:e.notifications.errors,successes:e.notifications.successes}},k=(0,i.$j)(S)(E);let x=k},9409(e,t,n){"use strict";n.d(t,{ZP:()=>j});var r=n(67294),i=n(37703),a=n(5977),o=n(32316),s=n(1398),u=n(82204),c=n(30060),l=n(71426),f=n(60520),d=n(39814),h=n(57209),p=n(26842),b=n(3950),m=n(5536),g=n(45697),v=n.n(g);let y=n.p+"9f6d832ef97e8493764e.svg";function w(){return(w=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var _=function(e){return r.createElement(m.T,w({src:y,alt:"Chainlink Operator"},e))};_.propTypes={width:v().number,height:v().number};let E=_;var S=n(97779),k=function(e){return function(t){return(0,S.DE)(e,t)}};let x=k;var T=n(9541);function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function O(e){if(Array.isArray(e))return e}function A(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function L(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function C(e,t){return O(e)||A(e,t)||I(e,t)||L()}function I(e,t){if(e){if("string"==typeof e)return M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return M(e,t)}}e=n.hmd(e);var D=function(e){return{container:{height:"100%"},cardContent:{paddingTop:6*e.spacing.unit,paddingLeft:4*e.spacing.unit,paddingRight:4*e.spacing.unit,"&:last-child":{paddingBottom:6*e.spacing.unit}},headerRow:{textAlign:"center"},error:{backgroundColor:e.palette.error.light,marginTop:2*e.spacing.unit},errorText:{color:e.palette.error.main}}},N=function(e){var t=C((0,r.useState)(""),2),n=t[0],i=t[1],o=C((0,r.useState)(""),2),h=o[0],p=o[1],m=function(e){return function(t){"email"===e&&i(t.target.value),"password"===e&&p(t.target.value)}},g=function(t){t.preventDefault(),e.submitSignIn({email:n,password:h})},v=e.classes,y=e.fetching,w=e.authenticated,_=e.errors;return w?r.createElement(a.l_,{to:(0,T.Tp)()||"/"}):r.createElement(d.Z,{container:!0,justify:"center",alignItems:"center",className:v.container,spacing:0},r.createElement(d.Z,{item:!0,xs:10,sm:6,md:4,lg:3,xl:2},r.createElement(u.Z,null,r.createElement(c.Z,{className:v.cardContent},r.createElement("form",{noValidate:!0,onSubmit:g},r.createElement(d.Z,{container:!0,spacing:8},r.createElement(d.Z,{item:!0,xs:12},r.createElement(d.Z,{container:!0,spacing:0},r.createElement(d.Z,{item:!0,xs:12,className:v.headerRow},r.createElement(E,{width:50})),r.createElement(d.Z,{item:!0,xs:12,className:v.headerRow},r.createElement(l.default,{variant:"h5"},"Operator")))),_.length>0&&_.map(function(e,t){return r.createElement(d.Z,{item:!0,xs:12,key:t},r.createElement(u.Z,{raised:!1,className:v.error},r.createElement(c.Z,null,r.createElement(l.default,{variant:"body1",className:v.errorText},(0,b.jK)(e)))))}),r.createElement(d.Z,{item:!0,xs:12},r.createElement(f.Z,{id:"email",label:"Email",margin:"normal",value:n,onChange:m("email"),error:_.length>0,variant:"outlined",fullWidth:!0})),r.createElement(d.Z,{item:!0,xs:12},r.createElement(f.Z,{id:"password",label:"Password",type:"password",autoComplete:"password",margin:"normal",value:h,onChange:m("password"),error:_.length>0,variant:"outlined",fullWidth:!0})),r.createElement(d.Z,{item:!0,xs:12},r.createElement(d.Z,{container:!0,spacing:0,justify:"center"},r.createElement(d.Z,{item:!0},r.createElement(s.Z,{type:"submit",variant:"primary"},"Access Account")))),y&&r.createElement(l.default,{variant:"body1",color:"textSecondary"},"Signing in...")))))))},P=function(e){return{fetching:e.authentication.fetching,authenticated:e.authentication.allowed,errors:e.notifications.errors}},R=(0,i.$j)(P,x({submitSignIn:p.L7}))(N);let j=(0,h.wU)(e)((0,o.withStyles)(D)(R))},16353(e,t,n){"use strict";n.d(t,{ZP:()=>H,rH:()=>U});var r,i=n(37703),a=n(97779),o=n(9541),s=n(19084);function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){u(e,t,n[t])})}return e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function f(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var d,h=c({},{allowed:!1,errors:[]},o.pm()),p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case s.Mk.RECEIVE_SIGNOUT_SUCCESS:case s.Mk.RECEIVE_SIGNIN_SUCCESS:var n={allowed:t.authenticated};return o.Ks(n),f(c({},e,n),{errors:[]});case s.Mk.RECEIVE_SIGNIN_FAIL:var r={allowed:!1};return o.Ks(r),f(c({},e,r),{errors:[]});case s.Mk.RECEIVE_SIGNIN_ERROR:case s.Mk.RECEIVE_SIGNOUT_ERROR:var i={allowed:!1};return o.Ks(i),f(c({},e,i),{errors:t.errors||[]});default:return e}};let b=p;function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){m(e,t,n[t])})}return e}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function y(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):v(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var w,_={count:0};(w=r||(r={})).REQUEST="REQUEST_",w.RECEIVE="RECEIVE_",w.RESPONSE="RESPONSE_";var E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_,t=arguments.length>1?arguments[1]:void 0;return t.type?t.type.startsWith(r.REQUEST)?y(g({},e),{count:e.count+1}):t.type.startsWith(r.RECEIVE)?y(g({},e),{count:Math.max(e.count-1,0)}):t.type.startsWith(r.RESPONSE)?y(g({},e),{count:Math.max(e.count-1,0)}):t.type===s.di.REDIRECT?y(g({},e),{count:0}):e:e};let S=E;function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){k(e,t,n[t])})}return e}function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function M(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):T(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var O={errors:[],successes:[],currentUrl:void 0},A=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case s.di.MATCH_ROUTE:return M(x({},O),{currentUrl:t.pathname});case s.Ih.NOTIFY_SUCCESS:var n={component:t.component,props:t.props};return M(x({},e),{successes:[n],errors:[]});case s.Ih.NOTIFY_SUCCESS_MSG:return M(x({},e),{successes:[t.msg],errors:[]});case s.Ih.NOTIFY_ERROR:var r=t.error.errors,i=null==r?void 0:r.map(function(e){return L(t,e)});return M(x({},e),{successes:[],errors:i});case s.Ih.NOTIFY_ERROR_MSG:return M(x({},e),{successes:[],errors:[t.msg]});case s.Mk.RECEIVE_SIGNIN_FAIL:return M(x({},e),{successes:[],errors:["Your email or password is incorrect. Please try again"]});default:return e}};function L(e,t){return{component:e.component,props:{msg:t.detail}}}let C=A;function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){I(e,t,n[t])})}return e}function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function P(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):N(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var R={to:void 0},j=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:R,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case s.di.REDIRECT:return P(D({},e),{to:t.to});case s.di.MATCH_ROUTE:return P(D({},e),{to:void 0});default:return e}};let F=j;var Y=n(87013),B=(0,a.UY)({authentication:b,fetching:S,notifications:C,redirect:F,buildInfo:Y.Z});B(void 0,{type:"INITIAL_STATE"});var U=i.v9;let H=B},19084(e,t,n){"use strict";var r,i,a,o,s,u,c,l,f,d;n.d(t,{Ih:()=>i,Mk:()=>a,Y0:()=>s,di:()=>r,jp:()=>o}),n(67294),(u=r||(r={})).REDIRECT="REDIRECT",u.MATCH_ROUTE="MATCH_ROUTE",(c=i||(i={})).NOTIFY_SUCCESS="NOTIFY_SUCCESS",c.NOTIFY_SUCCESS_MSG="NOTIFY_SUCCESS_MSG",c.NOTIFY_ERROR="NOTIFY_ERROR",c.NOTIFY_ERROR_MSG="NOTIFY_ERROR_MSG",(l=a||(a={})).REQUEST_SIGNIN="REQUEST_SIGNIN",l.RECEIVE_SIGNIN_SUCCESS="RECEIVE_SIGNIN_SUCCESS",l.RECEIVE_SIGNIN_FAIL="RECEIVE_SIGNIN_FAIL",l.RECEIVE_SIGNIN_ERROR="RECEIVE_SIGNIN_ERROR",l.RECEIVE_SIGNOUT_SUCCESS="RECEIVE_SIGNOUT_SUCCESS",l.RECEIVE_SIGNOUT_ERROR="RECEIVE_SIGNOUT_ERROR",(f=o||(o={})).RECEIVE_CREATE_ERROR="RECEIVE_CREATE_ERROR",f.RECEIVE_CREATE_SUCCESS="RECEIVE_CREATE_SUCCESS",f.RECEIVE_DELETE_ERROR="RECEIVE_DELETE_ERROR",f.RECEIVE_DELETE_SUCCESS="RECEIVE_DELETE_SUCCESS",f.RECEIVE_UPDATE_ERROR="RECEIVE_UPDATE_ERROR",f.RECEIVE_UPDATE_SUCCESS="RECEIVE_UPDATE_SUCCESS",f.REQUEST_CREATE="REQUEST_CREATE",f.REQUEST_DELETE="REQUEST_DELETE",f.REQUEST_UPDATE="REQUEST_UPDATE",f.UPSERT_CONFIGURATION="UPSERT_CONFIGURATION",f.UPSERT_JOB_RUN="UPSERT_JOB_RUN",f.UPSERT_JOB_RUNS="UPSERT_JOB_RUNS",f.UPSERT_TRANSACTION="UPSERT_TRANSACTION",f.UPSERT_TRANSACTIONS="UPSERT_TRANSACTIONS",f.UPSERT_BUILD_INFO="UPSERT_BUILD_INFO",(d=s||(s={})).FETCH_BUILD_INFO_REQUESTED="FETCH_BUILD_INFO_REQUESTED",d.FETCH_BUILD_INFO_SUCCEEDED="FETCH_BUILD_INFO_SUCCEEDED",d.FETCH_BUILD_INFO_FAILED="FETCH_BUILD_INFO_FAILED"},87013(e,t,n){"use strict";n.d(t,{Y:()=>o,Z:()=>u});var r=n(19084);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){i(e,t,n[t])})}return e}var o={commitSHA:"unknown",version:"unknown"},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o,t=arguments.length>1?arguments[1]:void 0;return t.type===r.Y0.FETCH_BUILD_INFO_SUCCEEDED?a({},t.buildInfo):e};let u=s},34823(e,t,n){"use strict";n.d(t,{N:()=>r});var r=function(e){return e.buildInfo}},73343(e,t,n){"use strict";n.d(t,{r:()=>u});var r=n(19350),i=n(32316),a=n(59114),o=n(5324),s={props:{MuiGrid:{spacing:3*o.default.unit},MuiCardHeader:{titleTypographyProps:{color:"secondary"}}},palette:{action:{hoverOpacity:.3},primary:{light:"#E5F1FF",main:"#3c40c6",contrastText:"#fff"},secondary:{main:"#3d5170"},success:{light:"#e8faf1",main:r.ek.A700,dark:r.ek[700],contrastText:r.y0.white},warning:{light:"#FFFBF1",main:"#fff6b6",contrastText:"#fad27a"},error:{light:"#ffdada",main:"#f44336",dark:"#d32f2f",contrastText:"#fff"},background:{default:"#f5f6f8",appBar:"#3c40c6"},text:{primary:(0,a.darken)(r.BA.A700,.7),secondary:"#818ea3"},listPendingStatus:{background:"#fef7e5",color:"#fecb4c"},listCompletedStatus:{background:"#e9faf2",color:"#4ed495"}},shape:{borderRadius:o.default.unit},overrides:{MuiButton:{root:{borderRadius:o.default.unit/2,textTransform:"none"},sizeLarge:{padding:void 0,fontSize:void 0,paddingTop:o.default.unit,paddingBottom:o.default.unit,paddingLeft:5*o.default.unit,paddingRight:5*o.default.unit}},MuiTableCell:{body:{fontSize:"1rem"},head:{fontSize:"1rem",fontWeight:400}},MuiCardHeader:{root:{borderBottom:"1px solid rgba(0, 0, 0, 0.12)"},action:{marginTop:-2,marginRight:0,"& >*":{marginLeft:2*o.default.unit}},subheader:{marginTop:.5*o.default.unit}}},typography:{useNextVariants:!0,fontFamily:"-apple-system,BlinkMacSystemFont,Roboto,Helvetica,Arial,sans-serif",button:{textTransform:"none",fontSize:"1.2em"},body1:{fontSize:"1.0rem",fontWeight:400,lineHeight:"1.46429em",color:"rgba(0, 0, 0, 0.87)",letterSpacing:-.4},body2:{fontSize:"1.0rem",fontWeight:500,lineHeight:"1.71429em",color:"rgba(0, 0, 0, 0.87)",letterSpacing:-.4},body1Next:{color:"rgb(29, 29, 29)",fontWeight:400,fontSize:"1rem",lineHeight:1.5,letterSpacing:-.4},body2Next:{color:"rgb(29, 29, 29)",fontWeight:400,fontSize:"0.875rem",lineHeight:1.5,letterSpacing:-.4},display1:{color:"#818ea3",fontSize:"2.125rem",fontWeight:400,lineHeight:"1.20588em",letterSpacing:-.4},display2:{color:"#818ea3",fontSize:"2.8125rem",fontWeight:400,lineHeight:"1.13333em",marginLeft:"-.02em",letterSpacing:-.4},display3:{color:"#818ea3",fontSize:"3.5rem",fontWeight:400,lineHeight:"1.30357em",marginLeft:"-.02em",letterSpacing:-.4},display4:{fontSize:14,fontWeightLight:300,fontWeightMedium:500,fontWeightRegular:400,letterSpacing:-.4},h1:{color:"rgb(29, 29, 29)",fontSize:"6rem",fontWeight:300,lineHeight:1},h2:{color:"rgb(29, 29, 29)",fontSize:"3.75rem",fontWeight:300,lineHeight:1},h3:{color:"rgb(29, 29, 29)",fontSize:"3rem",fontWeight:400,lineHeight:1.04},h4:{color:"rgb(29, 29, 29)",fontSize:"2.125rem",fontWeight:400,lineHeight:1.17},h5:{color:"rgb(29, 29, 29)",fontSize:"1.5rem",fontWeight:400,lineHeight:1.33,letterSpacing:-.4},h6:{fontSize:"0.8rem",fontWeight:450,lineHeight:"1.71429em",color:"rgba(0, 0, 0, 0.87)",letterSpacing:-.4},subheading:{color:"rgb(29, 29, 29)",fontSize:"1rem",fontWeight:400,lineHeight:"1.5em",letterSpacing:-.4},subtitle1:{color:"rgb(29, 29, 29)",fontSize:"1rem",fontWeight:400,lineHeight:1.75,letterSpacing:-.4},subtitle2:{color:"rgb(29, 29, 29)",fontSize:"0.875rem",fontWeight:500,lineHeight:1.57,letterSpacing:-.4}},shadows:["none","0px 1px 3px 0px rgba(0, 0, 0, 0.1),0px 1px 1px 0px rgba(0, 0, 0, 0.04),0px 2px 1px -1px rgba(0, 0, 0, 0.02)","0px 1px 5px 0px rgba(0, 0, 0, 0.1),0px 2px 2px 0px rgba(0, 0, 0, 0.04),0px 3px 1px -2px rgba(0, 0, 0, 0.02)","0px 1px 8px 0px rgba(0, 0, 0, 0.1),0px 3px 4px 0px rgba(0, 0, 0, 0.04),0px 3px 3px -2px rgba(0, 0, 0, 0.02)","0px 2px 4px -1px rgba(0, 0, 0, 0.1),0px 4px 5px 0px rgba(0, 0, 0, 0.04),0px 1px 10px 0px rgba(0, 0, 0, 0.02)","0px 3px 5px -1px rgba(0, 0, 0, 0.1),0px 5px 8px 0px rgba(0, 0, 0, 0.04),0px 1px 14px 0px rgba(0, 0, 0, 0.02)","0px 3px 5px -1px rgba(0, 0, 0, 0.1),0px 6px 10px 0px rgba(0, 0, 0, 0.04),0px 1px 18px 0px rgba(0, 0, 0, 0.02)","0px 4px 5px -2px rgba(0, 0, 0, 0.1),0px 7px 10px 1px rgba(0, 0, 0, 0.04),0px 2px 16px 1px rgba(0, 0, 0, 0.02)","0px 5px 5px -3px rgba(0, 0, 0, 0.1),0px 8px 10px 1px rgba(0, 0, 0, 0.04),0px 3px 14px 2px rgba(0, 0, 0, 0.02)","0px 5px 6px -3px rgba(0, 0, 0, 0.1),0px 9px 12px 1px rgba(0, 0, 0, 0.04),0px 3px 16px 2px rgba(0, 0, 0, 0.02)","0px 6px 6px -3px rgba(0, 0, 0, 0.1),0px 10px 14px 1px rgba(0, 0, 0, 0.04),0px 4px 18px 3px rgba(0, 0, 0, 0.02)","0px 6px 7px -4px rgba(0, 0, 0, 0.1),0px 11px 15px 1px rgba(0, 0, 0, 0.04),0px 4px 20px 3px rgba(0, 0, 0, 0.02)","0px 7px 8px -4px rgba(0, 0, 0, 0.1),0px 12px 17px 2px rgba(0, 0, 0, 0.04),0px 5px 22px 4px rgba(0, 0, 0, 0.02)","0px 7px 8px -4px rgba(0, 0, 0, 0.1),0px 13px 19px 2px rgba(0, 0, 0, 0.04),0px 5px 24px 4px rgba(0, 0, 0, 0.02)","0px 7px 9px -4px rgba(0, 0, 0, 0.1),0px 14px 21px 2px rgba(0, 0, 0, 0.04),0px 5px 26px 4px rgba(0, 0, 0, 0.02)","0px 8px 9px -5px rgba(0, 0, 0, 0.1),0px 15px 22px 2px rgba(0, 0, 0, 0.04),0px 6px 28px 5px rgba(0, 0, 0, 0.02)","0px 8px 10px -5px rgba(0, 0, 0, 0.1),0px 16px 24px 2px rgba(0, 0, 0, 0.04),0px 6px 30px 5px rgba(0, 0, 0, 0.02)","0px 8px 11px -5px rgba(0, 0, 0, 0.1),0px 17px 26px 2px rgba(0, 0, 0, 0.04),0px 6px 32px 5px rgba(0, 0, 0, 0.02)","0px 9px 11px -5px rgba(0, 0, 0, 0.1),0px 18px 28px 2px rgba(0, 0, 0, 0.04),0px 7px 34px 6px rgba(0, 0, 0, 0.02)","0px 9px 12px -6px rgba(0, 0, 0, 0.1),0px 19px 29px 2px rgba(0, 0, 0, 0.04),0px 7px 36px 6px rgba(0, 0, 0, 0.02)","0px 10px 13px -6px rgba(0, 0, 0, 0.1),0px 20px 31px 3px rgba(0, 0, 0, 0.04),0px 8px 38px 7px rgba(0, 0, 0, 0.02)","0px 10px 13px -6px rgba(0, 0, 0, 0.1),0px 21px 33px 3px rgba(0, 0, 0, 0.04),0px 8px 40px 7px rgba(0, 0, 0, 0.02)","0px 10px 14px -6px rgba(0, 0, 0, 0.1),0px 22px 35px 3px rgba(0, 0, 0, 0.04),0px 8px 42px 7px rgba(0, 0, 0, 0.02)","0px 11px 14px -7px rgba(0, 0, 0, 0.1),0px 23px 36px 3px rgba(0, 0, 0, 0.04),0px 9px 44px 8px rgba(0, 0, 0, 0.02)","0px 11px 15px -7px rgba(0, 0, 0, 0.1),0px 24px 38px 3px rgba(0, 0, 0, 0.04),0px 9px 46px 8px rgba(0, 0, 0, 0.02)",]},u=(0,i.createMuiTheme)(s)},66289(e,t,n){"use strict";function r(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function i(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function a(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function o(e,t,n){return(o=a()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&f(i,n.prototype),i}).apply(null,arguments)}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}function c(e){return -1!==Function.toString.call(e).indexOf("[native code]")}function l(e,t){return t&&("object"===p(t)||"function"==typeof t)?t:r(e)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,{V0:()=>B,_7:()=>v});var d,h,p=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function b(e){var t="function"==typeof Map?new Map:void 0;return(b=function(e){if(null===e||!c(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return o(e,arguments,s(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),f(n,e)})(e)}function m(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function g(e){var t=m();return function(){var n,r=s(e);if(t){var i=s(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return l(this,n)}}var v=function(e){u(n,e);var t=g(n);function n(e){var r;return i(this,n),(r=t.call(this,"AuthenticationError(".concat(e.statusText,")"))).errors=[{status:e.status,detail:e},],r}return n}(b(Error)),y=function(e){u(n,e);var t=g(n);function n(e){var r,a=e.errors;return i(this,n),(r=t.call(this,"BadRequestError")).errors=a,r}return n}(b(Error)),w=function(e){u(n,e);var t=g(n);function n(e){var r;return i(this,n),(r=t.call(this,"UnprocessableEntityError")).errors=e,r}return n}(b(Error)),_=function(e){u(n,e);var t=g(n);function n(e){var r;return i(this,n),(r=t.call(this,"ServerError")).errors=e,r}return n}(b(Error)),E=function(e){u(n,e);var t=g(n);function n(e){var r,a=e.errors;return i(this,n),(r=t.call(this,"ConflictError")).errors=a,r}return n}(b(Error)),S=function(e){u(n,e);var t=g(n);function n(e){var r;return i(this,n),(r=t.call(this,"UnknownResponseError(".concat(e.statusText,")"))).errors=[{status:e.status,detail:e.statusText},],r}return n}(b(Error));function k(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2e4;return Promise.race([fetch(e,t),new Promise(function(e,t){return setTimeout(function(){return t(Error("timeout"))},n)}),])}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function T(e){if(Array.isArray(e))return e}function M(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function O(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function A(e,t){return T(e)||M(e,t)||L(e,t)||O()}function L(e,t){if(e){if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return x(e,t)}}function C(e,t){return e===h.GET?function(){return{method:"GET",credentials:"include"}}:I(e,t)}function I(e,t){return function(n){return{method:e,body:t?n:JSON.stringify(n),credentials:"include",headers:{Accept:"application/json","Content-Type":"application/json"}}}}function D(e,t,n){var r;try{r=new URL(t,e)}catch(i){var a=i.message;throw Error("Error when creating url with path=".concat(t,", base=").concat(e,": ").concat(a))}return n&&Object.entries(n).forEach(function(e){var t=A(e,2),n=t[0],i=t[1];return"string"==typeof i?r.searchParams.append(n,i):void 0!=i?r.searchParams.append(n,i.toString()):void 0}),r}n(80204),(d=h||(h={})).GET="GET",d.POST="POST",d.PATCH="PATCH",d.DELETE="DELETE";var N=n(14779),P=n.n(N);function R(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function j(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){R(a,r,i,o,s,"next",e)}function s(e){R(a,r,i,o,s,"throw",e)}o(void 0)})}}function F(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var Y=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},B=function(){function e(t){F(this,e),this.options=t,this.fetchResource=this.methodFactory(h.GET),this.GET=this.methodFactory(h.GET),this.createResource=this.methodFactory(h.POST),this.POST=this.methodFactory(h.POST),this.updateResource=this.methodFactory(h.PATCH),this.PATCH=this.methodFactory(h.PATCH),this.deleteResource=this.methodFactory(h.DELETE),this.DELETE=this.methodFactory(h.DELETE)}return e.prototype.methodFactory=function(e){var t=this;return function(n,r){var i=P().compile(n);return function(a,o){var s,u=o?i(o):n,c=e===h.GET?a:{},l=D(null!==(s=t.options.base)&&void 0!==s?s:location.origin,u,c),f=C(e,r);return k(l.toString(),f(a)).then(function(e){return U(e)})}}},e}();function U(e){return H.apply(this,arguments)}function H(){return(H=j(function(e){var t,n,r;return Y(this,function(i){switch(i.label){case 0:if(204!==e.status)return[3,1];return[2,t={}];case 1:if(!(e.status>=200&&e.status<300))return[3,2];return[2,e.json()];case 2:if(400!==e.status)return[3,3];return[2,e.json().then(function(e){throw new y(e)})];case 3:if(401!==e.status)return[3,4];throw new v(e);case 4:if(422!==e.status)return[3,6];return[4,$(e)];case 5:throw n=i.sent(),new w(n);case 6:if(409!==e.status)return[3,7];return[2,e.json().then(function(e){throw new E(e)})];case 7:if(!(e.status>=500))return[3,9];return[4,$(e)];case 8:throw r=i.sent(),new _(r);case 9:throw new S(e);case 10:return[2]}})})).apply(this,arguments)}function $(e){return z.apply(this,arguments)}function z(){return(z=j(function(e){return Y(this,function(t){return[2,e.json().then(function(t){return t.errors?t.errors.map(function(t){return{status:e.status,detail:t.detail}}):G(e)}).catch(function(){return G(e)})]})})).apply(this,arguments)}function G(e){return[{status:e.status,detail:e.statusText},]}},50109(e,t,n){"use strict";n.d(t,{LK:()=>o,U2:()=>i,eT:()=>s,t8:()=>a});var r=n(12795);function i(e){return r.ZP.getItem("chainlink.".concat(e))}function a(e,t){r.ZP.setItem("chainlink.".concat(e),t)}function o(e){var t=i(e),n={};if(t)try{return JSON.parse(t)}catch(r){}return n}function s(e,t){a(e,JSON.stringify(t))}},9541(e,t,n){"use strict";n.d(t,{Ks:()=>u,Tp:()=>a,iR:()=>o,pm:()=>s});var r=n(50109),i="persistURL";function a(){return r.U2(i)||""}function o(e){r.t8(i,e)}function s(){return r.LK("authentication")}function u(e){r.eT("authentication",e)}},67121(e,t,n){"use strict";function r(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}n.r(t),n.d(t,{default:()=>o}),e=n.hmd(e),i="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:e;var i,a=r(i);let o=a},2177(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=!0,i="Invariant failed";function a(e,t){if(!e){if(r)throw Error(i);throw Error(i+": "+(t||""))}}let o=a},11742(e){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach(function(t){e.addRange(t)}),t&&t.focus()}}},94633(e){function t(e,t){var n=e.length,a=Array(n),o={},s=n,u=r(t),c=i(e);for(t.forEach(function(e){if(!c.has(e[0])||!c.has(e[1]))throw Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)o[s]||l(e[s],s,new Set);return a;function l(e,t,r){if(r.has(e)){var i;try{i=", node was:"+JSON.stringify(e)}catch(s){i=""}throw Error("Cyclic dependency"+i)}if(!c.has(e))throw Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(e));if(!o[t]){o[t]=!0;var f=u.get(e)||new Set;if(t=(f=Array.from(f)).length){r.add(e);do{var d=f[--t];l(d,c.get(d),r)}while(t)r.delete(e)}a[--n]=e}}}function n(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var i=e[n];t.add(i[0]),t.add(i[1])}return Array.from(t)}function r(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}function i(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}e.exports=function(e){return t(n(e),e)},e.exports.array=t},70655(e,t,n){"use strict";n.d(t,{Jh:()=>u,ZT:()=>i,_T:()=>o,ev:()=>c,mG:()=>s,pi:()=>a});var r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function o(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function s(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){e.done?n(e.value):i(e.value).then(o,s)}u((r=r.apply(e,t||[])).next())})}function u(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}function c(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}},25869(e,t,n){"use strict";function r(e,t){return t=t||{},new Promise(function(n,r){var i=new XMLHttpRequest,a=[],o=[],s={},u=function(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:u,headers:{keys:function(){return a},entries:function(){return o},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.toLowerCase() in s}}}};for(var c in i.open(t.method||"get",e,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(e,t,n){a.push(t=t.toLowerCase()),o.push([t,n]),s[t]=s[t]?s[t]+","+n:n}),n(u())},i.onerror=r,i.withCredentials="include"==t.credentials,t.headers)i.setRequestHeader(c,t.headers[c]);i.send(t.body||null)})}n.r(t),n.d(t,{default:()=>r})},94927(e,t,n){function r(e,t){if(i("noDeprecation"))return e;var n=!1;function r(){if(!n){if(i("throwDeprecation"))throw Error(t);i("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}return r}function i(e){try{if(!n.g.localStorage)return!1}catch(t){return!1}var r=n.g.localStorage[e];return null!=r&&"true"===String(r).toLowerCase()}e.exports=r},42473(e){"use strict";var t=function(){};e.exports=t},84763(e){e.exports=Worker},47529(e){e.exports=n;var t=Object.prototype.hasOwnProperty;function n(){for(var e={},n=0;n<arguments.length;n++){var r=arguments[n];for(var i in r)t.call(r,i)&&(e[i]=r[i])}return e}},52361(){},94616(){},73897(e){function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},63405(e,t,n){var r=n(73897);function i(e){if(Array.isArray(e))return r(e)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},66115(e){function t(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},56690(e){function t(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},89728(e){function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function n(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},38416(e){function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},10434(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(this,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},73808(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},61655(e,t,n){var r=n(6015);function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},7867(e,t,n){var r=n(6015);function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},64836(e){function t(e){return e&&e.__esModule?e:{default:e}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},75263(e,t,n){var r=n(18698).default;function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}function a(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var a={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var u=o?Object.getOwnPropertyDescriptor(e,s):null;u&&(u.get||u.set)?Object.defineProperty(a,s,u):a[s]=e[s]}return a.default=e,n&&n.set(e,a),a}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports},79498(e){function t(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},42281(e){function t(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},70215(e,t,n){var r=n(7071);function i(e,t){if(null==e)return{};var n,i,a=r(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},7071(e){function t(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},94993(e,t,n){var r=n(18698).default,i=n(66115);function a(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return i(e)}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports},6015(e){function t(n,r){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},861(e,t,n){var r=n(63405),i=n(79498),a=n(86116),o=n(42281);function s(e){return r(e)||i(e)||a(e)||o()}e.exports=s,e.exports.__esModule=!0,e.exports.default=e.exports},18698(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},86116(e,t,n){var r=n(73897);function i(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},1644(e,t,n){"use strict";var r,i;function a(e){return!!e&&e<7}n.d(t,{I:()=>r,O:()=>a}),(i=r||(r={}))[i.loading=1]="loading",i[i.setVariables=2]="setVariables",i[i.fetchMore=3]="fetchMore",i[i.refetch=4]="refetch",i[i.poll=6]="poll",i[i.ready=7]="ready",i[i.error=8]="error"},30990(e,t,n){"use strict";n.d(t,{MS:()=>s,YG:()=>a,cA:()=>c,ls:()=>o});var r=n(70655);n(83952);var i=n(13154),a=Symbol();function o(e){return!!e.extensions&&Array.isArray(e.extensions[a])}function s(e){return e.hasOwnProperty("graphQLErrors")}var u=function(e){var t=(0,r.ev)((0,r.ev)((0,r.ev)([],e.graphQLErrors,!0),e.clientErrors,!0),e.protocolErrors,!0);return e.networkError&&t.push(e.networkError),t.map(function(e){return(0,i.s)(e)&&e.message||"Error message not found."}).join("\n")},c=function(e){function t(n){var r=n.graphQLErrors,i=n.protocolErrors,a=n.clientErrors,o=n.networkError,s=n.errorMessage,c=n.extraInfo,l=e.call(this,s)||this;return l.name="ApolloError",l.graphQLErrors=r||[],l.protocolErrors=i||[],l.clientErrors=a||[],l.networkError=o||null,l.message=s||u(l),l.extraInfo=c,l.__proto__=t.prototype,l}return(0,r.ZT)(t,e),t}(Error)},85317(e,t,n){"use strict";n.d(t,{K:()=>a});var r=n(67294),i=n(30320).aS?Symbol.for("__APOLLO_CONTEXT__"):"__APOLLO_CONTEXT__";function a(){var e=r.createContext[i];return e||(Object.defineProperty(r.createContext,i,{value:e=r.createContext({}),enumerable:!1,writable:!1,configurable:!0}),e.displayName="ApolloContext"),e}},21436(e,t,n){"use strict";n.d(t,{O:()=>i,k:()=>r});var r=Array.isArray;function i(e){return Array.isArray(e)&&e.length>0}},30320(e,t,n){"use strict";n.d(t,{DN:()=>s,JC:()=>l,aS:()=>o,mr:()=>i,sy:()=>a});var r=n(83952),i="function"==typeof WeakMap&&"ReactNative"!==(0,r.wY)(function(){return navigator.product}),a="function"==typeof WeakSet,o="function"==typeof Symbol&&"function"==typeof Symbol.for,s=o&&Symbol.asyncIterator,u="function"==typeof(0,r.wY)(function(){return window.document.createElement}),c=(0,r.wY)(function(){return navigator.userAgent.indexOf("jsdom")>=0})||!1,l=u&&!c},53712(e,t,n){"use strict";function r(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Object.create(null);return e.forEach(function(e){e&&Object.keys(e).forEach(function(t){var r=e[t];void 0!==r&&(n[t]=r)})}),n}n.d(t,{o:()=>r})},10542(e,t,n){"use strict";n.d(t,{J:()=>o}),n(83952);var r=n(13154);function i(e){var t=new Set([e]);return t.forEach(function(e){(0,r.s)(e)&&a(e)===e&&Object.getOwnPropertyNames(e).forEach(function(n){(0,r.s)(e[n])&&t.add(e[n])})}),e}function a(e){if(__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(t){if(t instanceof TypeError)return null;throw t}return e}function o(e){return __DEV__&&i(e),e}},14012(e,t,n){"use strict";n.d(t,{J:()=>a});var r=n(70655),i=n(53712);function a(e,t){return(0,i.o)(e,t,t.variables&&{variables:(0,r.pi)((0,r.pi)({},e&&e.variables),t.variables)})}},13154(e,t,n){"use strict";function r(e){return null!==e&&"object"==typeof e}n.d(t,{s:()=>r})},83952(e,t,n){"use strict";n.d(t,{ej:()=>u,kG:()=>c,wY:()=>h});var r,i=n(70655),a="Invariant Violation",o=Object.setPrototypeOf,s=void 0===o?function(e,t){return e.__proto__=t,e}:o,u=function(e){function t(n){void 0===n&&(n=a);var r=e.call(this,"number"==typeof n?a+": "+n+" (see https://github.com/apollographql/invariant-packages)":n)||this;return r.framesToPop=1,r.name=a,s(r,t.prototype),r}return(0,i.ZT)(t,e),t}(Error);function c(e,t){if(!e)throw new u(t)}var l=["debug","log","warn","error","silent"],f=l.indexOf("log");function d(e){return function(){if(l.indexOf(e)>=f)return(console[e]||console.log).apply(console,arguments)}}function h(e){try{return e()}catch(t){}}(r=c||(c={})).debug=d("debug"),r.log=d("log"),r.warn=d("warn"),r.error=d("error");let p=h(function(){return globalThis})||h(function(){return window})||h(function(){return self})||h(function(){return global})||h(function(){return h.constructor("return this")()});var b="__",m=[b,b].join("DEV");function g(){try{return Boolean(__DEV__)}catch(e){return Object.defineProperty(p,m,{value:"production"!==h(function(){return"production"}),enumerable:!1,configurable:!0,writable:!0}),p[m]}}let v=g();function y(e){try{return e()}catch(t){}}var w=y(function(){return globalThis})||y(function(){return window})||y(function(){return self})||y(function(){return global})||y(function(){return y.constructor("return this")()}),_=!1;function E(){!w||y(function(){return"production"})||y(function(){return process})||(Object.defineProperty(w,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),_=!0)}function S(){_&&(delete w.process,_=!1)}E();var k=n(10143);function x(){return k.H,S()}function T(){__DEV__?c("boolean"==typeof v,v):c("boolean"==typeof v,39)}x(),T()},4942(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{Z:()=>r})},87462(e,t,n){"use strict";function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,{Z:()=>r})},51721(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,{Z:()=>i})},63366(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}n.d(t,{Z:()=>r})},25821(e,t,n){"use strict";n.d(t,{Z:()=>s});var r=n(45695);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a=10,o=2;function s(e){return u(e,[])}function u(e,t){switch(i(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":if(null===e)return"null";return c(e,t);default:return String(e)}}function c(e,t){if(-1!==t.indexOf(e))return"[Circular]";var n=[].concat(t,[e]),r=d(e);if(void 0!==r){var i=r.call(e);if(i!==e)return"string"==typeof i?i:u(i,n)}else if(Array.isArray(e))return f(e,n);return l(e,n)}function l(e,t){var n=Object.keys(e);return 0===n.length?"{}":t.length>o?"["+h(e)+"]":"{ "+n.map(function(n){var r=u(e[n],t);return n+": "+r}).join(", ")+" }"}function f(e,t){if(0===e.length)return"[]";if(t.length>o)return"[Array]";for(var n=Math.min(a,e.length),r=e.length-n,i=[],s=0;s<n;++s)i.push(u(e[s],t));return 1===r?i.push("... 1 more item"):r>1&&i.push("... ".concat(r," more items")),"["+i.join(", ")+"]"}function d(e){var t=e[String(r.Z)];return"function"==typeof t?t:"function"==typeof e.inspect?e.inspect:void 0}function h(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return t}},45695(e,t,n){"use strict";n.d(t,{Z:()=>i});var r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;let i=r},25217(e,t,n){"use strict";function r(e,t){if(!Boolean(e))throw Error(null!=t?t:"Unexpected invariant triggered.")}n.d(t,{Ye:()=>o,WU:()=>s,UG:()=>u});var i=n(45695);function a(e){var t=e.prototype.toJSON;"function"==typeof t||r(0),e.prototype.inspect=t,i.Z&&(e.prototype[i.Z]=t)}var o=function(){function e(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();a(o);var s=function(){function e(e,t,n,r,i,a,o){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=o,this.prev=a,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();function u(e){return null!=e&&"string"==typeof e.kind}a(s)},87392(e,t,n){"use strict";function r(e){var t=e.split(/\r\n|[\n\r]/g),n=a(e);if(0!==n)for(var r=1;r<t.length;r++)t[r]=t[r].slice(n);for(var o=0;o<t.length&&i(t[o]);)++o;for(var s=t.length;s>o&&i(t[s-1]);)--s;return t.slice(o,s).join("\n")}function i(e){for(var t=0;t<e.length;++t)if(" "!==e[t]&&" "!==e[t])return!1;return!0}function a(e){for(var t,n=!0,r=!0,i=0,a=null,o=0;o<e.length;++o)switch(e.charCodeAt(o)){case 13:10===e.charCodeAt(o+1)&&++o;case 10:n=!1,r=!0,i=0;break;case 9:case 32:++i;break;default:r&&!n&&(null===a||i<a)&&(a=i),r=!1}return null!==(t=a)&&void 0!==t?t:0}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===e.indexOf("\n"),i=" "===e[0]||" "===e[0],a='"'===e[e.length-1],o="\\"===e[e.length-1],s=!r||a||o||n,u="";return s&&!(r&&i)&&(u+="\n"+t),u+=t?e.replace(/\n/g,"\n"+t):e,s&&(u+="\n"),'"""'+u.replace(/"""/g,'\\"""')+'"""'}n.d(t,{LZ:()=>o,W7:()=>r})},97359(e,t,n){"use strict";n.d(t,{h:()=>r});var r=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"})},10143(e,t,n){"use strict";n.d(t,{H:()=>c,T:()=>l});var r=n(99763),i=n(25821);function a(e,t){if(!Boolean(e))throw Error(t)}let o=function(e,t){return e instanceof t};function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),e}var c=function(){function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof e||a(0,"Body must be a string. Received: ".concat((0,i.Z)(e),".")),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||a(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||a(0,"column in locationOffset is 1-indexed and must be positive.")}return u(e,[{key:r.YF,get:function(){return"Source"}}]),e}();function l(e){return o(e,c)}},99763(e,t,n){"use strict";n.d(t,{YF:()=>r});var r="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag"},37452(e){"use strict";e.exports=JSON.parse('{"AElig":"\xc6","AMP":"&","Aacute":"\xc1","Acirc":"\xc2","Agrave":"\xc0","Aring":"\xc5","Atilde":"\xc3","Auml":"\xc4","COPY":"\xa9","Ccedil":"\xc7","ETH":"\xd0","Eacute":"\xc9","Ecirc":"\xca","Egrave":"\xc8","Euml":"\xcb","GT":">","Iacute":"\xcd","Icirc":"\xce","Igrave":"\xcc","Iuml":"\xcf","LT":"<","Ntilde":"\xd1","Oacute":"\xd3","Ocirc":"\xd4","Ograve":"\xd2","Oslash":"\xd8","Otilde":"\xd5","Ouml":"\xd6","QUOT":"\\"","REG":"\xae","THORN":"\xde","Uacute":"\xda","Ucirc":"\xdb","Ugrave":"\xd9","Uuml":"\xdc","Yacute":"\xdd","aacute":"\xe1","acirc":"\xe2","acute":"\xb4","aelig":"\xe6","agrave":"\xe0","amp":"&","aring":"\xe5","atilde":"\xe3","auml":"\xe4","brvbar":"\xa6","ccedil":"\xe7","cedil":"\xb8","cent":"\xa2","copy":"\xa9","curren":"\xa4","deg":"\xb0","divide":"\xf7","eacute":"\xe9","ecirc":"\xea","egrave":"\xe8","eth":"\xf0","euml":"\xeb","frac12":"\xbd","frac14":"\xbc","frac34":"\xbe","gt":">","iacute":"\xed","icirc":"\xee","iexcl":"\xa1","igrave":"\xec","iquest":"\xbf","iuml":"\xef","laquo":"\xab","lt":"<","macr":"\xaf","micro":"\xb5","middot":"\xb7","nbsp":"\xa0","not":"\xac","ntilde":"\xf1","oacute":"\xf3","ocirc":"\xf4","ograve":"\xf2","ordf":"\xaa","ordm":"\xba","oslash":"\xf8","otilde":"\xf5","ouml":"\xf6","para":"\xb6","plusmn":"\xb1","pound":"\xa3","quot":"\\"","raquo":"\xbb","reg":"\xae","sect":"\xa7","shy":"\xad","sup1":"\xb9","sup2":"\xb2","sup3":"\xb3","szlig":"\xdf","thorn":"\xfe","times":"\xd7","uacute":"\xfa","ucirc":"\xfb","ugrave":"\xf9","uml":"\xa8","uuml":"\xfc","yacute":"\xfd","yen":"\xa5","yuml":"\xff"}')},93580(e){"use strict";e.exports=JSON.parse('{"0":"�","128":"€","130":"‚","131":"ƒ","132":"„","133":"…","134":"†","135":"‡","136":"ˆ","137":"‰","138":"Š","139":"‹","140":"Œ","142":"Ž","145":"‘","146":"’","147":"“","148":"”","149":"•","150":"–","151":"—","152":"˜","153":"™","154":"š","155":"›","156":"œ","158":"ž","159":"Ÿ"}')},67946(e){"use strict";e.exports=JSON.parse('{"locale":"en","long":{"year":{"previous":"last year","current":"this year","next":"next year","past":{"one":"{0} year ago","other":"{0} years ago"},"future":{"one":"in {0} year","other":"in {0} years"}},"quarter":{"previous":"last quarter","current":"this quarter","next":"next quarter","past":{"one":"{0} quarter ago","other":"{0} quarters ago"},"future":{"one":"in {0} quarter","other":"in {0} quarters"}},"month":{"previous":"last month","current":"this month","next":"next month","past":{"one":"{0} month ago","other":"{0} months ago"},"future":{"one":"in {0} month","other":"in {0} months"}},"week":{"previous":"last week","current":"this week","next":"next week","past":{"one":"{0} week ago","other":"{0} weeks ago"},"future":{"one":"in {0} week","other":"in {0} weeks"}},"day":{"previous":"yesterday","current":"today","next":"tomorrow","past":{"one":"{0} day ago","other":"{0} days ago"},"future":{"one":"in {0} day","other":"in {0} days"}},"hour":{"current":"this hour","past":{"one":"{0} hour ago","other":"{0} hours ago"},"future":{"one":"in {0} hour","other":"in {0} hours"}},"minute":{"current":"this minute","past":{"one":"{0} minute ago","other":"{0} minutes ago"},"future":{"one":"in {0} minute","other":"in {0} minutes"}},"second":{"current":"now","past":{"one":"{0} second ago","other":"{0} seconds ago"},"future":{"one":"in {0} second","other":"in {0} seconds"}}},"short":{"year":{"previous":"last yr.","current":"this yr.","next":"next yr.","past":"{0} yr. ago","future":"in {0} yr."},"quarter":{"previous":"last qtr.","current":"this qtr.","next":"next qtr.","past":{"one":"{0} qtr. ago","other":"{0} qtrs. ago"},"future":{"one":"in {0} qtr.","other":"in {0} qtrs."}},"month":{"previous":"last mo.","current":"this mo.","next":"next mo.","past":"{0} mo. ago","future":"in {0} mo."},"week":{"previous":"last wk.","current":"this wk.","next":"next wk.","past":"{0} wk. ago","future":"in {0} wk."},"day":{"previous":"yesterday","current":"today","next":"tomorrow","past":{"one":"{0} day ago","other":"{0} days ago"},"future":{"one":"in {0} day","other":"in {0} days"}},"hour":{"current":"this hour","past":"{0} hr. ago","future":"in {0} hr."},"minute":{"current":"this minute","past":"{0} min. ago","future":"in {0} min."},"second":{"current":"now","past":"{0} sec. ago","future":"in {0} sec."}},"narrow":{"year":{"previous":"last yr.","current":"this yr.","next":"next yr.","past":"{0} yr. ago","future":"in {0} yr."},"quarter":{"previous":"last qtr.","current":"this qtr.","next":"next qtr.","past":{"one":"{0} qtr. ago","other":"{0} qtrs. ago"},"future":{"one":"in {0} qtr.","other":"in {0} qtrs."}},"month":{"previous":"last mo.","current":"this mo.","next":"next mo.","past":"{0} mo. ago","future":"in {0} mo."},"week":{"previous":"last wk.","current":"this wk.","next":"next wk.","past":"{0} wk. ago","future":"in {0} wk."},"day":{"previous":"yesterday","current":"today","next":"tomorrow","past":{"one":"{0} day ago","other":"{0} days ago"},"future":{"one":"in {0} day","other":"in {0} days"}},"hour":{"current":"this hour","past":"{0} hr. ago","future":"in {0} hr."},"minute":{"current":"this minute","past":"{0} min. ago","future":"in {0} min."},"second":{"current":"now","past":"{0} sec. ago","future":"in {0} sec."}},"now":{"now":{"current":"now","future":"in a moment","past":"just now"}},"mini":{"year":"{0}yr","month":"{0}mo","week":"{0}wk","day":"{0}d","hour":"{0}h","minute":"{0}m","second":"{0}s","now":"now"},"short-time":{"year":"{0} yr.","month":"{0} mo.","week":"{0} wk.","day":{"one":"{0} day","other":"{0} days"},"hour":"{0} hr.","minute":"{0} min.","second":"{0} sec."},"long-time":{"year":{"one":"{0} year","other":"{0} years"},"month":{"one":"{0} month","other":"{0} months"},"week":{"one":"{0} week","other":"{0} weeks"},"day":{"one":"{0} day","other":"{0} days"},"hour":{"one":"{0} hour","other":"{0} hours"},"minute":{"one":"{0} minute","other":"{0} minutes"},"second":{"one":"{0} second","other":"{0} seconds"}}}')}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(n.exports,n,n.exports,__webpack_require__),n.loaded=!0,n.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;__webpack_require__.t=function(n,r){if(1&r&&(n=this(n)),8&r||"object"==typeof n&&n&&(4&r&&n.__esModule||16&r&&"function"==typeof n.then))return n;var i=Object.create(null);__webpack_require__.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var o=2&r&&n;"object"==typeof o&&!~e.indexOf(o);o=t(o))Object.getOwnPropertyNames(o).forEach(e=>a[e]=()=>n[e]);return a.default=()=>n,__webpack_require__.d(i,a),i}})(),__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set(){throw Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),__webpack_require__.p="/assets/",__webpack_require__.nc=void 0;var __webpack_exports__={};(()=>{"use strict";var e,t,n,r,i=__webpack_require__(32316),a=__webpack_require__(8126),o=__webpack_require__(5690),s=__webpack_require__(30381),u=__webpack_require__.n(s),c=__webpack_require__(67294),l=__webpack_require__(73935),f=__webpack_require__.n(l),d=__webpack_require__(57209),h=__webpack_require__(37703),p=__webpack_require__(97779),b=__webpack_require__(28500);function m(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(i){return"function"==typeof i?i(n,r,e):t(i)}}}}var g=m();g.withExtraArgument=m;let v=g;var y=__webpack_require__(76489);function w(e){return function(t){return function(n){return function(r){n(r);var i=e||document&&document.cookie||"",a=t.getState();if("MATCH_ROUTE"===r.type&&"/signin"!==a.notifications.currentUrl){var o=(0,y.Q)(i);if(o.explorer)try{var s=JSON.parse(o.explorer);if("error"===s.status){var u=_(s.url);n({type:"NOTIFY_ERROR_MSG",msg:u})}}catch(c){n({type:"NOTIFY_ERROR_MSG",msg:"Invalid explorer status"})}}}}}}function _(e){var t="Can't connect to explorer: ".concat(e);return e.match(/^wss?:.+/)?t:"".concat(t,". You must use a websocket.")}var E=__webpack_require__(16353);function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function k(e){if(Array.isArray(e))return S(e)}function x(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function T(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function M(e){return k(e)||x(e)||O(e)||T()}function O(e,t){if(e){if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S(e,t)}}var A=[v,w(),],L=(0,b.Uo)({});function C(e,t){return(0,p.MT)(e,L(p.md.apply(void 0,M(M(t)))))}var I=function(){return C(E.ZP,A)};let D=I;var N=__webpack_require__(93379),P=__webpack_require__.n(N),R=__webpack_require__(51424),j=__webpack_require__.n(R),F={};F.insert="head",F.singleton=!1;var Y=P()(j(),F);j().locals;var B=__webpack_require__(73727),U=__webpack_require__(5977),H=__webpack_require__(63099),$=__webpack_require__(86527),z=__webpack_require__(9409),G=function(){var e=(0,E.rH)(function(e){return e.redirect.to});return c.createElement(B.VK,null,c.createElement(H.Z,null),c.createElement(U.rs,null,c.createElement(U.AW,{exact:!0,path:"/signin"},c.createElement(z.ZP,null)),e&&c.createElement(U.l_,{to:e}),c.createElement(U.AW,{component:$.Z})))};let W=G;var K=__webpack_require__(9541),V="/signin",q=D();q.subscribe(function(){var e=q.getState().notifications.currentUrl;e&&e!==V&&(0,K.iR)(e)});var Z=function(){return c.createElement(h.zt,{store:q},c.createElement(W,null))};let X=Z;var J=__webpack_require__(73343),Q=__webpack_require__(83952),ee=__webpack_require__(85317),et=function(e){var t=e.client,n=e.children,r=(0,ee.K)();return c.createElement(r.Consumer,null,function(e){return void 0===e&&(e={}),t&&e.client!==t&&(e=Object.assign({},e,{client:t})),__DEV__?(0,Q.kG)(e.client,'ApolloProvider was not passed a client instance. Make sure you pass in your client via the "client" prop.'):(0,Q.kG)(e.client,29),c.createElement(r.Provider,{value:e},n)})},en=__webpack_require__(70655);function er(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=ei(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ei(e,t){if(e){if("string"==typeof e)return ea(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ea(e,t)}}function ea(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function eo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function es(e,t,n){return t&&eo(e.prototype,t),n&&eo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var eu=function(){return"function"==typeof Symbol},ec=function(e){return eu()&&Boolean(Symbol[e])},el=function(e){return ec(e)?Symbol[e]:"@@"+e};eu()&&!ec("observable")&&(Symbol.observable=Symbol("observable"));var ef=el("iterator"),ed=el("observable"),eh=el("species");function ep(e,t){var n=e[t];if(null!=n){if("function"!=typeof n)throw TypeError(n+" is not a function");return n}}function eb(e){var t=e.constructor;return void 0!==t&&null===(t=t[eh])&&(t=void 0),void 0!==t?t:eT}function em(e){return e instanceof eT}function eg(e){eg.log?eg.log(e):setTimeout(function(){throw e})}function ev(e){Promise.resolve().then(function(){try{e()}catch(t){eg(t)}})}function ey(e){var t=e._cleanup;if(void 0!==t){if(e._cleanup=void 0,!t)return;try{if("function"==typeof t)t();else{var n=ep(t,"unsubscribe");n&&n.call(t)}}catch(r){eg(r)}}}function ew(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function e_(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var n=0;n<t.length&&(eE(e,t[n].type,t[n].value),"closed"!==e._state);++n);}}function eE(e,t,n){e._state="running";var r=e._observer;try{var i=ep(r,t);switch(t){case"next":i&&i.call(r,n);break;case"error":if(ew(e),i)i.call(r,n);else throw n;break;case"complete":ew(e),i&&i.call(r)}}catch(a){eg(a)}"closed"===e._state?ey(e):"running"===e._state&&(e._state="ready")}function eS(e,t,n){if("closed"!==e._state){if("buffering"===e._state){e._queue.push({type:t,value:n});return}if("ready"!==e._state){e._state="buffering",e._queue=[{type:t,value:n}],ev(function(){return e_(e)});return}eE(e,t,n)}}var ek=function(){function e(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";var n=new ex(this);try{this._cleanup=t.call(void 0,n)}catch(r){n.error(r)}"initializing"===this._state&&(this._state="ready")}return e.prototype.unsubscribe=function(){"closed"!==this._state&&(ew(this),ey(this))},es(e,[{key:"closed",get:function(){return"closed"===this._state}}]),e}(),ex=function(){function e(e){this._subscription=e}var t=e.prototype;return t.next=function(e){eS(this._subscription,"next",e)},t.error=function(e){eS(this._subscription,"error",e)},t.complete=function(){eS(this._subscription,"complete")},es(e,[{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),eT=function(){function e(t){if(!(this instanceof e))throw TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw TypeError("Observable initializer must be a function");this._subscriber=t}var t=e.prototype;return t.subscribe=function(e){return("object"!=typeof e||null===e)&&(e={next:e,error:arguments[1],complete:arguments[2]}),new ek(e,this._subscriber)},t.forEach=function(e){var t=this;return new Promise(function(n,r){if("function"!=typeof e){r(TypeError(e+" is not a function"));return}function i(){a.unsubscribe(),n()}var a=t.subscribe({next:function(t){try{e(t,i)}catch(n){r(n),a.unsubscribe()}},error:r,complete:n})})},t.map=function(e){var t=this;if("function"!=typeof e)throw TypeError(e+" is not a function");return new(eb(this))(function(n){return t.subscribe({next:function(t){try{t=e(t)}catch(r){return n.error(r)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})})},t.filter=function(e){var t=this;if("function"!=typeof e)throw TypeError(e+" is not a function");return new(eb(this))(function(n){return t.subscribe({next:function(t){try{if(!e(t))return}catch(r){return n.error(r)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})})},t.reduce=function(e){var t=this;if("function"!=typeof e)throw TypeError(e+" is not a function");var n=eb(this),r=arguments.length>1,i=!1,a=arguments[1],o=a;return new n(function(n){return t.subscribe({next:function(t){var a=!i;if(i=!0,!a||r)try{o=e(o,t)}catch(s){return n.error(s)}else o=t},error:function(e){n.error(e)},complete:function(){if(!i&&!r)return n.error(TypeError("Cannot reduce an empty sequence"));n.next(o),n.complete()}})})},t.concat=function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=eb(this);return new i(function(t){var r,a=0;function o(e){r=e.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){a===n.length?(r=void 0,t.complete()):o(i.from(n[a++]))}})}return o(e),function(){r&&(r.unsubscribe(),r=void 0)}})},t.flatMap=function(e){var t=this;if("function"!=typeof e)throw TypeError(e+" is not a function");var n=eb(this);return new n(function(r){var i=[],a=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(a){return r.error(a)}var s=n.from(t).subscribe({next:function(e){r.next(e)},error:function(e){r.error(e)},complete:function(){var e=i.indexOf(s);e>=0&&i.splice(e,1),o()}});i.push(s)},error:function(e){r.error(e)},complete:function(){o()}});function o(){a.closed&&0===i.length&&r.complete()}return function(){i.forEach(function(e){return e.unsubscribe()}),a.unsubscribe()}})},t[ed]=function(){return this},e.from=function(t){var n="function"==typeof this?this:e;if(null==t)throw TypeError(t+" is not an object");var r=ep(t,ed);if(r){var i=r.call(t);if(Object(i)!==i)throw TypeError(i+" is not an object");return em(i)&&i.constructor===n?i:new n(function(e){return i.subscribe(e)})}if(ec("iterator")&&(r=ep(t,ef)))return new n(function(e){ev(function(){if(!e.closed){for(var n,i=er(r.call(t));!(n=i()).done;){var a=n.value;if(e.next(a),e.closed)return}e.complete()}})});if(Array.isArray(t))return new n(function(e){ev(function(){if(!e.closed){for(var n=0;n<t.length;++n)if(e.next(t[n]),e.closed)return;e.complete()}})});throw TypeError(t+" is not observable")},e.of=function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return new("function"==typeof this?this:e)(function(e){ev(function(){if(!e.closed){for(var t=0;t<n.length;++t)if(e.next(n[t]),e.closed)return;e.complete()}})})},es(e,null,[{key:eh,get:function(){return this}}]),e}();function eM(e,t){var n=(0,en.pi)({},e),r=function(){return(0,en.pi)({},n)};return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){n="function"==typeof e?(0,en.pi)((0,en.pi)({},n),e(n)):(0,en.pi)((0,en.pi)({},n),e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:r}),t}eu()&&Object.defineProperty(eT,Symbol("extensions"),{value:{symbol:ed,hostReportError:eg},configurable:!0});var eO=__webpack_require__(13154);function eA(e,t){var n=t,r=[];return e.definitions.forEach(function(e){if("OperationDefinition"===e.kind)throw __DEV__?new Q.ej("Found a ".concat(e.operation," operation").concat(e.name?" named '".concat(e.name.value,"'"):"",". ")+"No operations are allowed when using a fragment as a query. Only fragments are allowed."):new Q.ej(44);"FragmentDefinition"===e.kind&&r.push(e)}),void 0===n&&(__DEV__?(0,Q.kG)(1===r.length,"Found ".concat(r.length," fragments. `fragmentName` must be provided when there is not exactly 1 fragment.")):(0,Q.kG)(1===r.length,45),n=r[0].name.value),(0,en.pi)((0,en.pi)({},e),{definitions:(0,en.ev)([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:n}},]}}],e.definitions,!0)})}function eL(e){void 0===e&&(e=[]);var t={};return e.forEach(function(e){t[e.name.value]=e}),t}function eC(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":var n=e.name.value;if("function"==typeof t)return t(n);var r=t&&t[n];return __DEV__?(0,Q.kG)(r,"No fragment named ".concat(n)):(0,Q.kG)(r,46),r||null;default:return null}}function eI(e){return{__ref:String(e)}}function eD(e){return Boolean(e&&"object"==typeof e&&"string"==typeof e.__ref)}function eN(e){return(0,eO.s)(e)&&"Document"===e.kind&&Array.isArray(e.definitions)}function eP(e){return"StringValue"===e.kind}function eR(e){return"BooleanValue"===e.kind}function ej(e){return"IntValue"===e.kind}function eF(e){return"FloatValue"===e.kind}function eY(e){return"Variable"===e.kind}function eB(e){return"ObjectValue"===e.kind}function eU(e){return"ListValue"===e.kind}function eH(e){return"EnumValue"===e.kind}function e$(e){return"NullValue"===e.kind}function ez(e,t,n,r){if(ej(n)||eF(n))e[t.value]=Number(n.value);else if(eR(n)||eP(n))e[t.value]=n.value;else if(eB(n)){var i={};n.fields.map(function(e){return ez(i,e.name,e.value,r)}),e[t.value]=i}else if(eY(n)){var a=(r||{})[n.name.value];e[t.value]=a}else if(eU(n))e[t.value]=n.values.map(function(e){var n={};return ez(n,t,e,r),n[t.value]});else if(eH(n))e[t.value]=n.value;else if(e$(n))e[t.value]=null;else throw __DEV__?new Q.ej('The inline argument "'.concat(t.value,'" of kind "').concat(n.kind,'"')+"is not supported. Use variables instead of inline arguments to overcome this limitation."):new Q.ej(55)}function eG(e,t){var n=null;e.directives&&(n={},e.directives.forEach(function(e){n[e.name.value]={},e.arguments&&e.arguments.forEach(function(r){var i=r.name,a=r.value;return ez(n[e.name.value],i,a,t)})}));var r=null;return e.arguments&&e.arguments.length&&(r={},e.arguments.forEach(function(e){var n;return ez(r,e.name,e.value,t)})),eK(e.name.value,r,n)}var eW=["connection","include","skip","client","rest","export",],eK=Object.assign(function(e,t,n){if(t&&n&&n.connection&&n.connection.key){if(!n.connection.filter||!(n.connection.filter.length>0))return n.connection.key;var r=n.connection.filter?n.connection.filter:[];r.sort();var i={};return r.forEach(function(e){i[e]=t[e]}),"".concat(n.connection.key,"(").concat(eV(i),")")}var a=e;if(t){var o=eV(t);a+="(".concat(o,")")}return n&&Object.keys(n).forEach(function(e){-1===eW.indexOf(e)&&(n[e]&&Object.keys(n[e]).length?a+="@".concat(e,"(").concat(eV(n[e]),")"):a+="@".concat(e))}),a},{setStringify:function(e){var t=eV;return eV=e,t}}),eV=function(e){return JSON.stringify(e,eq)};function eq(e,t){return(0,eO.s)(t)&&!Array.isArray(t)&&(t=Object.keys(t).sort().reduce(function(e,n){return e[n]=t[n],e},{})),t}function eZ(e,t){if(e.arguments&&e.arguments.length){var n={};return e.arguments.forEach(function(e){var r;return ez(n,e.name,e.value,t)}),n}return null}function eX(e){return e.alias?e.alias.value:e.name.value}function eJ(e,t,n){for(var r,i=0,a=t.selections;i<a.length;i++){var o=a[i];if(eQ(o)){if("__typename"===o.name.value)return e[eX(o)]}else r?r.push(o):r=[o]}if("string"==typeof e.__typename)return e.__typename;if(r)for(var s=0,u=r;s<u.length;s++){var o=u[s],c=eJ(e,eC(o,n).selectionSet,n);if("string"==typeof c)return c}}function eQ(e){return"Field"===e.kind}function e1(e){return"InlineFragment"===e.kind}function e0(e){__DEV__?(0,Q.kG)(e&&"Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):(0,Q.kG)(e&&"Document"===e.kind,47);var t=e.definitions.filter(function(e){return"FragmentDefinition"!==e.kind}).map(function(e){if("OperationDefinition"!==e.kind)throw __DEV__?new Q.ej('Schema type definitions not allowed in queries. Found: "'.concat(e.kind,'"')):new Q.ej(48);return e});return __DEV__?(0,Q.kG)(t.length<=1,"Ambiguous GraphQL document: contains ".concat(t.length," operations")):(0,Q.kG)(t.length<=1,49),e}function e2(e){return e0(e),e.definitions.filter(function(e){return"OperationDefinition"===e.kind})[0]}function e3(e){return e.definitions.filter(function(e){return"OperationDefinition"===e.kind&&!!e.name}).map(function(e){return e.name.value})[0]||null}function e4(e){return e.definitions.filter(function(e){return"FragmentDefinition"===e.kind})}function e6(e){var t=e2(e);return __DEV__?(0,Q.kG)(t&&"query"===t.operation,"Must contain a query definition."):(0,Q.kG)(t&&"query"===t.operation,50),t}function e5(e){__DEV__?(0,Q.kG)("Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):(0,Q.kG)("Document"===e.kind,51),__DEV__?(0,Q.kG)(e.definitions.length<=1,"Fragment must have exactly one definition."):(0,Q.kG)(e.definitions.length<=1,52);var t=e.definitions[0];return __DEV__?(0,Q.kG)("FragmentDefinition"===t.kind,"Must be a fragment definition."):(0,Q.kG)("FragmentDefinition"===t.kind,53),t}function e8(e){e0(e);for(var t,n=0,r=e.definitions;n<r.length;n++){var i=r[n];if("OperationDefinition"===i.kind){var a=i.operation;if("query"===a||"mutation"===a||"subscription"===a)return i}"FragmentDefinition"!==i.kind||t||(t=i)}if(t)return t;throw __DEV__?new Q.ej("Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment."):new Q.ej(54)}function e9(e){var t=Object.create(null),n=e&&e.variableDefinitions;return n&&n.length&&n.forEach(function(e){e.defaultValue&&ez(t,e.variable.name,e.defaultValue)}),t}function e7(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!=typeof t.query?e3(t.query)||void 0:""),t}function te(e){for(var t=["query","operationName","variables","extensions","context",],n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(0>t.indexOf(i))throw __DEV__?new Q.ej("illegal argument: ".concat(i)):new Q.ej(27)}return e}function tt(e,t){return t?t(e):eT.of()}function tn(e){return"function"==typeof e?new ta(e):e}function tr(e){return e.request.length<=1}var ti=function(e){function t(t,n){var r=e.call(this,t)||this;return r.link=n,r}return(0,en.ZT)(t,e),t}(Error),ta=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e(function(){return eT.of()})},e.from=function(t){return 0===t.length?e.empty():t.map(tn).reduce(function(e,t){return e.concat(t)})},e.split=function(t,n,r){var i=tn(n),a=tn(r||new e(tt));return new e(tr(i)&&tr(a)?function(e){return t(e)?i.request(e)||eT.of():a.request(e)||eT.of()}:function(e,n){return t(e)?i.request(e,n)||eT.of():a.request(e,n)||eT.of()})},e.execute=function(e,t){return e.request(eM(t.context,e7(te(t))))||eT.of()},e.concat=function(t,n){var r=tn(t);if(tr(r))return __DEV__&&Q.kG.warn(new ti("You are calling concat on a terminating link, which will have no effect",r)),r;var i=tn(n);return new e(tr(i)?function(e){return r.request(e,function(e){return i.request(e)||eT.of()})||eT.of()}:function(e,t){return r.request(e,function(e){return i.request(e,t)||eT.of()})||eT.of()})},e.prototype.split=function(t,n,r){return this.concat(e.split(t,n,r||new e(tt)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw __DEV__?new Q.ej("request is not implemented"):new Q.ej(22)},e.prototype.onError=function(e,t){if(t&&t.error)return t.error(e),!1;throw e},e.prototype.setOnError=function(e){return this.onError=e,this},e}(),to=__webpack_require__(25821),ts=__webpack_require__(25217),tu={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},tc=Object.freeze({});function tl(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:tu,r=void 0,i=Array.isArray(e),a=[e],o=-1,s=[],u=void 0,c=void 0,l=void 0,f=[],d=[],h=e;do{var p,b=++o===a.length,m=b&&0!==s.length;if(b){if(c=0===d.length?void 0:f[f.length-1],u=l,l=d.pop(),m){if(i)u=u.slice();else{for(var g={},v=0,y=Object.keys(u);v<y.length;v++){var w=y[v];g[w]=u[w]}u=g}for(var _=0,E=0;E<s.length;E++){var S=s[E][0],k=s[E][1];i&&(S-=_),i&&null===k?(u.splice(S,1),_++):u[S]=k}}o=r.index,a=r.keys,s=r.edits,i=r.inArray,r=r.prev}else{if(c=l?i?o:a[o]:void 0,null===(u=l?l[c]:h)||void 0===u)continue;l&&f.push(c)}var x=void 0;if(!Array.isArray(u)){if(!(0,ts.UG)(u))throw Error("Invalid AST Node: ".concat((0,to.Z)(u),"."));var T=tf(t,u.kind,b);if(T){if((x=T.call(t,u,c,l,f,d))===tc)break;if(!1===x){if(!b){f.pop();continue}}else if(void 0!==x&&(s.push([c,x]),!b)){if((0,ts.UG)(x))u=x;else{f.pop();continue}}}}void 0===x&&m&&s.push([c,u]),b?f.pop():(r={inArray:i,index:o,keys:a,edits:s,prev:r},a=(i=Array.isArray(u))?u:null!==(p=n[u.kind])&&void 0!==p?p:[],o=-1,s=[],l&&d.push(l),l=u)}while(void 0!==r)return 0!==s.length&&(h=s[s.length-1][1]),h}function tf(e,t,n){var r=e[t];if(r){if(!n&&"function"==typeof r)return r;var i=n?r.leave:r.enter;if("function"==typeof i)return i}else{var a=n?e.leave:e.enter;if(a){if("function"==typeof a)return a;var o=a[t];if("function"==typeof o)return o}}}function td(e,t){var n=e.directives;return!n||!n.length||tv(n).every(function(e){var n=e.directive,r=e.ifArgument,i=!1;return"Variable"===r.value.kind?(i=t&&t[r.value.name.value],__DEV__?(0,Q.kG)(void 0!==i,"Invalid variable referenced in @".concat(n.name.value," directive.")):(0,Q.kG)(void 0!==i,40)):i=r.value.value,"skip"===n.name.value?!i:i})}var th=function(e,t){return tb(e,t,!1)},tp=function(e,t){return tb(e,t,!0)};function tb(e,t,n){var r=new Set(e),i=r.size;return tl(t,{Directive:function(e){if(r.delete(e.name.value)&&(!n||!r.size))return tc}}),n?!r.size:r.size<i}function tm(e){return e&&tb(["client","export"],e,!0)}function tg(e){var t=e.name.value;return"skip"===t||"include"===t}function tv(e){var t=[];return e&&e.length&&e.forEach(function(e){if(tg(e)){var n=e.arguments,r=e.name.value;__DEV__?(0,Q.kG)(n&&1===n.length,"Incorrect number of arguments for the @".concat(r," directive.")):(0,Q.kG)(n&&1===n.length,41);var i=n[0];__DEV__?(0,Q.kG)(i.name&&"if"===i.name.value,"Invalid argument for the @".concat(r," directive.")):(0,Q.kG)(i.name&&"if"===i.name.value,42);var a=i.value;__DEV__?(0,Q.kG)(a&&("Variable"===a.kind||"BooleanValue"===a.kind),"Argument for the @".concat(r," directive must be a variable or a boolean value.")):(0,Q.kG)(a&&("Variable"===a.kind||"BooleanValue"===a.kind),43),t.push({directive:e,ifArgument:i})}}),t}var ty=function(e,t){var n;try{n=JSON.stringify(e)}catch(r){var i=__DEV__?new Q.ej("Network request failed. ".concat(t," is not serializable: ").concat(r.message)):new Q.ej(24);throw i.parseError=r,i}return n},tw=function(e,t){var n=e.getContext().uri;return n||("function"==typeof t?t(e):t||"/graphql")},t_=__webpack_require__(30320);function tE(e){return!!e.body}function tS(e){return!!e.getReader}function tk(e){return!!(t_.DN&&e[Symbol.asyncIterator])}function tx(e){return!!e.stream}function tT(e){return!!e.arrayBuffer}function tM(e){return!!e.pipe}function tO(e){var t,n=e[Symbol.asyncIterator]();return(t={next:function(){return n.next()}})[Symbol.asyncIterator]=function(){return this},t}function tA(e){var t=null,n=null,r=!1,i=[],a=[];function o(e){if(!n){if(a.length){var t=a.shift();if(Array.isArray(t)&&t[0])return t[0]({value:e,done:!1})}i.push(e)}}function s(e){n=e,a.slice().forEach(function(t){t[1](e)}),t&&t()}function u(){r=!0,a.slice().forEach(function(e){e[0]({value:void 0,done:!0})}),t&&t()}function c(){return new Promise(function(e,t){return n?t(n):i.length?e({value:i.shift(),done:!1}):r?e({value:void 0,done:!0}):void a.push([e,t])})}t=function(){t=null,e.removeListener("data",o),e.removeListener("error",s),e.removeListener("end",u),e.removeListener("finish",u),e.removeListener("close",u)},e.on("data",o),e.on("error",s),e.on("end",u),e.on("finish",u),e.on("close",u);var l={next:function(){return c()}};return t_.DN&&(l[Symbol.asyncIterator]=function(){return this}),l}function tL(e){var t=!1,n={next:function(){return t?Promise.resolve({value:void 0,done:!0}):(t=!0,new Promise(function(t,n){e.then(function(e){t({value:e,done:!1})}).catch(n)}))}};return t_.DN&&(n[Symbol.asyncIterator]=function(){return this}),n}function tC(e){var t={next:function(){return e.read()}};return t_.DN&&(t[Symbol.asyncIterator]=function(){return this}),t}function tI(e){var t=e;if(tE(e)&&(t=e.body),tk(t))return tO(t);if(tS(t))return tC(t.getReader());if(tx(t))return tC(t.stream().getReader());if(tT(t))return tL(t.arrayBuffer());if(tM(t))return tA(t);throw Error("Unknown body type for responseIterator. Please pass a streamable response.")}var tD=function(e,t,n){var r=Error(n);throw r.name="ServerError",r.response=e,r.statusCode=e.status,r.result=t,r},tN=__webpack_require__(30990),tP=__webpack_require__(21436),tR=Object.prototype.hasOwnProperty;function tj(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return tF(e)}function tF(e){var t=e[0]||{},n=e.length;if(n>1)for(var r=new tB,i=1;i<n;++i)t=r.merge(t,e[i]);return t}var tY=function(e,t,n){return this.merge(e[n],t[n])},tB=function(){function e(e){void 0===e&&(e=tY),this.reconciler=e,this.isObject=eO.s,this.pastCopies=new Set}return e.prototype.merge=function(e,t){for(var n=this,r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return(0,eO.s)(t)&&(0,eO.s)(e)?(Object.keys(t).forEach(function(i){if(tR.call(e,i)){var a=e[i];if(t[i]!==a){var o=n.reconciler.apply(n,(0,en.ev)([e,t,i],r,!1));o!==a&&((e=n.shallowCopyForMerge(e))[i]=o)}}else(e=n.shallowCopyForMerge(e))[i]=t[i]}),e):t},e.prototype.shallowCopyForMerge=function(e){return(0,eO.s)(e)&&!this.pastCopies.has(e)&&(e=Array.isArray(e)?e.slice(0):(0,en.pi)({__proto__:Object.getPrototypeOf(e)},e),this.pastCopies.add(e)),e},e}();function tU(e){return"incremental"in e}function tH(e){return"hasNext"in e&&"data"in e}function t$(e){return tU(e)||tH(e)}function tz(e){return(0,eO.s)(e)&&"payload"in e}function tG(e,t){var n=e,r=new tB;return tU(t)&&(0,tP.O)(t.incremental)&&t.incremental.forEach(function(e){for(var t=e.data,i=e.path,a=i.length-1;a>=0;--a){var o=i[a],s=isNaN(+o)?{}:[];s[o]=t,t=s}n=r.merge(n,t)}),n}var tW=Object.prototype.hasOwnProperty;function tK(e,t){var n,r,i,a,o;return(0,en.mG)(this,void 0,void 0,function(){var s,u,c,l,f,d,h,p,b,m,g,v,y,w,_,E,S,k,x,T,M,O,A;return(0,en.Jh)(this,function(L){switch(L.label){case 0:if(void 0===TextDecoder)throw Error("TextDecoder must be defined in the environment: please import a polyfill.");s=new TextDecoder("utf-8"),u=null===(n=e.headers)||void 0===n?void 0:n.get("content-type"),c="boundary=",l=(null==u?void 0:u.includes(c))?null==u?void 0:u.substring((null==u?void 0:u.indexOf(c))+c.length).replace(/['"]/g,"").replace(/\;(.*)/gm,"").trim():"-",f="\r\n--".concat(l),d="",h=tI(e),p=!0,L.label=1;case 1:if(!p)return[3,3];return[4,h.next()];case 2:for(m=(b=L.sent()).value,g=b.done,v="string"==typeof m?m:s.decode(m),y=d.length-f.length+1,p=!g,d+=v,w=d.indexOf(f,y);w>-1;){if(_=void 0,_=(O=[d.slice(0,w),d.slice(w+f.length),])[0],d=O[1],E=_.indexOf("\r\n\r\n"),(k=(S=tV(_.slice(0,E)))["content-type"])&&-1===k.toLowerCase().indexOf("application/json"))throw Error("Unsupported patch content type: application/json is required.");if(x=_.slice(E))try{T=tq(e,x),Object.keys(T).length>1||"data"in T||"incremental"in T||"errors"in T||"payload"in T?tz(T)?(M={},"payload"in T&&(M=(0,en.pi)({},T.payload)),"errors"in T&&(M=(0,en.pi)((0,en.pi)({},M),{extensions:(0,en.pi)((0,en.pi)({},"extensions"in M?M.extensions:null),((A={})[tN.YG]=T.errors,A))})),null===(r=t.next)||void 0===r||r.call(t,M)):null===(i=t.next)||void 0===i||i.call(t,T):1===Object.keys(T).length&&"hasNext"in T&&!T.hasNext&&(null===(a=t.complete)||void 0===a||a.call(t))}catch(C){tZ(C,t)}w=d.indexOf(f)}return[3,1];case 3:return null===(o=t.complete)||void 0===o||o.call(t),[2]}})})}function tV(e){var t={};return e.split("\n").forEach(function(e){var n=e.indexOf(":");if(n>-1){var r=e.slice(0,n).trim().toLowerCase(),i=e.slice(n+1).trim();t[r]=i}}),t}function tq(e,t){e.status>=300&&tD(e,function(){try{return JSON.parse(t)}catch(e){return t}}(),"Response not successful: Received status code ".concat(e.status));try{return JSON.parse(t)}catch(n){var r=n;throw r.name="ServerParseError",r.response=e,r.statusCode=e.status,r.bodyText=t,r}}function tZ(e,t){var n,r;"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&(null===(n=t.next)||void 0===n||n.call(t,e.result)),null===(r=t.error)||void 0===r||r.call(t,e))}function tX(e,t,n){tJ(t)(e).then(function(e){var t,r;null===(t=n.next)||void 0===t||t.call(n,e),null===(r=n.complete)||void 0===r||r.call(n)}).catch(function(e){return tZ(e,n)})}function tJ(e){return function(t){return t.text().then(function(e){return tq(t,e)}).then(function(n){return t.status>=300&&tD(t,n,"Response not successful: Received status code ".concat(t.status)),Array.isArray(n)||tW.call(n,"data")||tW.call(n,"errors")||tD(t,n,"Server response was missing for query '".concat(Array.isArray(e)?e.map(function(e){return e.operationName}):e.operationName,"'.")),n})}}var tQ=function(e){if(!e&&"undefined"==typeof fetch)throw __DEV__?new Q.ej("\n\"fetch\" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:\n\nimport fetch from 'cross-fetch';\nimport { ApolloClient, HttpLink } from '@apollo/client';\nconst client = new ApolloClient({\n link: new HttpLink({ uri: '/graphql', fetch })\n});\n "):new Q.ej(23)},t1=__webpack_require__(87392);function t0(e){return tl(e,{leave:t3})}var t2=80,t3={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return t6(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,n=e.name,r=t8("(",t6(e.variableDefinitions,", "),")"),i=t6(e.directives," "),a=e.selectionSet;return n||i||r||"query"!==t?t6([t,t6([n,r]),i,a]," "):a},VariableDefinition:function(e){var t=e.variable,n=e.type,r=e.defaultValue,i=e.directives;return t+": "+n+t8(" = ",r)+t8(" ",t6(i," "))},SelectionSet:function(e){return t5(e.selections)},Field:function(e){var t=e.alias,n=e.name,r=e.arguments,i=e.directives,a=e.selectionSet,o=t8("",t,": ")+n,s=o+t8("(",t6(r,", "),")");return s.length>t2&&(s=o+t8("(\n",t9(t6(r,"\n")),"\n)")),t6([s,t6(i," "),a]," ")},Argument:function(e){var t;return e.name+": "+e.value},FragmentSpread:function(e){var t;return"..."+e.name+t8(" ",t6(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,n=e.directives,r=e.selectionSet;return t6(["...",t8("on ",t),t6(n," "),r]," ")},FragmentDefinition:function(e){var t=e.name,n=e.typeCondition,r=e.variableDefinitions,i=e.directives,a=e.selectionSet;return"fragment ".concat(t).concat(t8("(",t6(r,", "),")")," ")+"on ".concat(n," ").concat(t8("",t6(i," ")," "))+a},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?(0,t1.LZ)(n,"description"===t?"":" "):JSON.stringify(n)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+t6(e.values,", ")+"]"},ObjectValue:function(e){return"{"+t6(e.fields,", ")+"}"},ObjectField:function(e){var t;return e.name+": "+e.value},Directive:function(e){var t;return"@"+e.name+t8("(",t6(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:t4(function(e){var t=e.directives,n=e.operationTypes;return t6(["schema",t6(t," "),t5(n)]," ")}),OperationTypeDefinition:function(e){var t;return e.operation+": "+e.type},ScalarTypeDefinition:t4(function(e){var t;return t6(["scalar",e.name,t6(e.directives," ")]," ")}),ObjectTypeDefinition:t4(function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return t6(["type",t,t8("implements ",t6(n," & ")),t6(r," "),t5(i)]," ")}),FieldDefinition:t4(function(e){var t=e.name,n=e.arguments,r=e.type,i=e.directives;return t+(ne(n)?t8("(\n",t9(t6(n,"\n")),"\n)"):t8("(",t6(n,", "),")"))+": "+r+t8(" ",t6(i," "))}),InputValueDefinition:t4(function(e){var t=e.name,n=e.type,r=e.defaultValue,i=e.directives;return t6([t+": "+n,t8("= ",r),t6(i," ")]," ")}),InterfaceTypeDefinition:t4(function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return t6(["interface",t,t8("implements ",t6(n," & ")),t6(r," "),t5(i)]," ")}),UnionTypeDefinition:t4(function(e){var t=e.name,n=e.directives,r=e.types;return t6(["union",t,t6(n," "),r&&0!==r.length?"= "+t6(r," | "):""]," ")}),EnumTypeDefinition:t4(function(e){var t=e.name,n=e.directives,r=e.values;return t6(["enum",t,t6(n," "),t5(r)]," ")}),EnumValueDefinition:t4(function(e){var t;return t6([e.name,t6(e.directives," ")]," ")}),InputObjectTypeDefinition:t4(function(e){var t=e.name,n=e.directives,r=e.fields;return t6(["input",t,t6(n," "),t5(r)]," ")}),DirectiveDefinition:t4(function(e){var t=e.name,n=e.arguments,r=e.repeatable,i=e.locations;return"directive @"+t+(ne(n)?t8("(\n",t9(t6(n,"\n")),"\n)"):t8("(",t6(n,", "),")"))+(r?" repeatable":"")+" on "+t6(i," | ")}),SchemaExtension:function(e){var t=e.directives,n=e.operationTypes;return t6(["extend schema",t6(t," "),t5(n)]," ")},ScalarTypeExtension:function(e){var t;return t6(["extend scalar",e.name,t6(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return t6(["extend type",t,t8("implements ",t6(n," & ")),t6(r," "),t5(i)]," ")},InterfaceTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return t6(["extend interface",t,t8("implements ",t6(n," & ")),t6(r," "),t5(i)]," ")},UnionTypeExtension:function(e){var t=e.name,n=e.directives,r=e.types;return t6(["extend union",t,t6(n," "),r&&0!==r.length?"= "+t6(r," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,n=e.directives,r=e.values;return t6(["extend enum",t,t6(n," "),t5(r)]," ")},InputObjectTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return t6(["extend input",t,t6(n," "),t5(r)]," ")}};function t4(e){return function(t){return t6([t.description,e(t)],"\n")}}function t6(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter(function(e){return e}).join(n))&&void 0!==t?t:""}function t5(e){return t8("{\n",t9(t6(e,"\n")),"\n}")}function t8(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return null!=t&&""!==t?e+t+n:""}function t9(e){return t8(" ",e.replace(/\n/g,"\n "))}function t7(e){return -1!==e.indexOf("\n")}function ne(e){return null!=e&&e.some(t7)}var nt,nn,nr,ni={http:{includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},na=function(e,t){return t(e)};function no(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i={},a={};n.forEach(function(e){i=(0,en.pi)((0,en.pi)((0,en.pi)({},i),e.options),{headers:(0,en.pi)((0,en.pi)({},i.headers),e.headers)}),e.credentials&&(i.credentials=e.credentials),a=(0,en.pi)((0,en.pi)({},a),e.http)}),i.headers&&(i.headers=ns(i.headers,a.preserveHeaderCase));var o=e.operationName,s=e.extensions,u=e.variables,c=e.query,l={operationName:o,variables:u};return a.includeExtensions&&(l.extensions=s),a.includeQuery&&(l.query=t(c,t0)),{options:i,body:l}}function ns(e,t){if(!t){var n=Object.create(null);return Object.keys(Object(e)).forEach(function(t){n[t.toLowerCase()]=e[t]}),n}var r=Object.create(null);Object.keys(Object(e)).forEach(function(t){r[t.toLowerCase()]={originalName:t,value:e[t]}});var i=Object.create(null);return Object.keys(r).forEach(function(e){i[r[e].originalName]=r[e].value}),i}var nu=function(){if("undefined"==typeof AbortController)return{controller:!1,signal:!1};var e=new AbortController,t=e.signal;return{controller:e,signal:t}};function nc(e,t){var n=[],r=function(e,t){n.push("".concat(e,"=").concat(encodeURIComponent(t)))};if("query"in t&&r("query",t.query),t.operationName&&r("operationName",t.operationName),t.variables){var i=void 0;try{i=ty(t.variables,"Variables map")}catch(a){return{parseError:a}}r("variables",i)}if(t.extensions){var o=void 0;try{o=ty(t.extensions,"Extensions map")}catch(s){return{parseError:s}}r("extensions",o)}var u="",c=e,l=e.indexOf("#");-1!==l&&(u=e.substr(l),c=e.substr(0,l));var f=-1===c.indexOf("?")?"?":"&";return{newURI:c+f+n.join("&")+u}}function nl(e){return new eT(function(t){t.error(e)})}var nf=(0,Q.wY)(function(){return fetch}),nd=function(e){void 0===e&&(e={});var t=e.uri,n=void 0===t?"/graphql":t,r=e.fetch,i=e.print,a=void 0===i?na:i,o=e.includeExtensions,s=e.preserveHeaderCase,u=e.useGETForQueries,c=e.includeUnusedVariables,l=void 0!==c&&c,f=(0,en._T)(e,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]);__DEV__&&tQ(r||nf);var d={http:{includeExtensions:o,preserveHeaderCase:s},options:f.fetchOptions,credentials:f.credentials,headers:f.headers};return new ta(function(e){var t,i=tw(e,n),o=e.getContext(),s={};if(o.clientAwareness){var c=o.clientAwareness,f=c.name,h=c.version;f&&(s["apollographql-client-name"]=f),h&&(s["apollographql-client-version"]=h)}var p=(0,en.pi)((0,en.pi)({},s),o.headers),b={http:o.http,options:o.fetchOptions,credentials:o.credentials,headers:p},m=no(e,a,ni,d,b),g=m.options,v=m.body;if(v.variables&&!l){var y=new Set(Object.keys(v.variables));tl(e.query,{Variable:function(e,t,n){n&&"VariableDefinition"!==n.kind&&y.delete(e.name.value)}}),y.size&&(v.variables=(0,en.pi)({},v.variables),y.forEach(function(e){delete v.variables[e]}))}if(!g.signal){var w=nu(),_=w.controller,E=w.signal;(t=_)&&(g.signal=E)}var S,k=function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation},x=(S=e8(e.query),"OperationDefinition"===S.kind&&"subscription"===S.operation),T=tb(["defer"],e.query);if(u&&!e.query.definitions.some(k)&&(g.method="GET"),T||x){g.headers=g.headers||{};var M="multipart/mixed;";x&&T&&__DEV__&&Q.kG.warn("Multipart-subscriptions do not support @defer"),x?M+="boundary=graphql;subscriptionSpec=1.0,application/json":T&&(M+="deferSpec=20220824,application/json"),g.headers.accept=M}if("GET"===g.method){var O=nc(i,v),A=O.newURI,L=O.parseError;if(L)return nl(L);i=A}else try{g.body=ty(v,"Payload")}catch(C){return nl(C)}return new eT(function(n){return(r||(0,Q.wY)(function(){return fetch})||nf)(i,g).then(function(t){e.setContext({response:t});var r,i=null===(r=t.headers)||void 0===r?void 0:r.get("content-type");return null!==i&&/^multipart\/mixed/i.test(i)?tK(t,n):tX(t,e,n)}).catch(function(e){return tZ(e,n)}),function(){t&&t.abort()}})})},nh=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,nd(t).request)||this;return n.options=t,n}return(0,en.ZT)(t,e),t}(ta),np=ta.execute,nb="3.7.17",nm=__webpack_require__(82152);let ng=()=>Object.create(null),{forEach:nv,slice:ny}=Array.prototype,{hasOwnProperty:nw}=Object.prototype;class n_{constructor(e=!0,t=ng){this.weakness=e,this.makeData=t}lookup(...e){return this.lookupArray(e)}lookupArray(e){let t=this;return nv.call(e,e=>t=t.getChildTrie(e)),nw.call(t,"data")?t.data:t.data=this.makeData(ny.call(e))}peek(...e){return this.peekArray(e)}peekArray(e){let t=this;for(let n=0,r=e.length;t&&n<r;++n){let i=this.weakness&&nE(e[n])?t.weak:t.strong;t=i&&i.get(e[n])}return t&&t.data}getChildTrie(e){let t=this.weakness&&nE(e)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),n=t.get(e);return n||t.set(e,n=new n_(this.weakness,this.makeData)),n}}function nE(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}function nS(e){return(0,eO.s)(e)?(0,tP.k)(e)?e.slice(0):(0,en.pi)({__proto__:Object.getPrototypeOf(e)},e):e}var nk=function(){function e(){this.known=new(t_.sy?WeakSet:Set),this.pool=new n_(t_.mr),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(e){return(0,eO.s)(e)&&this.known.has(e)},e.prototype.pass=function(e){if((0,eO.s)(e)){var t=nS(e);return this.passes.set(t,e),t}return e},e.prototype.admit=function(e){var t=this;if((0,eO.s)(e)){var n=this.passes.get(e);if(n)return n;var r=Object.getPrototypeOf(e);switch(r){case Array.prototype:if(this.known.has(e))break;var i=e.map(this.admit,this),a=this.pool.lookupArray(i);return!a.array&&(this.known.add(a.array=i),__DEV__&&Object.freeze(i)),a.array;case null:case Object.prototype:if(this.known.has(e))break;var o=Object.getPrototypeOf(e),s=[o],u=this.sortedKeys(e);s.push(u.json);var c=s.length;u.sorted.forEach(function(n){s.push(t.admit(e[n]))});var a=this.pool.lookupArray(s);if(!a.object){var l=a.object=Object.create(o);this.known.add(l),u.sorted.forEach(function(e,t){l[e]=s[c+t]}),__DEV__&&Object.freeze(l)}return a.object}}return e},e.prototype.sortedKeys=function(e){var t=Object.keys(e),n=this.pool.lookupArray(t);if(!n.keys){t.sort();var r=JSON.stringify(t);(n.keys=this.keysByJSON.get(r))||this.keysByJSON.set(r,n.keys={sorted:t,json:r})}return n.keys},e}(),nx=Object.assign(function(n){if((0,eO.s)(n)){void 0===e&&nT();var r=e.admit(n),i=t.get(r);return void 0===i&&t.set(r,i=JSON.stringify(r)),i}return JSON.stringify(n)},{reset:nT});function nT(){e=new nk,t=new(t_.mr?WeakMap:Map)}function nM(e,t,n){return new eT(function(r){var i=r.next,a=r.error,o=r.complete,s=0,u=!1,c={then:function(e){return new Promise(function(t){return t(e())})}};function l(e,t){return e?function(t){++s;var n=function(){return e(t)};c=c.then(n,n).then(function(e){--s,i&&i.call(r,e),u&&f.complete()},function(e){throw--s,e}).catch(function(e){a&&a.call(r,e)})}:function(e){return t&&t.call(r,e)}}var f={next:l(t,i),error:l(n,a),complete:function(){u=!0,!s&&o&&o.call(r)}},d=e.subscribe(f);return function(){return d.unsubscribe()}})}function nO(e){var t=nA(e);return(0,tP.O)(t)}function nA(e){var t=(0,tP.O)(e.errors)?e.errors.slice(0):[];return tU(e)&&(0,tP.O)(e.incremental)&&e.incremental.forEach(function(e){e.errors&&t.push.apply(t,e.errors)}),t}var nL=__webpack_require__(97359),nC={kind:nL.h.FIELD,name:{kind:nL.h.NAME,value:"__typename"}};function nI(e,t){return!e||e.selectionSet.selections.every(function(e){return e.kind===nL.h.FRAGMENT_SPREAD&&nI(t[e.name.value],t)})}function nD(e){return nI(e2(e)||e5(e),eL(e4(e)))?null:e}function nN(e){var t=new Set,n=[];return e.forEach(function(e){e.name?t.add(e.name):e.test&&n.push(e.test)}),function(e){return t.has(e.name.value)||n.some(function(t){return t(e)})}}function nP(e){var t=new Map;return function(n){void 0===n&&(n=e);var r=t.get(n);return r||t.set(n,r={variables:new Set,fragmentSpreads:new Set}),r}}function nR(e,t){for(var n=nP(""),r=nP(""),i=function(e){for(var t=0,i=void 0;t<e.length&&(i=e[t]);++t)if(!(0,tP.k)(i)){if(i.kind===nL.h.OPERATION_DEFINITION)return n(i.name&&i.name.value);if(i.kind===nL.h.FRAGMENT_DEFINITION)return r(i.name.value)}return __DEV__&&Q.kG.error("Could not find operation or fragment"),null},a=0,o=t.definitions.length-1;o>=0;--o)t.definitions[o].kind===nL.h.OPERATION_DEFINITION&&++a;var s=nN(e),u=e.some(function(e){return e.remove}),c=function(e){return u&&e&&e.some(s)},l=new Map,f=!1,d={enter:function(e){if(c(e.directives))return f=!0,null}},h=tl(t,{Field:d,InlineFragment:d,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(e,t,n,r,a){var o=i(a);o&&o.variables.add(e.name.value)}},FragmentSpread:{enter:function(e,t,n,r,a){if(c(e.directives))return f=!0,null;var o=i(a);o&&o.fragmentSpreads.add(e.name.value)}},FragmentDefinition:{enter:function(e,t,n,r){l.set(JSON.stringify(r),e)},leave:function(e,t,n,i){return e===l.get(JSON.stringify(i))?e:a>0&&e.selectionSet.selections.every(function(e){return e.kind===nL.h.FIELD&&"__typename"===e.name.value})?(r(e.name.value).removed=!0,f=!0,null):void 0}},Directive:{leave:function(e){if(s(e))return f=!0,null}}});if(!f)return t;var p=function(e){return e.transitiveVars||(e.transitiveVars=new Set(e.variables),e.removed||e.fragmentSpreads.forEach(function(t){p(r(t)).transitiveVars.forEach(function(t){e.transitiveVars.add(t)})})),e},b=new Set;h.definitions.forEach(function(e){e.kind===nL.h.OPERATION_DEFINITION?p(n(e.name&&e.name.value)).fragmentSpreads.forEach(function(e){b.add(e)}):e.kind!==nL.h.FRAGMENT_DEFINITION||0!==a||r(e.name.value).removed||b.add(e.name.value)}),b.forEach(function(e){p(r(e)).fragmentSpreads.forEach(function(e){b.add(e)})});var m=function(e){return!!(!b.has(e)||r(e).removed)},g={enter:function(e){if(m(e.name.value))return null}};return nD(tl(h,{FragmentSpread:g,FragmentDefinition:g,OperationDefinition:{leave:function(e){if(e.variableDefinitions){var t=p(n(e.name&&e.name.value)).transitiveVars;if(t.size<e.variableDefinitions.length)return(0,en.pi)((0,en.pi)({},e),{variableDefinitions:e.variableDefinitions.filter(function(e){return t.has(e.variable.name.value)})})}}}}))}var nj=Object.assign(function(e){return tl(e,{SelectionSet:{enter:function(e,t,n){if(!n||n.kind!==nL.h.OPERATION_DEFINITION){var r=e.selections;if(!(!r||r.some(function(e){return eQ(e)&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))}))){var i=n;if(!(eQ(i)&&i.directives&&i.directives.some(function(e){return"export"===e.name.value})))return(0,en.pi)((0,en.pi)({},e),{selections:(0,en.ev)((0,en.ev)([],r,!0),[nC],!1)})}}}}})},{added:function(e){return e===nC}}),nF={test:function(e){var t="connection"===e.name.value;return t&&(!e.arguments||!e.arguments.some(function(e){return"key"===e.name.value}))&&__DEV__&&Q.kG.warn("Removing an @connection directive even though it does not have a key. You may want to use the key parameter to specify a store key."),t}};function nY(e){return nR([nF],e0(e))}function nB(e,t,n){return void 0===n&&(n=!0),!!t&&t.selections&&t.selections.some(function(t){return nU(e,t,n)})}function nU(e,t,n){return void 0===n&&(n=!0),!isField(t)||!!t.directives&&(t.directives.some(nN(e))||n&&nB(e,t.selectionSet,n))}function nH(e){return"query"===e8(e).operation?e:tl(e,{OperationDefinition:{enter:function(e){return(0,en.pi)((0,en.pi)({},e),{operation:"query"})}}})}function n$(e){return e0(e),nR([{test:function(e){return"client"===e.name.value},remove:!0},],e)}var nz=new Map;function nG(e){var t=nz.get(e)||1;return nz.set(e,t+1),"".concat(e,":").concat(t,":").concat(Math.random().toString(36).slice(2))}function nW(e,t,n){var r=[];e.forEach(function(e){return e[t]&&r.push(e)}),r.forEach(function(e){return e[t](n)})}function nK(e){function t(t){Object.defineProperty(e,t,{value:eT})}return t_.aS&&Symbol.species&&t(Symbol.species),t("@@species"),e}function nV(e){return e&&"function"==typeof e.then}var nq=function(e){function t(t){var n=e.call(this,function(e){return n.addObserver(e),function(){return n.removeObserver(e)}})||this;return n.observers=new Set,n.promise=new Promise(function(e,t){n.resolve=e,n.reject=t}),n.handlers={next:function(e){null!==n.sub&&(n.latest=["next",e],n.notify("next",e),nW(n.observers,"next",e))},error:function(e){var t=n.sub;null!==t&&(t&&setTimeout(function(){return t.unsubscribe()}),n.sub=null,n.latest=["error",e],n.reject(e),n.notify("error",e),nW(n.observers,"error",e))},complete:function(){var e=n,t=e.sub,r=e.sources,i=void 0===r?[]:r;if(null!==t){var a=i.shift();a?nV(a)?a.then(function(e){return n.sub=e.subscribe(n.handlers)}):n.sub=a.subscribe(n.handlers):(t&&setTimeout(function(){return t.unsubscribe()}),n.sub=null,n.latest&&"next"===n.latest[0]?n.resolve(n.latest[1]):n.resolve(),n.notify("complete"),nW(n.observers,"complete"))}}},n.nextResultListeners=new Set,n.cancel=function(e){n.reject(e),n.sources=[],n.handlers.complete()},n.promise.catch(function(e){}),"function"==typeof t&&(t=[new eT(t)]),nV(t)?t.then(function(e){return n.start(e)},n.handlers.error):n.start(t),n}return(0,en.ZT)(t,e),t.prototype.start=function(e){void 0===this.sub&&(this.sources=Array.from(e),this.handlers.complete())},t.prototype.deliverLastMessage=function(e){if(this.latest){var t=this.latest[0],n=e[t];n&&n.call(e,this.latest[1]),null===this.sub&&"next"===t&&e.complete&&e.complete()}},t.prototype.addObserver=function(e){this.observers.has(e)||(this.deliverLastMessage(e),this.observers.add(e))},t.prototype.removeObserver=function(e){this.observers.delete(e)&&this.observers.size<1&&this.handlers.complete()},t.prototype.notify=function(e,t){var n=this.nextResultListeners;n.size&&(this.nextResultListeners=new Set,n.forEach(function(n){return n(e,t)}))},t.prototype.beforeNext=function(e){var t=!1;this.nextResultListeners.add(function(n,r){t||(t=!0,e(n,r))})},t}(eT);nK(nq);var nZ=__webpack_require__(1644),nX=Object.prototype.toString;function nJ(e){return nQ(e)}function nQ(e,t){switch(nX.call(e)){case"[object Array]":if((t=t||new Map).has(e))return t.get(e);var n=e.slice(0);return t.set(e,n),n.forEach(function(e,r){n[r]=nQ(e,t)}),n;case"[object Object]":if((t=t||new Map).has(e))return t.get(e);var r=Object.create(Object.getPrototypeOf(e));return t.set(e,r),Object.keys(e).forEach(function(n){r[n]=nQ(e[n],t)}),r;default:return e}}var n1=__webpack_require__(53712),n0=Object.assign,n2=Object.hasOwnProperty,n3=function(e){function t(t){var n=t.queryManager,r=t.queryInfo,i=t.options,a=e.call(this,function(e){try{var t=e._subscription._observer;t&&!t.error&&(t.error=n6)}catch(n){}var r=!a.observers.size;a.observers.add(e);var i=a.last;return i&&i.error?e.error&&e.error(i.error):i&&i.result&&e.next&&e.next(i.result),r&&a.reobserve().catch(function(){}),function(){a.observers.delete(e)&&!a.observers.size&&a.tearDownQuery()}})||this;a.observers=new Set,a.subscriptions=new Set,a.queryInfo=r,a.queryManager=n,a.waitForOwnResult=n8(i.fetchPolicy),a.isTornDown=!1;var o=n.defaultOptions.watchQuery,s=(void 0===o?{}:o).fetchPolicy,u=void 0===s?"cache-first":s,c=i.fetchPolicy,l=void 0===c?u:c,f=i.initialFetchPolicy,d=void 0===f?"standby"===l?u:l:f;a.options=(0,en.pi)((0,en.pi)({},i),{initialFetchPolicy:d,fetchPolicy:l}),a.queryId=r.queryId||n.generateQueryId();var h=e2(a.query);return a.queryName=h&&h.name&&h.name.value,a}return(0,en.ZT)(t,e),Object.defineProperty(t.prototype,"query",{get:function(){return this.queryManager.transform(this.options.query).document},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var e=this;return new Promise(function(t,n){var r={next:function(n){t(n),e.observers.delete(r),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout(function(){i.unsubscribe()},0)},error:n},i=e.subscribe(r)})},t.prototype.getCurrentResult=function(e){void 0===e&&(e=!0);var t=this.getLastResult(!0),n=this.queryInfo.networkStatus||t&&t.networkStatus||nZ.I.ready,r=(0,en.pi)((0,en.pi)({},t),{loading:(0,nZ.O)(n),networkStatus:n}),i=this.options.fetchPolicy,a=void 0===i?"cache-first":i;if(n8(a)||this.queryManager.transform(this.options.query).hasForcedResolvers);else if(this.waitForOwnResult)this.queryInfo.updateWatch();else{var o=this.queryInfo.getDiff();(o.complete||this.options.returnPartialData)&&(r.data=o.result),(0,nm.D)(r.data,{})&&(r.data=void 0),o.complete?(delete r.partial,o.complete&&r.networkStatus===nZ.I.loading&&("cache-first"===a||"cache-only"===a)&&(r.networkStatus=nZ.I.ready,r.loading=!1)):r.partial=!0,!__DEV__||o.complete||this.options.partialRefetch||r.loading||r.data||r.error||n5(o.missing)}return e&&this.updateLastResult(r),r},t.prototype.isDifferentFromLastResult=function(e,t){return!this.last||!(0,nm.D)(this.last.result,e)||t&&!(0,nm.D)(this.last.variables,t)},t.prototype.getLast=function(e,t){var n=this.last;if(n&&n[e]&&(!t||(0,nm.D)(n.variables,this.variables)))return n[e]},t.prototype.getLastResult=function(e){return this.getLast("result",e)},t.prototype.getLastError=function(e){return this.getLast("error",e)},t.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(e){var t,n={pollInterval:0},r=this.options.fetchPolicy;if("cache-and-network"===r?n.fetchPolicy=r:"no-cache"===r?n.fetchPolicy="no-cache":n.fetchPolicy="network-only",__DEV__&&e&&n2.call(e,"variables")){var i=e6(this.query),a=i.variableDefinitions;(!a||!a.some(function(e){return"variables"===e.variable.name.value}))&&__DEV__&&Q.kG.warn("Called refetch(".concat(JSON.stringify(e),") for query ").concat((null===(t=i.name)||void 0===t?void 0:t.value)||JSON.stringify(i),", which does not declare a $variables variable.\nDid you mean to call refetch(variables) instead of refetch({ variables })?"))}return e&&!(0,nm.D)(this.options.variables,e)&&(n.variables=this.options.variables=(0,en.pi)((0,en.pi)({},this.options.variables),e)),this.queryInfo.resetLastWrite(),this.reobserve(n,nZ.I.refetch)},t.prototype.fetchMore=function(e){var t=this,n=(0,en.pi)((0,en.pi)({},e.query?e:(0,en.pi)((0,en.pi)((0,en.pi)((0,en.pi)({},this.options),{query:this.query}),e),{variables:(0,en.pi)((0,en.pi)({},this.options.variables),e.variables)})),{fetchPolicy:"no-cache"}),r=this.queryManager.generateQueryId(),i=this.queryInfo,a=i.networkStatus;i.networkStatus=nZ.I.fetchMore,n.notifyOnNetworkStatusChange&&this.observe();var o=new Set;return this.queryManager.fetchQuery(r,n,nZ.I.fetchMore).then(function(s){return t.queryManager.removeQuery(r),i.networkStatus===nZ.I.fetchMore&&(i.networkStatus=a),t.queryManager.cache.batch({update:function(r){var i=e.updateQuery;i?r.updateQuery({query:t.query,variables:t.variables,returnPartialData:!0,optimistic:!1},function(e){return i(e,{fetchMoreResult:s.data,variables:n.variables})}):r.writeQuery({query:n.query,variables:n.variables,data:s.data})},onWatchUpdated:function(e){o.add(e.query)}}),s}).finally(function(){o.has(t.query)||n4(t)})},t.prototype.subscribeToMore=function(e){var t=this,n=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:function(n){var r=e.updateQuery;r&&t.updateQuery(function(e,t){return r(e,{subscriptionData:n,variables:t.variables})})},error:function(t){if(e.onError){e.onError(t);return}__DEV__&&Q.kG.error("Unhandled GraphQL subscription error",t)}});return this.subscriptions.add(n),function(){t.subscriptions.delete(n)&&n.unsubscribe()}},t.prototype.setOptions=function(e){return this.reobserve(e)},t.prototype.setVariables=function(e){return(0,nm.D)(this.variables,e)?this.observers.size?this.result():Promise.resolve():(this.options.variables=e,this.observers.size)?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:e},nZ.I.setVariables):Promise.resolve()},t.prototype.updateQuery=function(e){var t=this.queryManager,n=e(t.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,{variables:this.variables});n&&(t.cache.writeQuery({query:this.options.query,data:n,variables:this.variables}),t.broadcastQueries())},t.prototype.startPolling=function(e){this.options.pollInterval=e,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.applyNextFetchPolicy=function(e,t){if(t.nextFetchPolicy){var n=t.fetchPolicy,r=void 0===n?"cache-first":n,i=t.initialFetchPolicy,a=void 0===i?r:i;"standby"===r||("function"==typeof t.nextFetchPolicy?t.fetchPolicy=t.nextFetchPolicy(r,{reason:e,options:t,observable:this,initialFetchPolicy:a}):"variables-changed"===e?t.fetchPolicy=a:t.fetchPolicy=t.nextFetchPolicy)}return t.fetchPolicy},t.prototype.fetch=function(e,t){return this.queryManager.setObservableQuery(this),this.queryManager.fetchConcastWithInfo(this.queryId,e,t)},t.prototype.updatePolling=function(){var e=this;if(!this.queryManager.ssrMode){var t=this,n=t.pollingInfo,r=t.options.pollInterval;if(!r){n&&(clearTimeout(n.timeout),delete this.pollingInfo);return}if(!n||n.interval!==r){__DEV__?(0,Q.kG)(r,"Attempted to start a polling query without a polling interval."):(0,Q.kG)(r,13),(n||(this.pollingInfo={})).interval=r;var i=function(){e.pollingInfo&&((0,nZ.O)(e.queryInfo.networkStatus)?a():e.reobserve({fetchPolicy:"no-cache"===e.options.initialFetchPolicy?"no-cache":"network-only"},nZ.I.poll).then(a,a))},a=function(){var t=e.pollingInfo;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(i,t.interval))};a()}}},t.prototype.updateLastResult=function(e,t){return void 0===t&&(t=this.variables),this.last=(0,en.pi)((0,en.pi)({},this.last),{result:this.queryManager.assumeImmutableResults?e:nJ(e),variables:t}),(0,tP.O)(e.errors)||delete this.last.error,this.last},t.prototype.reobserveAsConcast=function(e,t){var n=this;this.isTornDown=!1;var r=t===nZ.I.refetch||t===nZ.I.fetchMore||t===nZ.I.poll,i=this.options.variables,a=this.options.fetchPolicy,o=(0,n1.o)(this.options,e||{}),s=r?o:n0(this.options,o);!r&&(this.updatePolling(),e&&e.variables&&!(0,nm.D)(e.variables,i)&&"standby"!==s.fetchPolicy&&s.fetchPolicy===a&&(this.applyNextFetchPolicy("variables-changed",s),void 0===t&&(t=nZ.I.setVariables))),this.waitForOwnResult&&(this.waitForOwnResult=n8(s.fetchPolicy));var u=function(){n.concast===f&&(n.waitForOwnResult=!1)},c=s.variables&&(0,en.pi)({},s.variables),l=this.fetch(s,t),f=l.concast,d=l.fromLink,h={next:function(e){u(),n.reportResult(e,c)},error:function(e){u(),n.reportError(e,c)}};return!r&&d&&(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=f,this.observer=h),f.addObserver(h),f},t.prototype.reobserve=function(e,t){return this.reobserveAsConcast(e,t).promise},t.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},t.prototype.reportResult=function(e,t){var n=this.getLastError();(n||this.isDifferentFromLastResult(e,t))&&((n||!e.partial||this.options.returnPartialData)&&this.updateLastResult(e,t),nW(this.observers,"next",e))},t.prototype.reportError=function(e,t){var n=(0,en.pi)((0,en.pi)({},this.getLastResult()),{error:e,errors:e.graphQLErrors,networkStatus:nZ.I.error,loading:!1});this.updateLastResult(n,t),nW(this.observers,"error",this.last.error=e)},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach(function(e){return e.unsubscribe()}),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t}(eT);function n4(e){var t=e.options,n=t.fetchPolicy,r=t.nextFetchPolicy;return"cache-and-network"===n||"network-only"===n?e.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(){return(this.nextFetchPolicy=r,"function"==typeof r)?r.apply(this,arguments):n}}):e.reobserve()}function n6(e){__DEV__&&Q.kG.error("Unhandled error",e.message,e.stack)}function n5(e){__DEV__&&e&&__DEV__&&Q.kG.debug("Missing cache result fields: ".concat(JSON.stringify(e)),e)}function n8(e){return"network-only"===e||"no-cache"===e||"standby"===e}nK(n3);function n9(e){return e.kind===nL.h.FIELD||e.kind===nL.h.FRAGMENT_SPREAD||e.kind===nL.h.INLINE_FRAGMENT}function n7(e){return e.kind===Kind.SCALAR_TYPE_DEFINITION||e.kind===Kind.OBJECT_TYPE_DEFINITION||e.kind===Kind.INTERFACE_TYPE_DEFINITION||e.kind===Kind.UNION_TYPE_DEFINITION||e.kind===Kind.ENUM_TYPE_DEFINITION||e.kind===Kind.INPUT_OBJECT_TYPE_DEFINITION}function re(e){return e.kind===Kind.SCALAR_TYPE_EXTENSION||e.kind===Kind.OBJECT_TYPE_EXTENSION||e.kind===Kind.INTERFACE_TYPE_EXTENSION||e.kind===Kind.UNION_TYPE_EXTENSION||e.kind===Kind.ENUM_TYPE_EXTENSION||e.kind===Kind.INPUT_OBJECT_TYPE_EXTENSION}var rt=function(){return Object.create(null)},rn=Array.prototype,rr=rn.forEach,ri=rn.slice,ra=function(){function e(e,t){void 0===e&&(e=!0),void 0===t&&(t=rt),this.weakness=e,this.makeData=t}return e.prototype.lookup=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.lookupArray(e)},e.prototype.lookupArray=function(e){var t=this;return rr.call(e,function(e){return t=t.getChildTrie(e)}),t.data||(t.data=this.makeData(ri.call(e)))},e.prototype.getChildTrie=function(t){var n=this.weakness&&ro(t)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),r=n.get(t);return r||n.set(t,r=new e(this.weakness,this.makeData)),r},e}();function ro(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}let rs=null,ru={},rc=1,rl=()=>class{constructor(){this.id=["slot",rc++,Date.now(),Math.random().toString(36).slice(2),].join(":")}hasValue(){for(let e=rs;e;e=e.parent)if(this.id in e.slots){let t=e.slots[this.id];if(t===ru)break;return e!==rs&&(rs.slots[this.id]=t),!0}return rs&&(rs.slots[this.id]=ru),!1}getValue(){if(this.hasValue())return rs.slots[this.id]}withValue(e,t,n,r){let i={__proto__:null,[this.id]:e},a=rs;rs={parent:a,slots:i};try{return t.apply(r,n)}finally{rs=a}}static bind(e){let t=rs;return function(){let n=rs;try{return rs=t,e.apply(this,arguments)}finally{rs=n}}}static noContext(e,t,n){if(!rs)return e.apply(n,t);{let r=rs;try{return rs=null,e.apply(n,t)}finally{rs=r}}}};function rf(e){try{return e()}catch(t){}}let rd="@wry/context:Slot",rh=rf(()=>globalThis)||rf(()=>global)||Object.create(null),rp=rh,rb=rp[rd]||Array[rd]||function(e){try{Object.defineProperty(rp,rd,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(rl()),{bind:rm,noContext:rg}=rb;function rv(){}var ry=function(){function e(e,t){void 0===e&&(e=1/0),void 0===t&&(t=rv),this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}return e.prototype.has=function(e){return this.map.has(e)},e.prototype.get=function(e){var t=this.getNode(e);return t&&t.value},e.prototype.getNode=function(e){var t=this.map.get(e);if(t&&t!==this.newest){var n=t.older,r=t.newer;r&&(r.older=n),n&&(n.newer=r),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=r)}return t},e.prototype.set=function(e,t){var n=this.getNode(e);return n?n.value=t:(n={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.map.set(e,n),n.value)},e.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},e.prototype.delete=function(e){var t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)},e}(),rw=new rb,r_=Object.prototype.hasOwnProperty,rE=void 0===(n=Array.from)?function(e){var t=[];return e.forEach(function(e){return t.push(e)}),t}:n;function rS(e){var t=e.unsubscribe;"function"==typeof t&&(e.unsubscribe=void 0,t())}var rk=[],rx=100;function rT(e,t){if(!e)throw Error(t||"assertion failure")}function rM(e,t){var n=e.length;return n>0&&n===t.length&&e[n-1]===t[n-1]}function rO(e){switch(e.length){case 0:throw Error("unknown value");case 1:return e[0];case 2:throw e[1]}}function rA(e){return e.slice(0)}var rL=function(){function e(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++e.count}return e.prototype.peek=function(){if(1===this.value.length&&!rN(this))return rC(this),this.value[0]},e.prototype.recompute=function(e){return rT(!this.recomputing,"already recomputing"),rC(this),rN(this)?rI(this,e):rO(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,rR(this),rS(this))},e.prototype.dispose=function(){var e=this;this.setDirty(),rH(this),rF(this,function(t,n){t.setDirty(),r$(t,e)})},e.prototype.forget=function(){this.dispose()},e.prototype.dependOn=function(e){e.add(this),this.deps||(this.deps=rk.pop()||new Set),this.deps.add(e)},e.prototype.forgetDeps=function(){var e=this;this.deps&&(rE(this.deps).forEach(function(t){return t.delete(e)}),this.deps.clear(),rk.push(this.deps),this.deps=null)},e.count=0,e}();function rC(e){var t=rw.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),rN(e)?rY(t,e):rB(t,e),t}function rI(e,t){return rH(e),rw.withValue(e,rD,[e,t]),rz(e,t)&&rP(e),rO(e.value)}function rD(e,t){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,t)}catch(n){e.value[1]=n}e.recomputing=!1}function rN(e){return e.dirty||!!(e.dirtyChildren&&e.dirtyChildren.size)}function rP(e){e.dirty=!1,!rN(e)&&rj(e)}function rR(e){rF(e,rY)}function rj(e){rF(e,rB)}function rF(e,t){var n=e.parents.size;if(n)for(var r=rE(e.parents),i=0;i<n;++i)t(r[i],e)}function rY(e,t){rT(e.childValues.has(t)),rT(rN(t));var n=!rN(e);if(e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=rk.pop()||new Set;e.dirtyChildren.add(t),n&&rR(e)}function rB(e,t){rT(e.childValues.has(t)),rT(!rN(t));var n=e.childValues.get(t);0===n.length?e.childValues.set(t,rA(t.value)):rM(n,t.value)||e.setDirty(),rU(e,t),!rN(e)&&rj(e)}function rU(e,t){var n=e.dirtyChildren;n&&(n.delete(t),0===n.size&&(rk.length<rx&&rk.push(n),e.dirtyChildren=null))}function rH(e){e.childValues.size>0&&e.childValues.forEach(function(t,n){r$(e,n)}),e.forgetDeps(),rT(null===e.dirtyChildren)}function r$(e,t){t.parents.delete(e),e.childValues.delete(t),rU(e,t)}function rz(e,t){if("function"==typeof e.subscribe)try{rS(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(n){return e.setDirty(),!1}return!0}var rG={setDirty:!0,dispose:!0,forget:!0};function rW(e){var t=new Map,n=e&&e.subscribe;function r(e){var r=rw.getValue();if(r){var i=t.get(e);i||t.set(e,i=new Set),r.dependOn(i),"function"==typeof n&&(rS(i),i.unsubscribe=n(e))}}return r.dirty=function(e,n){var r=t.get(e);if(r){var i=n&&r_.call(rG,n)?n:"setDirty";rE(r).forEach(function(e){return e[i]()}),t.delete(e),rS(r)}},r}function rK(){var e=new ra("function"==typeof WeakMap);return function(){return e.lookupArray(arguments)}}var rV=rK(),rq=new Set;function rZ(e,t){void 0===t&&(t=Object.create(null));var n=new ry(t.max||65536,function(e){return e.dispose()}),r=t.keyArgs,i=t.makeCacheKey||rK(),a=function(){var a=i.apply(null,r?r.apply(null,arguments):arguments);if(void 0===a)return e.apply(null,arguments);var o=n.get(a);o||(n.set(a,o=new rL(e)),o.subscribe=t.subscribe,o.forget=function(){return n.delete(a)});var s=o.recompute(Array.prototype.slice.call(arguments));return n.set(a,o),rq.add(n),rw.hasValue()||(rq.forEach(function(e){return e.clean()}),rq.clear()),s};function o(e){var t=n.get(e);t&&t.setDirty()}function s(e){var t=n.get(e);if(t)return t.peek()}function u(e){return n.delete(e)}return Object.defineProperty(a,"size",{get:function(){return n.map.size},configurable:!1,enumerable:!1}),a.dirtyKey=o,a.dirty=function(){o(i.apply(null,arguments))},a.peekKey=s,a.peek=function(){return s(i.apply(null,arguments))},a.forgetKey=u,a.forget=function(){return u(i.apply(null,arguments))},a.makeCacheKey=i,a.getKey=r?function(){return i.apply(null,r.apply(null,arguments))}:i,Object.freeze(a)}var rX=new rb,rJ=new WeakMap;function rQ(e){var t=rJ.get(e);return t||rJ.set(e,t={vars:new Set,dep:rW()}),t}function r1(e){rQ(e).vars.forEach(function(t){return t.forgetCache(e)})}function r0(e){rQ(e).vars.forEach(function(t){return t.attachCache(e)})}function r2(e){var t=new Set,n=new Set,r=function(a){if(arguments.length>0){if(e!==a){e=a,t.forEach(function(e){rQ(e).dep.dirty(r),r3(e)});var o=Array.from(n);n.clear(),o.forEach(function(t){return t(e)})}}else{var s=rX.getValue();s&&(i(s),rQ(s).dep(r))}return e};r.onNextChange=function(e){return n.add(e),function(){n.delete(e)}};var i=r.attachCache=function(e){return t.add(e),rQ(e).vars.add(r),r};return r.forgetCache=function(e){return t.delete(e)},r}function r3(e){e.broadcastWatches&&e.broadcastWatches()}var r4=function(){function e(e){var t=e.cache,n=e.client,r=e.resolvers,i=e.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=t,n&&(this.client=n),r&&this.addResolvers(r),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach(function(e){t.resolvers=tj(t.resolvers,e)}):this.resolvers=tj(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,n=e.remoteResult,r=e.context,i=e.variables,a=e.onlyRunForcedResolvers,o=void 0!==a&&a;return(0,en.mG)(this,void 0,void 0,function(){return(0,en.Jh)(this,function(e){return t?[2,this.resolveDocument(t,n.data,r,i,this.fragmentMatcher,o).then(function(e){return(0,en.pi)((0,en.pi)({},n),{data:e.result})})]:[2,n]})})},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return tb(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return n$(e)},e.prototype.prepareContext=function(e){var t=this.cache;return(0,en.pi)((0,en.pi)({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),(0,en.mG)(this,void 0,void 0,function(){return(0,en.Jh)(this,function(r){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(n),t).then(function(e){return(0,en.pi)((0,en.pi)({},t),e.exportedVariables)})]:[2,(0,en.pi)({},t)]})})},e.prototype.shouldForceResolvers=function(e){var t=!1;return tl(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some(function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value})))return tc}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:nH(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,n,r,i,a){return void 0===n&&(n={}),void 0===r&&(r={}),void 0===i&&(i=function(){return!0}),void 0===a&&(a=!1),(0,en.mG)(this,void 0,void 0,function(){var o,s,u,c,l,f,d,h,p,b,m;return(0,en.Jh)(this,function(g){return o=e8(e),s=e4(e),u=eL(s),c=this.collectSelectionsToResolve(o,u),f=(l=o.operation)?l.charAt(0).toUpperCase()+l.slice(1):"Query",d=this,h=d.cache,p=d.client,b={fragmentMap:u,context:(0,en.pi)((0,en.pi)({},n),{cache:h,client:p}),variables:r,fragmentMatcher:i,defaultOperationType:f,exportedVariables:{},selectionsToResolve:c,onlyRunForcedResolvers:a},m=!1,[2,this.resolveSelectionSet(o.selectionSet,m,t,b).then(function(e){return{result:e,exportedVariables:b.exportedVariables}})]})})},e.prototype.resolveSelectionSet=function(e,t,n,r){return(0,en.mG)(this,void 0,void 0,function(){var i,a,o,s,u,c=this;return(0,en.Jh)(this,function(l){return i=r.fragmentMap,a=r.context,o=r.variables,s=[n],u=function(e){return(0,en.mG)(c,void 0,void 0,function(){var u,c;return(0,en.Jh)(this,function(l){return(t||r.selectionsToResolve.has(e))&&td(e,o)?eQ(e)?[2,this.resolveField(e,t,n,r).then(function(t){var n;void 0!==t&&s.push(((n={})[eX(e)]=t,n))})]:(e1(e)?u=e:(u=i[e.name.value],__DEV__?(0,Q.kG)(u,"No fragment named ".concat(e.name.value)):(0,Q.kG)(u,11)),u&&u.typeCondition&&(c=u.typeCondition.name.value,r.fragmentMatcher(n,c,a)))?[2,this.resolveSelectionSet(u.selectionSet,t,n,r).then(function(e){s.push(e)})]:[2]:[2]})})},[2,Promise.all(e.selections.map(u)).then(function(){return tF(s)})]})})},e.prototype.resolveField=function(e,t,n,r){return(0,en.mG)(this,void 0,void 0,function(){var i,a,o,s,u,c,l,f,d,h=this;return(0,en.Jh)(this,function(p){return n?(i=r.variables,a=e.name.value,o=eX(e),s=a!==o,c=Promise.resolve(u=n[o]||n[a]),(!r.onlyRunForcedResolvers||this.shouldForceResolvers(e))&&(l=n.__typename||r.defaultOperationType,(f=this.resolvers&&this.resolvers[l])&&(d=f[s?a:o])&&(c=Promise.resolve(rX.withValue(this.cache,d,[n,eZ(e,i),r.context,{field:e,fragmentMap:r.fragmentMap},])))),[2,c.then(function(n){if(void 0===n&&(n=u),e.directives&&e.directives.forEach(function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach(function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(r.exportedVariables[e.value.value]=n)})}),!e.selectionSet||null==n)return n;var i,a,o=null!==(a=null===(i=e.directives)||void 0===i?void 0:i.some(function(e){return"client"===e.name.value}))&&void 0!==a&&a;return Array.isArray(n)?h.resolveSubSelectedArray(e,t||o,n,r):e.selectionSet?h.resolveSelectionSet(e.selectionSet,t||o,n,r):void 0})]):[2,null]})})},e.prototype.resolveSubSelectedArray=function(e,t,n,r){var i=this;return Promise.all(n.map(function(n){return null===n?null:Array.isArray(n)?i.resolveSubSelectedArray(e,t,n,r):e.selectionSet?i.resolveSelectionSet(e.selectionSet,t,n,r):void 0}))},e.prototype.collectSelectionsToResolve=function(e,t){var n=function(e){return!Array.isArray(e)},r=this.selectionsToResolveCache;function i(e){if(!r.has(e)){var a=new Set;r.set(e,a),tl(e,{Directive:function(e,t,r,i,o){"client"===e.name.value&&o.forEach(function(e){n(e)&&n9(e)&&a.add(e)})},FragmentSpread:function(e,r,o,s,u){var c=t[e.name.value];__DEV__?(0,Q.kG)(c,"No fragment named ".concat(e.name.value)):(0,Q.kG)(c,12);var l=i(c);l.size>0&&(u.forEach(function(e){n(e)&&n9(e)&&a.add(e)}),a.add(e),l.forEach(function(e){a.add(e)}))}})}return r.get(e)}return i(e)},e}(),r6=new(t_.mr?WeakMap:Map);function r5(e,t){var n=e[t];"function"==typeof n&&(e[t]=function(){return r6.set(e,(r6.get(e)+1)%1e15),n.apply(this,arguments)})}function r8(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var r9=function(){function e(e,t){void 0===t&&(t=e.generateQueryId()),this.queryId=t,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.subscriptions=new Set,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var n=this.cache=e.cache;r6.has(n)||(r6.set(n,0),r5(n,"evict"),r5(n,"modify"),r5(n,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||nZ.I.loading;return this.variables&&this.networkStatus!==nZ.I.loading&&!(0,nm.D)(this.variables,e.variables)&&(t=nZ.I.setVariables),(0,nm.D)(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.reset=function(){r8(this),this.dirty=!1},e.prototype.getDiff=function(e){void 0===e&&(e=this.variables);var t=this.getDiffOptions(e);if(this.lastDiff&&(0,nm.D)(t,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables=e);var n=this.observableQuery;if(n&&"no-cache"===n.options.fetchPolicy)return{complete:!1};var r=this.cache.diff(t);return this.updateLastDiff(r,t),r},e.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(e){var t;return void 0===e&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:null===(t=this.observableQuery)||void 0===t?void 0:t.options.canonizeResults}},e.prototype.setDiff=function(e){var t=this,n=this.lastDiff&&this.lastDiff.diff;this.updateLastDiff(e),this.dirty||(0,nm.D)(n&&n.result,e&&e.result)||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(function(){return t.notify()},0)))},e.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){t.getDiff().fromOptimisticTransaction?e.observe():n4(e)})):delete this.oqListener)},e.prototype.notify=function(){var e=this;r8(this),this.shouldNotify()&&this.listeners.forEach(function(t){return t(e)}),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if((0,nZ.O)(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if("cache-only"!==e&&"cache-and-network"!==e)return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel,this.subscriptions.forEach(function(e){return e.unsubscribe()});var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var n=this.observableQuery;if(!n||"no-cache"!==n.options.fetchPolicy){var r=(0,en.pi)((0,en.pi)({},this.getDiffOptions(e)),{watcher:this,callback:function(e){return t.setDiff(e)}});this.lastWatch&&(0,nm.D)(r,this.lastWatch)||(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=r))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(e,t){var n=this.lastWrite;return!(n&&n.dmCount===r6.get(this.cache)&&(0,nm.D)(t,n.variables)&&(0,nm.D)(e.data,n.result.data))},e.prototype.markResult=function(e,t,n,r){var i=this,a=new tB,o=(0,tP.O)(e.errors)?e.errors.slice(0):[];if(this.reset(),"incremental"in e&&(0,tP.O)(e.incremental)){var s=tG(this.getDiff().result,e);e.data=s}else if("hasNext"in e&&e.hasNext){var u=this.getDiff();e.data=a.merge(u.result,e.data)}this.graphQLErrors=o,"no-cache"===n.fetchPolicy?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(n.variables)):0!==r&&(r7(e,n.errorPolicy)?this.cache.performTransaction(function(a){if(i.shouldWrite(e,n.variables))a.writeQuery({query:t,data:e.data,variables:n.variables,overwrite:1===r}),i.lastWrite={result:e,variables:n.variables,dmCount:r6.get(i.cache)};else if(i.lastDiff&&i.lastDiff.diff.complete){e.data=i.lastDiff.diff.result;return}var o=i.getDiffOptions(n.variables),s=a.diff(o);i.stopped||i.updateWatch(n.variables),i.updateLastDiff(s,o),s.complete&&(e.data=s.result)}):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=nZ.I.ready},e.prototype.markError=function(e){return this.networkStatus=nZ.I.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function r7(e,t){void 0===t&&(t="none");var n="ignore"===t||"all"===t,r=!nO(e);return!r&&n&&e.data&&(r=!0),r}var ie=Object.prototype.hasOwnProperty,it=function(){function e(e){var t=e.cache,n=e.link,r=e.defaultOptions,i=e.queryDeduplication,a=void 0!==i&&i,o=e.onBroadcast,s=e.ssrMode,u=void 0!==s&&s,c=e.clientAwareness,l=void 0===c?{}:c,f=e.localState,d=e.assumeImmutableResults;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new(t_.mr?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map,this.cache=t,this.link=n,this.defaultOptions=r||Object.create(null),this.queryDeduplication=a,this.clientAwareness=l,this.localState=f||new r4({cache:t}),this.ssrMode=u,this.assumeImmutableResults=!!d,(this.onBroadcast=o)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var e=this;this.queries.forEach(function(t,n){e.stopQueryNoBroadcast(n)}),this.cancelPendingFetches(__DEV__?new Q.ej("QueryManager stopped while query was in flight"):new Q.ej(14))},e.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach(function(t){return t(e)}),this.fetchCancelFns.clear()},e.prototype.mutate=function(e){var t,n,r=e.mutation,i=e.variables,a=e.optimisticResponse,o=e.updateQueries,s=e.refetchQueries,u=void 0===s?[]:s,c=e.awaitRefetchQueries,l=void 0!==c&&c,f=e.update,d=e.onQueryUpdated,h=e.fetchPolicy,p=void 0===h?(null===(t=this.defaultOptions.mutate)||void 0===t?void 0:t.fetchPolicy)||"network-only":h,b=e.errorPolicy,m=void 0===b?(null===(n=this.defaultOptions.mutate)||void 0===n?void 0:n.errorPolicy)||"none":b,g=e.keepRootFields,v=e.context;return(0,en.mG)(this,void 0,void 0,function(){var e,t,n,s,c,h;return(0,en.Jh)(this,function(b){switch(b.label){case 0:if(__DEV__?(0,Q.kG)(r,"mutation option is required. You must specify your GraphQL document in the mutation option."):(0,Q.kG)(r,15),__DEV__?(0,Q.kG)("network-only"===p||"no-cache"===p,"Mutations support only 'network-only' or 'no-cache' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write."):(0,Q.kG)("network-only"===p||"no-cache"===p,16),e=this.generateMutationId(),n=(t=this.transform(r)).document,s=t.hasClientExports,r=this.cache.transformForLink(n),i=this.getVariables(r,i),!s)return[3,2];return[4,this.localState.addExportedVariables(r,i,v)];case 1:i=b.sent(),b.label=2;case 2:return c=this.mutationStore&&(this.mutationStore[e]={mutation:r,variables:i,loading:!0,error:null}),a&&this.markMutationOptimistic(a,{mutationId:e,document:r,variables:i,fetchPolicy:p,errorPolicy:m,context:v,updateQueries:o,update:f,keepRootFields:g}),this.broadcastQueries(),h=this,[2,new Promise(function(t,n){return nM(h.getObservableFromLink(r,(0,en.pi)((0,en.pi)({},v),{optimisticResponse:a}),i,!1),function(t){if(nO(t)&&"none"===m)throw new tN.cA({graphQLErrors:nA(t)});c&&(c.loading=!1,c.error=null);var n=(0,en.pi)({},t);return"function"==typeof u&&(u=u(n)),"ignore"===m&&nO(n)&&delete n.errors,h.markMutationResult({mutationId:e,result:n,document:r,variables:i,fetchPolicy:p,errorPolicy:m,context:v,update:f,updateQueries:o,awaitRefetchQueries:l,refetchQueries:u,removeOptimistic:a?e:void 0,onQueryUpdated:d,keepRootFields:g})}).subscribe({next:function(e){h.broadcastQueries(),"hasNext"in e&&!1!==e.hasNext||t(e)},error:function(t){c&&(c.loading=!1,c.error=t),a&&h.cache.removeOptimistic(e),h.broadcastQueries(),n(t instanceof tN.cA?t:new tN.cA({networkError:t}))}})})]}})})},e.prototype.markMutationResult=function(e,t){var n=this;void 0===t&&(t=this.cache);var r=e.result,i=[],a="no-cache"===e.fetchPolicy;if(!a&&r7(r,e.errorPolicy)){if(tU(r)||i.push({result:r.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}),tU(r)&&(0,tP.O)(r.incremental)){var o=t.diff({id:"ROOT_MUTATION",query:this.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0}),s=void 0;o.result&&(s=tG(o.result,r)),void 0!==s&&(r.data=s,i.push({result:s,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}))}var u=e.updateQueries;u&&this.queries.forEach(function(e,a){var o=e.observableQuery,s=o&&o.queryName;if(s&&ie.call(u,s)){var c,l=u[s],f=n.queries.get(a),d=f.document,h=f.variables,p=t.diff({query:d,variables:h,returnPartialData:!0,optimistic:!1}),b=p.result;if(p.complete&&b){var m=l(b,{mutationResult:r,queryName:d&&e3(d)||void 0,queryVariables:h});m&&i.push({result:m,dataId:"ROOT_QUERY",query:d,variables:h})}}})}if(i.length>0||e.refetchQueries||e.update||e.onQueryUpdated||e.removeOptimistic){var c=[];if(this.refetchQueries({updateCache:function(t){a||i.forEach(function(e){return t.write(e)});var o=e.update,s=!t$(r)||tU(r)&&!r.hasNext;if(o){if(!a){var u=t.diff({id:"ROOT_MUTATION",query:n.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});u.complete&&("incremental"in(r=(0,en.pi)((0,en.pi)({},r),{data:u.result}))&&delete r.incremental,"hasNext"in r&&delete r.hasNext)}s&&o(t,r,{context:e.context,variables:e.variables})}a||e.keepRootFields||!s||t.modify({id:"ROOT_MUTATION",fields:function(e,t){var n=t.fieldName,r=t.DELETE;return"__typename"===n?e:r}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach(function(e){return c.push(e)}),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(c).then(function(){return r})}return Promise.resolve(r)},e.prototype.markMutationOptimistic=function(e,t){var n=this,r="function"==typeof e?e(t.variables):e;return this.cache.recordOptimisticTransaction(function(e){try{n.markMutationResult((0,en.pi)((0,en.pi)({},t),{result:{data:r}}),e)}catch(i){__DEV__&&Q.kG.error(i)}},t.mutationId)},e.prototype.fetchQuery=function(e,t,n){return this.fetchQueryObservable(e,t,n).promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach(function(t,n){e[n]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}}),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){var t=this.transformCache;if(!t.has(e)){var n=this.cache.transformDocument(e),r=nY(n),i=this.localState.clientQuery(n),a=r&&this.localState.serverQuery(r),o={document:n,hasClientExports:tm(n),hasForcedResolvers:this.localState.shouldForceResolvers(n),clientQuery:i,serverQuery:a,defaultVars:e9(e2(n)),asQuery:(0,en.pi)((0,en.pi)({},n),{definitions:n.definitions.map(function(e){return"OperationDefinition"===e.kind&&"query"!==e.operation?(0,en.pi)((0,en.pi)({},e),{operation:"query"}):e})})},s=function(e){e&&!t.has(e)&&t.set(e,o)};s(e),s(n),s(i),s(a)}return t.get(e)},e.prototype.getVariables=function(e,t){return(0,en.pi)((0,en.pi)({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e){void 0===(e=(0,en.pi)((0,en.pi)({},e),{variables:this.getVariables(e.query,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var t=new r9(this),n=new n3({queryManager:this,queryInfo:t,options:e});return this.queries.set(n.queryId,t),t.init({document:n.query,observableQuery:n,variables:n.variables}),n},e.prototype.query=function(e,t){var n=this;return void 0===t&&(t=this.generateQueryId()),__DEV__?(0,Q.kG)(e.query,"query option is required. You must specify your GraphQL document in the query option."):(0,Q.kG)(e.query,17),__DEV__?(0,Q.kG)("Document"===e.query.kind,'You must wrap the query string in a "gql" tag.'):(0,Q.kG)("Document"===e.query.kind,18),__DEV__?(0,Q.kG)(!e.returnPartialData,"returnPartialData option only supported on watchQuery."):(0,Q.kG)(!e.returnPartialData,19),__DEV__?(0,Q.kG)(!e.pollInterval,"pollInterval option only supported on watchQuery."):(0,Q.kG)(!e.pollInterval,20),this.fetchQuery(t,e).finally(function(){return n.stopQuery(t)})},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(e){return void 0===e&&(e={discardWatches:!0}),this.cancelPendingFetches(__DEV__?new Q.ej("Store reset while query was in flight (not completed in link chain)"):new Q.ej(21)),this.queries.forEach(function(e){e.observableQuery?e.networkStatus=nZ.I.loading:e.stop()}),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},e.prototype.getObservableQueries=function(e){var t=this;void 0===e&&(e="active");var n=new Map,r=new Map,i=new Set;return Array.isArray(e)&&e.forEach(function(e){"string"==typeof e?r.set(e,!1):eN(e)?r.set(t.transform(e).document,!1):(0,eO.s)(e)&&e.query&&i.add(e)}),this.queries.forEach(function(t,i){var a=t.observableQuery,o=t.document;if(a){if("all"===e){n.set(i,a);return}var s=a.queryName;if("standby"===a.options.fetchPolicy||"active"===e&&!a.hasObservers())return;("active"===e||s&&r.has(s)||o&&r.has(o))&&(n.set(i,a),s&&r.set(s,!0),o&&r.set(o,!0))}}),i.size&&i.forEach(function(e){var r=nG("legacyOneTimeQuery"),i=t.getQuery(r).init({document:e.query,variables:e.variables}),a=new n3({queryManager:t,queryInfo:i,options:(0,en.pi)((0,en.pi)({},e),{fetchPolicy:"network-only"})});(0,Q.kG)(a.queryId===r),i.setObservableQuery(a),n.set(r,a)}),__DEV__&&r.size&&r.forEach(function(e,t){!e&&__DEV__&&Q.kG.warn("Unknown query ".concat("string"==typeof t?"named ":"").concat(JSON.stringify(t,null,2)," requested in refetchQueries options.include array"))}),n},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var n=[];return this.getObservableQueries(e?"all":"active").forEach(function(r,i){var a=r.options.fetchPolicy;r.resetLastResults(),(e||"standby"!==a&&"cache-only"!==a)&&n.push(r.refetch()),t.getQuery(i).setDiff(null)}),this.broadcastQueries(),Promise.all(n)},e.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},e.prototype.startGraphQLSubscription=function(e){var t=this,n=e.query,r=e.fetchPolicy,i=e.errorPolicy,a=e.variables,o=e.context,s=void 0===o?{}:o;n=this.transform(n).document,a=this.getVariables(n,a);var u=function(e){return t.getObservableFromLink(n,s,e).map(function(a){"no-cache"!==r&&(r7(a,i)&&t.cache.write({query:n,result:a.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries());var o=nO(a),s=(0,tN.ls)(a);if(o||s){var u={};throw o&&(u.graphQLErrors=a.errors),s&&(u.protocolErrors=a.extensions[tN.YG]),new tN.cA(u)}return a})};if(this.transform(n).hasClientExports){var c=this.localState.addExportedVariables(n,a,s).then(u);return new eT(function(e){var t=null;return c.then(function(n){return t=n.subscribe(e)},e.error),function(){return t&&t.unsubscribe()}})}return u(a)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.queries.has(e)&&(this.getQuery(e).stop(),this.queries.delete(e))},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach(function(e){return e.notify()})},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,n,r){var i,a,o=this;void 0===r&&(r=null!==(i=null==t?void 0:t.queryDeduplication)&&void 0!==i?i:this.queryDeduplication);var s=this.transform(e).serverQuery;if(s){var u=this,c=u.inFlightLinkObservables,l=u.link,f={query:s,variables:n,operationName:e3(s)||void 0,context:this.prepareContext((0,en.pi)((0,en.pi)({},t),{forceFetch:!r}))};if(t=f.context,r){var d=c.get(s)||new Map;c.set(s,d);var h=nx(n);if(!(a=d.get(h))){var p=new nq([np(l,f)]);d.set(h,a=p),p.beforeNext(function(){d.delete(h)&&d.size<1&&c.delete(s)})}}else a=new nq([np(l,f)])}else a=new nq([eT.of({data:{}})]),t=this.prepareContext(t);var b=this.transform(e).clientQuery;return b&&(a=nM(a,function(e){return o.localState.runResolvers({document:b,remoteResult:e,context:t,variables:n})})),a},e.prototype.getResultsFromLink=function(e,t,n){var r=e.lastRequestId=this.generateRequestId(),i=this.cache.transformForLink(this.transform(e.document).document);return nM(this.getObservableFromLink(i,n.context,n.variables),function(a){var o=nA(a),s=o.length>0;if(r>=e.lastRequestId){if(s&&"none"===n.errorPolicy)throw e.markError(new tN.cA({graphQLErrors:o}));e.markResult(a,i,n,t),e.markReady()}var u={data:a.data,loading:!1,networkStatus:nZ.I.ready};return s&&"ignore"!==n.errorPolicy&&(u.errors=o,u.networkStatus=nZ.I.error),u},function(t){var n=(0,tN.MS)(t)?t:new tN.cA({networkError:t});throw r>=e.lastRequestId&&e.markError(n),n})},e.prototype.fetchQueryObservable=function(e,t,n){return this.fetchConcastWithInfo(e,t,n).concast},e.prototype.fetchConcastWithInfo=function(e,t,n){var r,i,a=this;void 0===n&&(n=nZ.I.loading);var o=this.transform(t.query).document,s=this.getVariables(o,t.variables),u=this.getQuery(e),c=this.defaultOptions.watchQuery,l=t.fetchPolicy,f=void 0===l?c&&c.fetchPolicy||"cache-first":l,d=t.errorPolicy,h=void 0===d?c&&c.errorPolicy||"none":d,p=t.returnPartialData,b=void 0!==p&&p,m=t.notifyOnNetworkStatusChange,g=void 0!==m&&m,v=t.context,y=void 0===v?{}:v,w=Object.assign({},t,{query:o,variables:s,fetchPolicy:f,errorPolicy:h,returnPartialData:b,notifyOnNetworkStatusChange:g,context:y}),_=function(e){w.variables=e;var r=a.fetchQueryByPolicy(u,w,n);return"standby"!==w.fetchPolicy&&r.sources.length>0&&u.observableQuery&&u.observableQuery.applyNextFetchPolicy("after-fetch",t),r},E=function(){return a.fetchCancelFns.delete(e)};if(this.fetchCancelFns.set(e,function(e){E(),setTimeout(function(){return r.cancel(e)})}),this.transform(w.query).hasClientExports)r=new nq(this.localState.addExportedVariables(w.query,w.variables,w.context).then(_).then(function(e){return e.sources})),i=!0;else{var S=_(w.variables);i=S.fromLink,r=new nq(S.sources)}return r.promise.then(E,E),{concast:r,fromLink:i}},e.prototype.refetchQueries=function(e){var t=this,n=e.updateCache,r=e.include,i=e.optimistic,a=void 0!==i&&i,o=e.removeOptimistic,s=void 0===o?a?nG("refetchQueries"):void 0:o,u=e.onQueryUpdated,c=new Map;r&&this.getObservableQueries(r).forEach(function(e,n){c.set(n,{oq:e,lastDiff:t.getQuery(n).getDiff()})});var l=new Map;return n&&this.cache.batch({update:n,optimistic:a&&s||!1,removeOptimistic:s,onWatchUpdated:function(e,t,n){var r=e.watcher instanceof r9&&e.watcher.observableQuery;if(r){if(u){c.delete(r.queryId);var i=u(r,t,n);return!0===i&&(i=r.refetch()),!1!==i&&l.set(r,i),i}null!==u&&c.set(r.queryId,{oq:r,lastDiff:n,diff:t})}}}),c.size&&c.forEach(function(e,n){var r,i=e.oq,a=e.lastDiff,o=e.diff;if(u){if(!o){var s=i.queryInfo;s.reset(),o=s.getDiff()}r=u(i,o,a)}u&&!0!==r||(r=i.refetch()),!1!==r&&l.set(i,r),n.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(n)}),s&&this.cache.removeOptimistic(s),l},e.prototype.fetchQueryByPolicy=function(e,t,n){var r=this,i=t.query,a=t.variables,o=t.fetchPolicy,s=t.refetchWritePolicy,u=t.errorPolicy,c=t.returnPartialData,l=t.context,f=t.notifyOnNetworkStatusChange,d=e.networkStatus;e.init({document:this.transform(i).document,variables:a,networkStatus:n});var h=function(){return e.getDiff(a)},p=function(t,n){void 0===n&&(n=e.networkStatus||nZ.I.loading);var o=t.result;!__DEV__||c||(0,nm.D)(o,{})||n5(t.missing);var s=function(e){return eT.of((0,en.pi)({data:e,loading:(0,nZ.O)(n),networkStatus:n},t.complete?null:{partial:!0}))};return o&&r.transform(i).hasForcedResolvers?r.localState.runResolvers({document:i,remoteResult:{data:o},context:l,variables:a,onlyRunForcedResolvers:!0}).then(function(e){return s(e.data||void 0)}):"none"===u&&n===nZ.I.refetch&&Array.isArray(t.missing)?s(void 0):s(o)},b="no-cache"===o?0:n===nZ.I.refetch&&"merge"!==s?1:2,m=function(){return r.getResultsFromLink(e,b,{variables:a,context:l,fetchPolicy:o,errorPolicy:u})},g=f&&"number"==typeof d&&d!==n&&(0,nZ.O)(n);switch(o){default:case"cache-first":var v=h();if(v.complete)return{fromLink:!1,sources:[p(v,e.markReady())]};if(c||g)return{fromLink:!0,sources:[p(v),m()]};return{fromLink:!0,sources:[m()]};case"cache-and-network":var v=h();if(v.complete||c||g)return{fromLink:!0,sources:[p(v),m()]};return{fromLink:!0,sources:[m()]};case"cache-only":return{fromLink:!1,sources:[p(h(),e.markReady())]};case"network-only":if(g)return{fromLink:!0,sources:[p(h()),m()]};return{fromLink:!0,sources:[m()]};case"no-cache":if(g)return{fromLink:!0,sources:[p(e.getDiff()),m(),]};return{fromLink:!0,sources:[m()]};case"standby":return{fromLink:!1,sources:[]}}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new r9(this,e)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return(0,en.pi)((0,en.pi)({},t),{clientAwareness:this.clientAwareness})},e}(),ir=__webpack_require__(14012),ii=!1,ia=function(){function e(e){var t=this;this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var n=e.uri,r=e.credentials,i=e.headers,a=e.cache,o=e.ssrMode,s=void 0!==o&&o,u=e.ssrForceFetchDelay,c=void 0===u?0:u,l=e.connectToDevTools,f=void 0===l?"object"==typeof window&&!window.__APOLLO_CLIENT__&&__DEV__:l,d=e.queryDeduplication,h=void 0===d||d,p=e.defaultOptions,b=e.assumeImmutableResults,m=void 0!==b&&b,g=e.resolvers,v=e.typeDefs,y=e.fragmentMatcher,w=e.name,_=e.version,E=e.link;if(E||(E=n?new nh({uri:n,credentials:r,headers:i}):ta.empty()),!a)throw __DEV__?new Q.ej("To initialize Apollo Client, you must specify a 'cache' property in the options object. \nFor more information, please visit: https://go.apollo.dev/c/docs"):new Q.ej(9);if(this.link=E,this.cache=a,this.disableNetworkFetches=s||c>0,this.queryDeduplication=h,this.defaultOptions=p||Object.create(null),this.typeDefs=v,c&&setTimeout(function(){return t.disableNetworkFetches=!1},c),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),f&&"object"==typeof window&&(window.__APOLLO_CLIENT__=this),!ii&&f&&__DEV__&&(ii=!0,"undefined"!=typeof window&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__)){var S=window.navigator,k=S&&S.userAgent,x=void 0;"string"==typeof k&&(k.indexOf("Chrome/")>-1?x="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":k.indexOf("Firefox/")>-1&&(x="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),x&&__DEV__&&Q.kG.log("Download the Apollo DevTools for a better development experience: "+x)}this.version=nb,this.localState=new r4({cache:a,client:this,resolvers:g,fragmentMatcher:y}),this.queryManager=new it({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,queryDeduplication:h,ssrMode:s,clientAwareness:{name:w,version:_},localState:this.localState,assumeImmutableResults:m,onBroadcast:f?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=(0,ir.J)(this.defaultOptions.watchQuery,e)),this.disableNetworkFetches&&("network-only"===e.fetchPolicy||"cache-and-network"===e.fetchPolicy)&&(e=(0,en.pi)((0,en.pi)({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=(0,ir.J)(this.defaultOptions.query,e)),__DEV__?(0,Q.kG)("cache-and-network"!==e.fetchPolicy,"The cache-and-network fetchPolicy does not work with client.query, because client.query can only return a single result. Please use client.watchQuery to receive multiple results from the cache and the network, or consider using a different fetchPolicy, such as cache-first or network-only."):(0,Q.kG)("cache-and-network"!==e.fetchPolicy,10),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=(0,en.pi)((0,en.pi)({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=(0,ir.J)(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){var t=this.cache.writeQuery(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t},e.prototype.writeFragment=function(e){var t=this.cache.writeFragment(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return np(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!1})}).then(function(){return Promise.all(e.resetStoreCallbacks.map(function(e){return e()}))}).then(function(){return e.reFetchObservableQueries()})},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!0})}).then(function(){return Promise.all(e.clearStoreCallbacks.map(function(e){return e()}))})},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter(function(t){return t!==e})}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter(function(t){return t!==e})}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),n=[],r=[];t.forEach(function(e,t){n.push(t),r.push(e)});var i=Promise.all(r);return i.queries=n,i.results=r,i.catch(function(e){__DEV__&&Q.kG.debug("In client.refetchQueries, Promise.all promise rejected with error ".concat(e))}),i},e.prototype.getObservableQueries=function(e){return void 0===e&&(e="active"),this.queryManager.getObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e.prototype.setLink=function(e){this.link=this.queryManager.link=e},e}(),io=function(){function e(){this.getFragmentDoc=rZ(eA)}return e.prototype.batch=function(e){var t,n=this,r="string"==typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;return this.performTransaction(function(){return t=e.update(n)},r),t},e.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},e.prototype.transformDocument=function(e){return e},e.prototype.transformForLink=function(e){return e},e.prototype.identify=function(e){},e.prototype.gc=function(){return[]},e.prototype.modify=function(e){return!1},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,en.pi)((0,en.pi)({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,en.pi)((0,en.pi)({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))},e.prototype.writeQuery=function(e){var t=e.id,n=e.data,r=(0,en._T)(e,["id","data"]);return this.write(Object.assign(r,{dataId:t||"ROOT_QUERY",result:n}))},e.prototype.writeFragment=function(e){var t=e.id,n=e.data,r=e.fragment,i=e.fragmentName,a=(0,en._T)(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(a,{query:this.getFragmentDoc(r,i),dataId:t,result:n}))},e.prototype.updateQuery=function(e,t){return this.batch({update:function(n){var r=n.readQuery(e),i=t(r);return null==i?r:(n.writeQuery((0,en.pi)((0,en.pi)({},e),{data:i})),i)}})},e.prototype.updateFragment=function(e,t){return this.batch({update:function(n){var r=n.readFragment(e),i=t(r);return null==i?r:(n.writeFragment((0,en.pi)((0,en.pi)({},e),{data:i})),i)}})},e}(),is=function(e){function t(n,r,i,a){var o,s=e.call(this,n)||this;if(s.message=n,s.path=r,s.query=i,s.variables=a,Array.isArray(s.path)){s.missing=s.message;for(var u=s.path.length-1;u>=0;--u)s.missing=((o={})[s.path[u]]=s.missing,o)}else s.missing=s.path;return s.__proto__=t.prototype,s}return(0,en.ZT)(t,e),t}(Error),iu=__webpack_require__(10542),ic=Object.prototype.hasOwnProperty;function il(e){return null==e}function id(e,t){var n=e.__typename,r=e.id,i=e._id;if("string"==typeof n&&(t&&(t.keyObject=il(r)?il(i)?void 0:{_id:i}:{id:r}),il(r)&&!il(i)&&(r=i),!il(r)))return"".concat(n,":").concat("number"==typeof r||"string"==typeof r?r:JSON.stringify(r))}var ih={dataIdFromObject:id,addTypename:!0,resultCaching:!0,canonizeResults:!1};function ip(e){return(0,n1.o)(ih,e)}function ib(e){var t=e.canonizeResults;return void 0===t?ih.canonizeResults:t}function im(e,t){return eD(t)?e.get(t.__ref,"__typename"):t&&t.__typename}var ig=/^[_a-z][_0-9a-z]*/i;function iv(e){var t=e.match(ig);return t?t[0]:e}function iy(e,t,n){return!!(0,eO.s)(t)&&((0,tP.k)(t)?t.every(function(t){return iy(e,t,n)}):e.selections.every(function(e){if(eQ(e)&&td(e,n)){var r=eX(e);return ic.call(t,r)&&(!e.selectionSet||iy(e.selectionSet,t[r],n))}return!0}))}function iw(e){return(0,eO.s)(e)&&!eD(e)&&!(0,tP.k)(e)}function i_(){return new tB}function iE(e,t){var n=eL(e4(e));return{fragmentMap:n,lookupFragment:function(e){var r=n[e];return!r&&t&&(r=t.lookup(e)),r||null}}}var iS=Object.create(null),ik=function(){return iS},ix=Object.create(null),iT=function(){function e(e,t){var n=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(e,t){return(0,iu.J)(eD(e)?n.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return eD(e)?n.has(e.__ref):"object"==typeof e},this.toReference=function(e,t){if("string"==typeof e)return eI(e);if(eD(e))return e;var r=n.policies.identify(e)[0];if(r){var i=eI(r);return t&&n.merge(r,e),i}}}return e.prototype.toObject=function(){return(0,en.pi)({},this.data)},e.prototype.has=function(e){return void 0!==this.lookup(e,!0)},e.prototype.get=function(e,t){if(this.group.depend(e,t),ic.call(this.data,e)){var n=this.data[e];if(n&&ic.call(n,t))return n[t]}return"__typename"===t&&ic.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof iL?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return(t&&this.group.depend(e,"__exists"),ic.call(this.data,e))?this.data[e]:this instanceof iL?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var n,r=this;eD(e)&&(e=e.__ref),eD(t)&&(t=t.__ref);var i="string"==typeof e?this.lookup(n=e):e,a="string"==typeof t?this.lookup(n=t):t;if(a){__DEV__?(0,Q.kG)("string"==typeof n,"store.merge expects a string ID"):(0,Q.kG)("string"==typeof n,1);var o=new tB(iI).merge(i,a);if(this.data[n]=o,o!==i&&(delete this.refs[n],this.group.caching)){var s=Object.create(null);i||(s.__exists=1),Object.keys(a).forEach(function(e){if(!i||i[e]!==o[e]){s[e]=1;var t=iv(e);t===e||r.policies.hasKeyArgs(o.__typename,t)||(s[t]=1),void 0!==o[e]||r instanceof iL||delete o[e]}}),s.__typename&&!(i&&i.__typename)&&this.policies.rootTypenamesById[n]===o.__typename&&delete s.__typename,Object.keys(s).forEach(function(e){return r.group.dirty(n,e)})}}},e.prototype.modify=function(e,t){var n=this,r=this.lookup(e);if(r){var i=Object.create(null),a=!1,o=!0,s={DELETE:iS,INVALIDATE:ix,isReference:eD,toReference:this.toReference,canRead:this.canRead,readField:function(t,r){return n.policies.readField("string"==typeof t?{fieldName:t,from:r||eI(e)}:t,{store:n})}};if(Object.keys(r).forEach(function(u){var c=iv(u),l=r[u];if(void 0!==l){var f="function"==typeof t?t:t[u]||t[c];if(f){var d=f===ik?iS:f((0,iu.J)(l),(0,en.pi)((0,en.pi)({},s),{fieldName:c,storeFieldName:u,storage:n.getStorage(e,u)}));d===ix?n.group.dirty(e,u):(d===iS&&(d=void 0),d!==l&&(i[u]=d,a=!0,l=d))}void 0!==l&&(o=!1)}}),a)return this.merge(e,i),o&&(this instanceof iL?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},e.prototype.delete=function(e,t,n){var r,i=this.lookup(e);if(i){var a=this.getFieldValue(i,"__typename"),o=t&&n?this.policies.getStoreFieldName({typename:a,fieldName:t,args:n}):t;return this.modify(e,o?((r={})[o]=ik,r):ik)}return!1},e.prototype.evict=function(e,t){var n=!1;return e.id&&(ic.call(this.data,e.id)&&(n=this.delete(e.id,e.fieldName,e.args)),this instanceof iL&&this!==t&&(n=this.parent.evict(e,t)||n),(e.fieldName||n)&&this.group.dirty(e.id,e.fieldName||"__exists")),n},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var e=this,t=this.toObject(),n=[];return this.getRootIdSet().forEach(function(t){ic.call(e.policies.rootTypenamesById,t)||n.push(t)}),n.length&&(t.__META={extraRootIds:n.sort()}),t},e.prototype.replace=function(e){var t=this;if(Object.keys(this.data).forEach(function(n){e&&ic.call(e,n)||t.delete(n)}),e){var n=e.__META,r=(0,en._T)(e,["__META"]);Object.keys(r).forEach(function(e){t.merge(e,r[e])}),n&&n.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},e.prototype.release=function(e){if(this.rootIds[e]>0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof iL?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),n=this.toObject();t.forEach(function(r){ic.call(n,r)&&(Object.keys(e.findChildRefIds(r)).forEach(t.add,t),delete n[r])});var r=Object.keys(n);if(r.length){for(var i=this;i instanceof iL;)i=i.parent;r.forEach(function(e){return i.delete(e)})}return r},e.prototype.findChildRefIds=function(e){if(!ic.call(this.refs,e)){var t=this.refs[e]=Object.create(null),n=this.data[e];if(!n)return t;var r=new Set([n]);r.forEach(function(e){eD(e)&&(t[e.__ref]=!0),(0,eO.s)(e)&&Object.keys(e).forEach(function(t){var n=e[t];(0,eO.s)(n)&&r.add(n)})})}return this.refs[e]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),iM=function(){function e(e,t){void 0===t&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?rW():null,this.keyMaker=new n_(t_.mr)},e.prototype.depend=function(e,t){if(this.d){this.d(iO(e,t));var n=iv(t);n!==t&&this.d(iO(e,n)),this.parent&&this.parent.depend(e,t)}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty(iO(e,t),"__exists"===t?"forget":"setDirty")},e}();function iO(e,t){return t+"#"+e}function iA(e,t){iD(e)&&e.group.depend(t,"__exists")}!function(e){var t=function(e){function t(t){var n=t.policies,r=t.resultCaching,i=void 0===r||r,a=t.seed,o=e.call(this,n,new iM(i))||this;return o.stump=new iC(o),o.storageTrie=new n_(t_.mr),a&&o.replace(a),o}return(0,en.ZT)(t,e),t.prototype.addLayer=function(e,t){return this.stump.addLayer(e,t)},t.prototype.removeLayer=function(){return this},t.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},t}(e);e.Root=t}(iT||(iT={}));var iL=function(e){function t(t,n,r,i){var a=e.call(this,n.policies,i)||this;return a.id=t,a.parent=n,a.replay=r,a.group=i,r(a),a}return(0,en.ZT)(t,e),t.prototype.addLayer=function(e,n){return new t(e,this,n,this.group)},t.prototype.removeLayer=function(e){var t=this,n=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach(function(e){var r=t.data[e],i=n.lookup(e);i?r?r!==i&&Object.keys(r).forEach(function(n){(0,nm.D)(r[n],i[n])||t.group.dirty(e,n)}):(t.group.dirty(e,"__exists"),Object.keys(i).forEach(function(n){t.group.dirty(e,n)})):t.delete(e)}),n):n===this.parent?this:n.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return(0,en.pi)((0,en.pi)({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var n=this.parent.findChildRefIds(t);return ic.call(this.data,t)?(0,en.pi)((0,en.pi)({},n),e.prototype.findChildRefIds.call(this,t)):n},t.prototype.getStorage=function(){for(var e=this.parent;e.parent;)e=e.parent;return e.getStorage.apply(e,arguments)},t}(iT),iC=function(e){function t(t){return e.call(this,"EntityStore.Stump",t,function(){},new iM(t.group.caching,t.group))||this}return(0,en.ZT)(t,e),t.prototype.removeLayer=function(){return this},t.prototype.merge=function(){return this.parent.merge.apply(this.parent,arguments)},t}(iL);function iI(e,t,n){var r=e[n],i=t[n];return(0,nm.D)(r,i)?r:i}function iD(e){return!!(e instanceof iT&&e.group.caching)}function iN(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults,]}var iP=function(){function e(e){var t=this;this.knownResults=new(t_.mr?WeakMap:Map),this.config=(0,n1.o)(e,{addTypename:!1!==e.addTypename,canonizeResults:ib(e)}),this.canon=e.canon||new nk,this.executeSelectionSet=rZ(function(e){var n,r=e.context.canonizeResults,i=iN(e);i[3]=!r;var a=(n=t.executeSelectionSet).peek.apply(n,i);return a?r?(0,en.pi)((0,en.pi)({},a),{result:t.canon.admit(a.result)}):a:(iA(e.context.store,e.enclosingRef.__ref),t.execSelectionSetImpl(e))},{max:this.config.resultCacheMaxSize,keyArgs:iN,makeCacheKey:function(e,t,n,r){if(iD(n.store))return n.store.makeCacheKey(e,eD(t)?t.__ref:t,n.varString,r)}}),this.executeSubSelectedArray=rZ(function(e){return iA(e.context.store,e.enclosingRef.__ref),t.execSubSelectedArrayImpl(e)},{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var t=e.field,n=e.array,r=e.context;if(iD(r.store))return r.store.makeCacheKey(t,n,r.varString)}})}return e.prototype.resetCanon=function(){this.canon=new nk},e.prototype.diffQueryAgainstStore=function(e){var t,n=e.store,r=e.query,i=e.rootId,a=void 0===i?"ROOT_QUERY":i,o=e.variables,s=e.returnPartialData,u=void 0===s||s,c=e.canonizeResults,l=void 0===c?this.config.canonizeResults:c,f=this.config.cache.policies;o=(0,en.pi)((0,en.pi)({},e9(e6(r))),o);var d=eI(a),h=this.executeSelectionSet({selectionSet:e8(r).selectionSet,objectOrReference:d,enclosingRef:d,context:(0,en.pi)({store:n,query:r,policies:f,variables:o,varString:nx(o),canonizeResults:l},iE(r,this.config.fragments))});if(h.missing&&(t=[new is(iR(h.missing),h.missing,r,o)],!u))throw t[0];return{result:h.result,complete:!t,missing:t}},e.prototype.isFresh=function(e,t,n,r){if(iD(r.store)&&this.knownResults.get(e)===n){var i=this.executeSelectionSet.peek(n,t,r,this.canon.isKnown(e));if(i&&e===i.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t,n=this,r=e.selectionSet,i=e.objectOrReference,a=e.enclosingRef,o=e.context;if(eD(i)&&!o.policies.rootTypenamesById[i.__ref]&&!o.store.has(i.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(i.__ref," object")};var s=o.variables,u=o.policies,c=o.store.getFieldValue(i,"__typename"),l=[],f=new tB;function d(e,n){var r;return e.missing&&(t=f.merge(t,((r={})[n]=e.missing,r))),e.result}this.config.addTypename&&"string"==typeof c&&!u.rootIdsByTypename[c]&&l.push({__typename:c});var h=new Set(r.selections);h.forEach(function(e){var r,p;if(td(e,s)){if(eQ(e)){var b=u.readField({fieldName:e.name.value,field:e,variables:o.variables,from:i},o),m=eX(e);void 0===b?nj.added(e)||(t=f.merge(t,((r={})[m]="Can't find field '".concat(e.name.value,"' on ").concat(eD(i)?i.__ref+" object":"object "+JSON.stringify(i,null,2)),r))):(0,tP.k)(b)?b=d(n.executeSubSelectedArray({field:e,array:b,enclosingRef:a,context:o}),m):e.selectionSet?null!=b&&(b=d(n.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:b,enclosingRef:eD(b)?b:a,context:o}),m)):o.canonizeResults&&(b=n.canon.pass(b)),void 0!==b&&l.push(((p={})[m]=b,p))}else{var g=eC(e,o.lookupFragment);if(!g&&e.kind===nL.h.FRAGMENT_SPREAD)throw __DEV__?new Q.ej("No fragment named ".concat(e.name.value)):new Q.ej(5);g&&u.fragmentMatches(g,c)&&g.selectionSet.selections.forEach(h.add,h)}}});var p={result:tF(l),missing:t},b=o.canonizeResults?this.canon.admit(p):(0,iu.J)(p);return b.result&&this.knownResults.set(b.result,r),b},e.prototype.execSubSelectedArrayImpl=function(e){var t,n=this,r=e.field,i=e.array,a=e.enclosingRef,o=e.context,s=new tB;function u(e,n){var r;return e.missing&&(t=s.merge(t,((r={})[n]=e.missing,r))),e.result}return r.selectionSet&&(i=i.filter(o.store.canRead)),i=i.map(function(e,t){return null===e?null:(0,tP.k)(e)?u(n.executeSubSelectedArray({field:r,array:e,enclosingRef:a,context:o}),t):r.selectionSet?u(n.executeSelectionSet({selectionSet:r.selectionSet,objectOrReference:e,enclosingRef:eD(e)?e:a,context:o}),t):(__DEV__&&ij(o.store,r,e),e)}),{result:o.canonizeResults?this.canon.admit(i):i,missing:t}},e}();function iR(e){try{JSON.stringify(e,function(e,t){if("string"==typeof t)throw t;return t})}catch(t){return t}}function ij(e,t,n){if(!t.selectionSet){var r=new Set([n]);r.forEach(function(n){(0,eO.s)(n)&&(__DEV__?(0,Q.kG)(!eD(n),"Missing selection set for object of type ".concat(im(e,n)," returned for query field ").concat(t.name.value)):(0,Q.kG)(!eD(n),6),Object.values(n).forEach(r.add,r))})}}function iF(e){var t=nG("stringifyForDisplay");return JSON.stringify(e,function(e,n){return void 0===n?t:n}).split(JSON.stringify(t)).join("<undefined>")}var iY=Object.create(null);function iB(e){var t=JSON.stringify(e);return iY[t]||(iY[t]=Object.create(null))}function iU(e){var t=iB(e);return t.keyFieldsFn||(t.keyFieldsFn=function(t,n){var r=function(e,t){return n.readField(t,e)},i=n.keyObject=i$(e,function(e){var i=iW(n.storeObject,e,r);return void 0===i&&t!==n.storeObject&&ic.call(t,e[0])&&(i=iW(t,e,iG)),__DEV__?(0,Q.kG)(void 0!==i,"Missing field '".concat(e.join("."),"' while extracting keyFields from ").concat(JSON.stringify(t))):(0,Q.kG)(void 0!==i,2),i});return"".concat(n.typename,":").concat(JSON.stringify(i))})}function iH(e){var t=iB(e);return t.keyArgsFn||(t.keyArgsFn=function(t,n){var r=n.field,i=n.variables,a=n.fieldName,o=JSON.stringify(i$(e,function(e){var n=e[0],a=n.charAt(0);if("@"===a){if(r&&(0,tP.O)(r.directives)){var o=n.slice(1),s=r.directives.find(function(e){return e.name.value===o}),u=s&&eZ(s,i);return u&&iW(u,e.slice(1))}return}if("$"===a){var c=n.slice(1);if(i&&ic.call(i,c)){var l=e.slice(0);return l[0]=c,iW(i,l)}return}if(t)return iW(t,e)}));return(t||"{}"!==o)&&(a+=":"+o),a})}function i$(e,t){var n=new tB;return iz(e).reduce(function(e,r){var i,a=t(r);if(void 0!==a){for(var o=r.length-1;o>=0;--o)a=((i={})[r[o]]=a,i);e=n.merge(e,a)}return e},Object.create(null))}function iz(e){var t=iB(e);if(!t.paths){var n=t.paths=[],r=[];e.forEach(function(t,i){(0,tP.k)(t)?(iz(t).forEach(function(e){return n.push(r.concat(e))}),r.length=0):(r.push(t),(0,tP.k)(e[i+1])||(n.push(r.slice(0)),r.length=0))})}return t.paths}function iG(e,t){return e[t]}function iW(e,t,n){return n=n||iG,iK(t.reduce(function e(t,r){return(0,tP.k)(t)?t.map(function(t){return e(t,r)}):t&&n(t,r)},e))}function iK(e){return(0,eO.s)(e)?(0,tP.k)(e)?e.map(iK):i$(Object.keys(e).sort(),function(t){return iW(e,t)}):e}function iV(e){return void 0!==e.args?e.args:e.field?eZ(e.field,e.variables):null}eK.setStringify(nx);var iq=function(){},iZ=function(e,t){return t.fieldName},iX=function(e,t,n){return(0,n.mergeObjects)(e,t)},iJ=function(e,t){return t},iQ=function(){function e(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=(0,en.pi)({dataIdFromObject:id},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return e.prototype.identify=function(e,t){var n,r,i=this,a=t&&(t.typename||(null===(n=t.storeObject)||void 0===n?void 0:n.__typename))||e.__typename;if(a===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var o=t&&t.storeObject||e,s=(0,en.pi)((0,en.pi)({},t),{typename:a,storeObject:o,readField:t&&t.readField||function(){var e=i0(arguments,o);return i.readField(e,{store:i.cache.data,variables:e.variables})}}),u=a&&this.getTypePolicy(a),c=u&&u.keyFn||this.config.dataIdFromObject;c;){var l=c((0,en.pi)((0,en.pi)({},e),o),s);if((0,tP.k)(l))c=iU(l);else{r=l;break}}return r=r?String(r):void 0,s.keyObject?[r,s.keyObject]:[r]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach(function(n){var r=e[n],i=r.queryType,a=r.mutationType,o=r.subscriptionType,s=(0,en._T)(r,["queryType","mutationType","subscriptionType"]);i&&t.setRootTypename("Query",n),a&&t.setRootTypename("Mutation",n),o&&t.setRootTypename("Subscription",n),ic.call(t.toBeAdded,n)?t.toBeAdded[n].push(s):t.toBeAdded[n]=[s]})},e.prototype.updateTypePolicy=function(e,t){var n=this,r=this.getTypePolicy(e),i=t.keyFields,a=t.fields;function o(e,t){e.merge="function"==typeof t?t:!0===t?iX:!1===t?iJ:e.merge}o(r,t.merge),r.keyFn=!1===i?iq:(0,tP.k)(i)?iU(i):"function"==typeof i?i:r.keyFn,a&&Object.keys(a).forEach(function(t){var r=n.getFieldPolicy(e,t,!0),i=a[t];if("function"==typeof i)r.read=i;else{var s=i.keyArgs,u=i.read,c=i.merge;r.keyFn=!1===s?iZ:(0,tP.k)(s)?iH(s):"function"==typeof s?s:r.keyFn,"function"==typeof u&&(r.read=u),o(r,c)}r.read&&r.merge&&(r.keyFn=r.keyFn||iZ)})},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var n="ROOT_"+e.toUpperCase(),r=this.rootTypenamesById[n];t!==r&&(__DEV__?(0,Q.kG)(!r||r===e,"Cannot change root ".concat(e," __typename more than once")):(0,Q.kG)(!r||r===e,3),r&&delete this.rootIdsByTypename[r],this.rootIdsByTypename[t]=n,this.rootTypenamesById[n]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach(function(n){t.getSupertypeSet(n,!0),e[n].forEach(function(e){t.getSupertypeSet(e,!0).add(n);var r=e.match(ig);r&&r[0]===e||t.fuzzySubtypes.set(e,RegExp(e))})})},e.prototype.getTypePolicy=function(e){var t=this;if(!ic.call(this.typePolicies,e)){var n=this.typePolicies[e]=Object.create(null);n.fields=Object.create(null);var r=this.supertypeMap.get(e);r&&r.size&&r.forEach(function(e){var r=t.getTypePolicy(e),i=r.fields;Object.assign(n,(0,en._T)(r,["fields"])),Object.assign(n.fields,i)})}var i=this.toBeAdded[e];return i&&i.length&&i.splice(0).forEach(function(n){t.updateTypePolicy(e,n)}),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t,n){if(e){var r=this.getTypePolicy(e).fields;return r[t]||n&&(r[t]=Object.create(null))}},e.prototype.getSupertypeSet=function(e,t){var n=this.supertypeMap.get(e);return!n&&t&&this.supertypeMap.set(e,n=new Set),n},e.prototype.fragmentMatches=function(e,t,n,r){var i=this;if(!e.typeCondition)return!0;if(!t)return!1;var a=e.typeCondition.name.value;if(t===a)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(a))for(var o=this.getSupertypeSet(t,!0),s=[o],u=function(e){var t=i.getSupertypeSet(e,!1);t&&t.size&&0>s.indexOf(t)&&s.push(t)},c=!!(n&&this.fuzzySubtypes.size),l=!1,f=0;f<s.length;++f){var d=s[f];if(d.has(a))return o.has(a)||(l&&__DEV__&&Q.kG.warn("Inferring subtype ".concat(t," of supertype ").concat(a)),o.add(a)),!0;d.forEach(u),c&&f===s.length-1&&iy(e.selectionSet,n,r)&&(c=!1,l=!0,this.fuzzySubtypes.forEach(function(e,n){var r=t.match(e);r&&r[0]===t&&u(n)}))}return!1},e.prototype.hasKeyArgs=function(e,t){var n=this.getFieldPolicy(e,t,!1);return!!(n&&n.keyFn)},e.prototype.getStoreFieldName=function(e){var t,n=e.typename,r=e.fieldName,i=this.getFieldPolicy(n,r,!1),a=i&&i.keyFn;if(a&&n)for(var o={typename:n,fieldName:r,field:e.field||null,variables:e.variables},s=iV(e);a;){var u=a(s,o);if((0,tP.k)(u))a=iH(u);else{t=u||r;break}}return(void 0===t&&(t=e.field?eG(e.field,e.variables):eK(r,iV(e))),!1===t)?r:r===iv(t)?t:r+":"+t},e.prototype.readField=function(e,t){var n=e.from;if(n&&(e.field||e.fieldName)){if(void 0===e.typename){var r=t.store.getFieldValue(n,"__typename");r&&(e.typename=r)}var i=this.getStoreFieldName(e),a=iv(i),o=t.store.getFieldValue(n,i),s=this.getFieldPolicy(e.typename,a,!1),u=s&&s.read;if(u){var c=i1(this,n,e,t,t.store.getStorage(eD(n)?n.__ref:n,i));return rX.withValue(this.cache,u,[o,c])}return o}},e.prototype.getReadFunction=function(e,t){var n=this.getFieldPolicy(e,t,!1);return n&&n.read},e.prototype.getMergeFunction=function(e,t,n){var r=this.getFieldPolicy(e,t,!1),i=r&&r.merge;return!i&&n&&(i=(r=this.getTypePolicy(n))&&r.merge),i},e.prototype.runMergeFunction=function(e,t,n,r,i){var a=n.field,o=n.typename,s=n.merge;return s===iX?i2(r.store)(e,t):s===iJ?t:(r.overwrite&&(e=void 0),s(e,t,i1(this,void 0,{typename:o,fieldName:a.name.value,field:a,variables:r.variables},r,i||Object.create(null))))},e}();function i1(e,t,n,r,i){var a=e.getStoreFieldName(n),o=iv(a),s=n.variables||r.variables,u=r.store,c=u.toReference,l=u.canRead;return{args:iV(n),field:n.field||null,fieldName:o,storeFieldName:a,variables:s,isReference:eD,toReference:c,storage:i,cache:e.cache,canRead:l,readField:function(){return e.readField(i0(arguments,t,s),r)},mergeObjects:i2(r.store)}}function i0(e,t,n){var r,i=e[0],a=e[1],o=e.length;return"string"==typeof i?r={fieldName:i,from:o>1?a:t}:(r=(0,en.pi)({},i),ic.call(r,"from")||(r.from=t)),__DEV__&&void 0===r.from&&__DEV__&&Q.kG.warn("Undefined 'from' passed to readField with arguments ".concat(iF(Array.from(e)))),void 0===r.variables&&(r.variables=n),r}function i2(e){return function(t,n){if((0,tP.k)(t)||(0,tP.k)(n))throw __DEV__?new Q.ej("Cannot automatically merge arrays"):new Q.ej(4);if((0,eO.s)(t)&&(0,eO.s)(n)){var r=e.getFieldValue(t,"__typename"),i=e.getFieldValue(n,"__typename");if(r&&i&&r!==i)return n;if(eD(t)&&iw(n))return e.merge(t.__ref,n),t;if(iw(t)&&eD(n))return e.merge(t,n.__ref),n;if(iw(t)&&iw(n))return(0,en.pi)((0,en.pi)({},t),n)}return n}}function i3(e,t,n){var r="".concat(t).concat(n),i=e.flavors.get(r);return i||e.flavors.set(r,i=e.clientOnly===t&&e.deferred===n?e:(0,en.pi)((0,en.pi)({},e),{clientOnly:t,deferred:n})),i}var i4=function(){function e(e,t,n){this.cache=e,this.reader=t,this.fragments=n}return e.prototype.writeToStore=function(e,t){var n=this,r=t.query,i=t.result,a=t.dataId,o=t.variables,s=t.overwrite,u=e2(r),c=i_();o=(0,en.pi)((0,en.pi)({},e9(u)),o);var l=(0,en.pi)((0,en.pi)({store:e,written:Object.create(null),merge:function(e,t){return c.merge(e,t)},variables:o,varString:nx(o)},iE(r,this.fragments)),{overwrite:!!s,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),f=this.processSelectionSet({result:i||Object.create(null),dataId:a,selectionSet:u.selectionSet,mergeTree:{map:new Map},context:l});if(!eD(f))throw __DEV__?new Q.ej("Could not identify object ".concat(JSON.stringify(i))):new Q.ej(7);return l.incomingById.forEach(function(t,r){var i=t.storeObject,a=t.mergeTree,o=t.fieldNodeSet,s=eI(r);if(a&&a.map.size){var u=n.applyMerges(a,s,i,l);if(eD(u))return;i=u}if(__DEV__&&!l.overwrite){var c=Object.create(null);o.forEach(function(e){e.selectionSet&&(c[e.name.value]=!0)});var f=function(e){return!0===c[iv(e)]},d=function(e){var t=a&&a.map.get(e);return Boolean(t&&t.info&&t.info.merge)};Object.keys(i).forEach(function(e){f(e)&&!d(e)&&at(s,i,e,l.store)})}e.merge(r,i)}),e.retain(f.__ref),f},e.prototype.processSelectionSet=function(e){var t=this,n=e.dataId,r=e.result,i=e.selectionSet,a=e.context,o=e.mergeTree,s=this.cache.policies,u=Object.create(null),c=n&&s.rootTypenamesById[n]||eJ(r,i,a.fragmentMap)||n&&a.store.get(n,"__typename");"string"==typeof c&&(u.__typename=c);var l=function(){var e=i0(arguments,u,a.variables);if(eD(e.from)){var t=a.incomingById.get(e.from.__ref);if(t){var n=s.readField((0,en.pi)((0,en.pi)({},e),{from:t.storeObject}),a);if(void 0!==n)return n}}return s.readField(e,a)},f=new Set;this.flattenFields(i,r,a,c).forEach(function(e,n){var i,a=r[eX(n)];if(f.add(n),void 0!==a){var d=s.getStoreFieldName({typename:c,fieldName:n.name.value,field:n,variables:e.variables}),h=i5(o,d),p=t.processFieldValue(a,n,n.selectionSet?i3(e,!1,!1):e,h),b=void 0;n.selectionSet&&(eD(p)||iw(p))&&(b=l("__typename",p));var m=s.getMergeFunction(c,n.name.value,b);m?h.info={field:n,typename:c,merge:m}:i7(o,d),u=e.merge(u,((i={})[d]=p,i))}else __DEV__&&!e.clientOnly&&!e.deferred&&!nj.added(n)&&!s.getReadFunction(c,n.name.value)&&__DEV__&&Q.kG.error("Missing field '".concat(eX(n),"' while writing result ").concat(JSON.stringify(r,null,2)).substring(0,1e3))});try{var d=s.identify(r,{typename:c,selectionSet:i,fragmentMap:a.fragmentMap,storeObject:u,readField:l}),h=d[0],p=d[1];n=n||h,p&&(u=a.merge(u,p))}catch(b){if(!n)throw b}if("string"==typeof n){var m=eI(n),g=a.written[n]||(a.written[n]=[]);if(g.indexOf(i)>=0||(g.push(i),this.reader&&this.reader.isFresh(r,m,i,a)))return m;var v=a.incomingById.get(n);return v?(v.storeObject=a.merge(v.storeObject,u),v.mergeTree=i8(v.mergeTree,o),f.forEach(function(e){return v.fieldNodeSet.add(e)})):a.incomingById.set(n,{storeObject:u,mergeTree:i9(o)?void 0:o,fieldNodeSet:f}),m}return u},e.prototype.processFieldValue=function(e,t,n,r){var i=this;return t.selectionSet&&null!==e?(0,tP.k)(e)?e.map(function(e,a){var o=i.processFieldValue(e,t,n,i5(r,a));return i7(r,a),o}):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:n,mergeTree:r}):__DEV__?nJ(e):e},e.prototype.flattenFields=function(e,t,n,r){void 0===r&&(r=eJ(t,e,n.fragmentMap));var i=new Map,a=this.cache.policies,o=new n_(!1);return function e(s,u){var c=o.lookup(s,u.clientOnly,u.deferred);c.visited||(c.visited=!0,s.selections.forEach(function(o){if(td(o,n.variables)){var s=u.clientOnly,c=u.deferred;if(!(s&&c)&&(0,tP.O)(o.directives)&&o.directives.forEach(function(e){var t=e.name.value;if("client"===t&&(s=!0),"defer"===t){var r=eZ(e,n.variables);r&&!1===r.if||(c=!0)}}),eQ(o)){var l=i.get(o);l&&(s=s&&l.clientOnly,c=c&&l.deferred),i.set(o,i3(n,s,c))}else{var f=eC(o,n.lookupFragment);if(!f&&o.kind===nL.h.FRAGMENT_SPREAD)throw __DEV__?new Q.ej("No fragment named ".concat(o.name.value)):new Q.ej(8);f&&a.fragmentMatches(f,r,t,n.variables)&&e(f.selectionSet,i3(n,s,c))}}}))}(e,n),i},e.prototype.applyMerges=function(e,t,n,r,i){var a=this;if(e.map.size&&!eD(n)){var o,s,u=!(0,tP.k)(n)&&(eD(t)||iw(t))?t:void 0,c=n;u&&!i&&(i=[eD(u)?u.__ref:u]);var l=function(e,t){return(0,tP.k)(e)?"number"==typeof t?e[t]:void 0:r.store.getFieldValue(e,String(t))};e.map.forEach(function(e,t){var n=l(u,t),o=l(c,t);if(void 0!==o){i&&i.push(t);var f=a.applyMerges(e,n,o,r,i);f!==o&&(s=s||new Map).set(t,f),i&&(0,Q.kG)(i.pop()===t)}}),s&&(n=(0,tP.k)(c)?c.slice(0):(0,en.pi)({},c),s.forEach(function(e,t){n[t]=e}))}return e.info?this.cache.policies.runMergeFunction(t,n,e.info,r,i&&(o=r.store).getStorage.apply(o,i)):n},e}(),i6=[];function i5(e,t){var n=e.map;return n.has(t)||n.set(t,i6.pop()||{map:new Map}),n.get(t)}function i8(e,t){if(e===t||!t||i9(t))return e;if(!e||i9(e))return t;var n=e.info&&t.info?(0,en.pi)((0,en.pi)({},e.info),t.info):e.info||t.info,r=e.map.size&&t.map.size,i=r?new Map:e.map.size?e.map:t.map,a={info:n,map:i};if(r){var o=new Set(t.map.keys());e.map.forEach(function(e,n){a.map.set(n,i8(e,t.map.get(n))),o.delete(n)}),o.forEach(function(n){a.map.set(n,i8(t.map.get(n),e.map.get(n)))})}return a}function i9(e){return!e||!(e.info||e.map.size)}function i7(e,t){var n=e.map,r=n.get(t);r&&i9(r)&&(i6.push(r),n.delete(t))}var ae=new Set;function at(e,t,n,r){var i=function(e){var t=r.getFieldValue(e,n);return"object"==typeof t&&t},a=i(e);if(a){var o=i(t);if(!(!o||eD(a)||(0,nm.D)(a,o)||Object.keys(a).every(function(e){return void 0!==r.getFieldValue(o,e)}))){var s=r.getFieldValue(e,"__typename")||r.getFieldValue(t,"__typename"),u=iv(n),c="".concat(s,".").concat(u);if(!ae.has(c)){ae.add(c);var l=[];(0,tP.k)(a)||(0,tP.k)(o)||[a,o].forEach(function(e){var t=r.getFieldValue(e,"__typename");"string"!=typeof t||l.includes(t)||l.push(t)}),__DEV__&&Q.kG.warn("Cache data may be lost when replacing the ".concat(u," field of a ").concat(s," object.\n\nThis could cause additional (usually avoidable) network requests to fetch data that were otherwise cached.\n\nTo address this problem (which is not a bug in Apollo Client), ").concat(l.length?"either ensure all objects of type "+l.join(" and ")+" have an ID or a custom merge function, or ":"","define a custom merge function for the ").concat(c," field, so InMemoryCache can safely merge these objects:\n\n existing: ").concat(JSON.stringify(a).slice(0,1e3),"\n incoming: ").concat(JSON.stringify(o).slice(0,1e3),"\n\nFor more information about these options, please refer to the documentation:\n\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\n"))}}}}var an=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;return n.watches=new Set,n.typenameDocumentCache=new Map,n.makeVar=r2,n.txCount=0,n.config=ip(t),n.addTypename=!!n.config.addTypename,n.policies=new iQ({cache:n,dataIdFromObject:n.config.dataIdFromObject,possibleTypes:n.config.possibleTypes,typePolicies:n.config.typePolicies}),n.init(),n}return(0,en.ZT)(t,e),t.prototype.init=function(){var e=this.data=new iT.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()},t.prototype.resetResultCache=function(e){var t=this,n=this.storeReader,r=this.config.fragments;this.storeWriter=new i4(this,this.storeReader=new iP({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:ib(this.config),canon:e?void 0:n&&n.canon,fragments:r}),r),this.maybeBroadcastWatch=rZ(function(e,n){return t.broadcastWatch(e,n)},{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var n=e.optimistic?t.optimisticData:t.data;if(iD(n)){var r=e.optimistic,i=e.id,a=e.variables;return n.makeCacheKey(e.query,e.callback,nx({optimistic:r,id:i,variables:a}))}}}),new Set([this.data.group,this.optimisticData.group,]).forEach(function(e){return e.resetCaching()})},t.prototype.restore=function(e){return this.init(),e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).extract()},t.prototype.read=function(e){var t=e.returnPartialData,n=void 0!==t&&t;try{return this.storeReader.diffQueryAgainstStore((0,en.pi)((0,en.pi)({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:n})).result||null}catch(r){if(r instanceof is)return null;throw r}},t.prototype.write=function(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.modify=function(e){if(ic.call(e,"id")&&!e.id)return!1;var t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore((0,en.pi)((0,en.pi)({},e),{store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(e){var t=this;return this.watches.size||r0(this),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),function(){t.watches.delete(e)&&!t.watches.size&&r1(t),t.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(e){nx.reset();var t=this.optimisticData.gc();return e&&!this.txCount&&(e.resetResultCache?this.resetResultCache(e.resetResultIdentities):e.resetResultIdentities&&this.storeReader.resetCanon()),t},t.prototype.retain=function(e,t){return(t?this.optimisticData:this.data).retain(e)},t.prototype.release=function(e,t){return(t?this.optimisticData:this.data).release(e)},t.prototype.identify=function(e){if(eD(e))return e.__ref;try{return this.policies.identify(e)[0]}catch(t){__DEV__&&Q.kG.warn(t)}},t.prototype.evict=function(e){if(!e.id){if(ic.call(e,"id"))return!1;e=(0,en.pi)((0,en.pi)({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.reset=function(e){var t=this;return this.init(),nx.reset(),e&&e.discardWatches?(this.watches.forEach(function(e){return t.maybeBroadcastWatch.forget(e)}),this.watches.clear(),r1(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){var t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())},t.prototype.batch=function(e){var t,n=this,r=e.update,i=e.optimistic,a=void 0===i||i,o=e.removeOptimistic,s=e.onWatchUpdated,u=function(e){var i=n,a=i.data,o=i.optimisticData;++n.txCount,e&&(n.data=n.optimisticData=e);try{return t=r(n)}finally{--n.txCount,n.data=a,n.optimisticData=o}},c=new Set;return s&&!this.txCount&&this.broadcastWatches((0,en.pi)((0,en.pi)({},e),{onWatchUpdated:function(e){return c.add(e),!1}})),"string"==typeof a?this.optimisticData=this.optimisticData.addLayer(a,u):!1===a?u(this.data):u(),"string"==typeof o&&(this.optimisticData=this.optimisticData.removeLayer(o)),s&&c.size?(this.broadcastWatches((0,en.pi)((0,en.pi)({},e),{onWatchUpdated:function(e,t){var n=s.call(this,e,t);return!1!==n&&c.delete(e),n}})),c.size&&c.forEach(function(e){return n.maybeBroadcastWatch.dirty(e)})):this.broadcastWatches(e),t},t.prototype.performTransaction=function(e,t){return this.batch({update:e,optimistic:t||null!==t})},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.typenameDocumentCache.get(e);return t||(t=nj(e),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}return e},t.prototype.transformForLink=function(e){var t=this.config.fragments;return t?t.transform(e):e},t.prototype.broadcastWatches=function(e){var t=this;this.txCount||this.watches.forEach(function(n){return t.maybeBroadcastWatch(n,e)})},t.prototype.broadcastWatch=function(e,t){var n=e.lastDiff,r=this.diff(e);(!t||(e.optimistic&&"string"==typeof t.optimistic&&(r.fromOptimisticTransaction=!0),!t.onWatchUpdated||!1!==t.onWatchUpdated.call(this,e,r,n)))&&(n&&(0,nm.D)(n.result,r.result)||e.callback(e.lastDiff=r,n))},t}(io),ar={possibleTypes:{ApproveJobProposalSpecPayload:["ApproveJobProposalSpecSuccess","JobAlreadyExistsError","NotFoundError"],BridgePayload:["Bridge","NotFoundError"],CancelJobProposalSpecPayload:["CancelJobProposalSpecSuccess","NotFoundError"],ChainPayload:["Chain","NotFoundError"],CreateAPITokenPayload:["CreateAPITokenSuccess","InputErrors"],CreateBridgePayload:["CreateBridgeSuccess"],CreateCSAKeyPayload:["CSAKeyExistsError","CreateCSAKeySuccess"],CreateFeedsManagerChainConfigPayload:["CreateFeedsManagerChainConfigSuccess","InputErrors","NotFoundError"],CreateFeedsManagerPayload:["CreateFeedsManagerSuccess","DuplicateFeedsManagerError","InputErrors","NotFoundError","SingleFeedsManagerError"],CreateJobPayload:["CreateJobSuccess","InputErrors"],CreateOCR2KeyBundlePayload:["CreateOCR2KeyBundleSuccess"],CreateOCRKeyBundlePayload:["CreateOCRKeyBundleSuccess"],CreateP2PKeyPayload:["CreateP2PKeySuccess"],DeleteAPITokenPayload:["DeleteAPITokenSuccess","InputErrors"],DeleteBridgePayload:["DeleteBridgeConflictError","DeleteBridgeInvalidNameError","DeleteBridgeSuccess","NotFoundError"],DeleteCSAKeyPayload:["DeleteCSAKeySuccess","NotFoundError"],DeleteFeedsManagerChainConfigPayload:["DeleteFeedsManagerChainConfigSuccess","NotFoundError"],DeleteJobPayload:["DeleteJobSuccess","NotFoundError"],DeleteOCR2KeyBundlePayload:["DeleteOCR2KeyBundleSuccess","NotFoundError"],DeleteOCRKeyBundlePayload:["DeleteOCRKeyBundleSuccess","NotFoundError"],DeleteP2PKeyPayload:["DeleteP2PKeySuccess","NotFoundError"],DeleteVRFKeyPayload:["DeleteVRFKeySuccess","NotFoundError"],DisableFeedsManagerPayload:["DisableFeedsManagerSuccess","NotFoundError"],DismissJobErrorPayload:["DismissJobErrorSuccess","NotFoundError"],EnableFeedsManagerPayload:["EnableFeedsManagerSuccess","NotFoundError"],Error:["CSAKeyExistsError","DeleteBridgeConflictError","DeleteBridgeInvalidNameError","DuplicateFeedsManagerError","InputError","JobAlreadyExistsError","NotFoundError","RunJobCannotRunError","SingleFeedsManagerError"],EthTransactionPayload:["EthTransaction","NotFoundError"],FeaturesPayload:["Features"],FeedsManagerPayload:["FeedsManager","NotFoundError"],GetSQLLoggingPayload:["SQLLogging"],GlobalLogLevelPayload:["GlobalLogLevel"],JobPayload:["Job","NotFoundError"],JobProposalPayload:["JobProposal","NotFoundError"],JobRunPayload:["JobRun","NotFoundError"],JobSpec:["BlockHeaderFeederSpec","BlockhashStoreSpec","BootstrapSpec","CronSpec","DirectRequestSpec","FluxMonitorSpec","GatewaySpec","KeeperSpec","OCR2Spec","OCRSpec","StandardCapabilitiesSpec","StreamSpec","VRFSpec","WebhookSpec","WorkflowSpec"],NodePayload:["Node","NotFoundError"],PaginatedPayload:["BridgesPayload","ChainsPayload","EthTransactionAttemptsPayload","EthTransactionsPayload","JobRunsPayload","JobsPayload","NodesPayload"],RejectJobProposalSpecPayload:["NotFoundError","RejectJobProposalSpecSuccess"],RunJobPayload:["NotFoundError","RunJobCannotRunError","RunJobSuccess"],SetGlobalLogLevelPayload:["InputErrors","SetGlobalLogLevelSuccess"],SetSQLLoggingPayload:["SetSQLLoggingSuccess"],SetServicesLogLevelsPayload:["InputErrors","SetServicesLogLevelsSuccess"],UpdateBridgePayload:["NotFoundError","UpdateBridgeSuccess"],UpdateFeedsManagerChainConfigPayload:["InputErrors","NotFoundError","UpdateFeedsManagerChainConfigSuccess"],UpdateFeedsManagerPayload:["InputErrors","NotFoundError","UpdateFeedsManagerSuccess"],UpdateJobProposalSpecDefinitionPayload:["NotFoundError","UpdateJobProposalSpecDefinitionSuccess"],UpdatePasswordPayload:["InputErrors","UpdatePasswordSuccess"],VRFKeyPayload:["NotFoundError","VRFKeySuccess"]}};let ai=ar;var aa=(r=void 0,location.origin),ao=new nh({uri:"".concat(aa,"/query"),credentials:"include"}),as=new ia({cache:new an({possibleTypes:ai.possibleTypes}),link:ao});if(a.Z.locale(o),u().defaultFormat="YYYY-MM-DD h:mm:ss A","undefined"!=typeof document){var au,ac,al=f().hydrate;ac=X,al(c.createElement(et,{client:as},c.createElement(d.zj,null,c.createElement(i.MuiThemeProvider,{theme:J.r},c.createElement(ac,null)))),document.getElementById("root"))}})()})(); \ No newline at end of file +`+(a!==i?`result of cast: ${a}`:""))}return r}_cast(e,t){let n=void 0===e?e:this.transforms.reduce((t,n)=>n.call(this,t,e,this),e);return void 0===n&&(n=this.getDefault()),n}_validate(e,t={},n){let{sync:r,path:i,from:a=[],originalValue:o=e,strict:s=this.spec.strict,abortEarly:u=this.spec.abortEarly}=t,c=e;s||(c=this._cast(c,pB({assert:!1},t)));let l={value:c,path:i,options:t,originalValue:o,schema:this,label:this.spec.label,sync:r,from:a},f=[];this._typeError&&f.push(this._typeError),this._whitelistError&&f.push(this._whitelistError),this._blacklistError&&f.push(this._blacklistError),pO({args:l,value:c,path:i,sync:r,tests:f,endEarly:u},e=>{if(e)return void n(e,c);pO({tests:this.tests,args:l,path:i,sync:r,value:c,endEarly:u},n)})}validate(e,t,n){let r=this.resolve(pB({},t,{value:e}));return"function"==typeof n?r._validate(e,t,n):new Promise((n,i)=>r._validate(e,t,(e,t)=>{e?i(e):n(t)}))}validateSync(e,t){let n;return this.resolve(pB({},t,{value:e}))._validate(e,pB({},t,{sync:!0}),(e,t)=>{if(e)throw e;n=t}),n}isValid(e,t){return this.validate(e,t).then(()=>!0,e=>{if(pT.isError(e))return!1;throw e})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(n){if(pT.isError(n))return!1;throw n}}_getDefault(){let e=this.spec.default;return null==e?e:"function"==typeof e?e.call(this):pn(e)}getDefault(e){return this.resolve(e||{})._getDefault()}default(e){return 0===arguments.length?this._getDefault():this.clone({default:e})}strict(e=!0){var t=this.clone();return t.spec.strict=e,t}_isPresent(e){return null!=e}defined(e=pf.defined){return this.test({message:e,name:"defined",exclusive:!0,test:e=>void 0!==e})}required(e=pf.required){return this.clone({presence:"required"}).withMutation(t=>t.test({message:e,name:"required",exclusive:!0,test(e){return this.schema._isPresent(e)}}))}notRequired(){var e=this.clone({presence:"optional"});return e.tests=e.tests.filter(e=>"required"!==e.OPTIONS.name),e}nullable(e=!0){return this.clone({nullable:!1!==e})}transform(e){var t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(void 0===(t=1===e.length?"function"==typeof e[0]?{test:e[0]}:e[0]:2===e.length?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]}).message&&(t.message=pf.default),"function"!=typeof t.test)throw TypeError("`test` is a required parameters");let n=this.clone(),r=pR(t),i=t.exclusive||t.name&&!0===n.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(n.exclusiveTests[t.name]=!!t.exclusive),n.tests=n.tests.filter(e=>e.OPTIONS.name!==t.name||!i&&e.OPTIONS.test!==r.OPTIONS.test),n.tests.push(r),n}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let n=this.clone(),r=pS(e).map(e=>new pD(e));return r.forEach(e=>{e.isSibling&&n.deps.push(e.key)}),n.conditions.push(new pE(r,t)),n}typeError(e){var t=this.clone();return t._typeError=pR({message:e,name:"typeError",test(e){return!!(void 0===e||this.schema.isType(e))||this.createError({params:{type:this.schema._type}})}}),t}oneOf(e,t=pf.oneOf){var n=this.clone();return e.forEach(e=>{n._whitelist.add(e),n._blacklist.delete(e)}),n._whitelistError=pR({message:t,name:"oneOf",test(e){if(void 0===e)return!0;let t=this.schema._whitelist;return!!t.has(e,this.resolve)||this.createError({params:{values:t.toArray().join(", ")}})}}),n}notOneOf(e,t=pf.notOneOf){var n=this.clone();return e.forEach(e=>{n._blacklist.add(e),n._whitelist.delete(e)}),n._blacklistError=pR({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist;return!t.has(e,this.resolve)||this.createError({params:{values:t.toArray().join(", ")}})}}),n}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(){let e=this.clone(),{label:t,meta:n}=e.spec,r={meta:n,label:t,type:e.type,oneOf:e._whitelist.describe(),notOneOf:e._blacklist.describe(),tests:e.tests.map(e=>({name:e.OPTIONS.name,params:e.OPTIONS.params})).filter((e,t,n)=>n.findIndex(t=>t.name===e.name)===t)};return r}}for(let pH of(pU.prototype.__isYupSchema__=!0,["validate","validateSync"]))pU.prototype[`${pH}At`]=function(e,t,n={}){let{parent:r,parentPath:i,schema:a}=pF(this,e,t,n.context);return a[pH](r&&r[i],pB({},n,{parent:r,path:e}))};for(let p$ of["equals","is"])pU.prototype[p$]=pU.prototype.oneOf;for(let pz of["not","nope"])pU.prototype[pz]=pU.prototype.notOneOf;pU.prototype.optional=pU.prototype.notRequired;let pG=pU;function pW(){return new pG}pW.prototype=pG.prototype;let pK=e=>null==e;function pV(){return new pq}class pq extends pU{constructor(){super({type:"boolean"}),this.withMutation(()=>{this.transform(function(e){if(!this.isType(e)){if(/^(true|1)$/i.test(String(e)))return!0;if(/^(false|0)$/i.test(String(e)))return!1}return e})})}_typeCheck(e){return e instanceof Boolean&&(e=e.valueOf()),"boolean"==typeof e}isTrue(e=pb.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test:e=>pK(e)||!0===e})}isFalse(e=pb.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test:e=>pK(e)||!1===e})}}pV.prototype=pq.prototype;let pZ=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,pX=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,pJ=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,pQ=e=>pK(e)||e===e.trim(),p1=({}).toString();function p0(){return new p2}class p2 extends pU{constructor(){super({type:"string"}),this.withMutation(()=>{this.transform(function(e){if(this.isType(e)||Array.isArray(e))return e;let t=null!=e&&e.toString?e.toString():e;return t===p1?e:t})})}_typeCheck(e){return e instanceof String&&(e=e.valueOf()),"string"==typeof e}_isPresent(e){return super._isPresent(e)&&!!e.length}length(e,t=pd.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},test(t){return pK(t)||t.length===this.resolve(e)}})}min(e,t=pd.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return pK(t)||t.length>=this.resolve(e)}})}max(e,t=pd.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},test(t){return pK(t)||t.length<=this.resolve(e)}})}matches(e,t){let n=!1,r,i;return t&&("object"==typeof t?{excludeEmptyString:n=!1,message:r,name:i}=t:r=t),this.test({name:i||"matches",message:r||pd.matches,params:{regex:e},test:t=>pK(t)||""===t&&n||-1!==t.search(e)})}email(e=pd.email){return this.matches(pZ,{name:"email",message:e,excludeEmptyString:!0})}url(e=pd.url){return this.matches(pX,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=pd.uuid){return this.matches(pJ,{name:"uuid",message:e,excludeEmptyString:!1})}ensure(){return this.default("").transform(e=>null===e?"":e)}trim(e=pd.trim){return this.transform(e=>null!=e?e.trim():e).test({message:e,name:"trim",test:pQ})}lowercase(e=pd.lowercase){return this.transform(e=>pK(e)?e:e.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,test:e=>pK(e)||e===e.toLowerCase()})}uppercase(e=pd.uppercase){return this.transform(e=>pK(e)?e:e.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,test:e=>pK(e)||e===e.toUpperCase()})}}p0.prototype=p2.prototype;let p3=e=>e!=+e;function p4(){return new p6}class p6 extends pU{constructor(){super({type:"number"}),this.withMutation(()=>{this.transform(function(e){let t=e;if("string"==typeof t){if(""===(t=t.replace(/\s/g,"")))return NaN;t=+t}return this.isType(t)?t:parseFloat(t)})})}_typeCheck(e){return e instanceof Number&&(e=e.valueOf()),"number"==typeof e&&!p3(e)}min(e,t=ph.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return pK(t)||t>=this.resolve(e)}})}max(e,t=ph.max){return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(t){return pK(t)||t<=this.resolve(e)}})}lessThan(e,t=ph.lessThan){return this.test({message:t,name:"max",exclusive:!0,params:{less:e},test(t){return pK(t)||t<this.resolve(e)}})}moreThan(e,t=ph.moreThan){return this.test({message:t,name:"min",exclusive:!0,params:{more:e},test(t){return pK(t)||t>this.resolve(e)}})}positive(e=ph.positive){return this.moreThan(0,e)}negative(e=ph.negative){return this.lessThan(0,e)}integer(e=ph.integer){return this.test({name:"integer",message:e,test:e=>pK(e)||Number.isInteger(e)})}truncate(){return this.transform(e=>pK(e)?e:0|e)}round(e){var t,n=["ceil","floor","round","trunc"];if("trunc"===(e=(null==(t=e)?void 0:t.toLowerCase())||"round"))return this.truncate();if(-1===n.indexOf(e.toLowerCase()))throw TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(t=>pK(t)?t:Math[e](t))}}p4.prototype=p6.prototype;var p5=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;function p8(e){var t,n,r=[1,4,5,6,7,10,11],i=0;if(n=p5.exec(e)){for(var a,o=0;a=r[o];++o)n[a]=+n[a]||0;n[2]=(+n[2]||1)-1,n[3]=+n[3]||1,n[7]=n[7]?String(n[7]).substr(0,3):0,(void 0===n[8]||""===n[8])&&(void 0===n[9]||""===n[9])?t=+new Date(n[1],n[2],n[3],n[4],n[5],n[6],n[7]):("Z"!==n[8]&&void 0!==n[9]&&(i=60*n[10]+n[11],"+"===n[9]&&(i=0-i)),t=Date.UTC(n[1],n[2],n[3],n[4],n[5]+i,n[6],n[7]))}else t=Date.parse?Date.parse(e):NaN;return t}let p9=new Date(""),p7=e=>"[object Date]"===Object.prototype.toString.call(e);function be(){return new bt}class bt extends pU{constructor(){super({type:"date"}),this.withMutation(()=>{this.transform(function(e){return this.isType(e)?e:(e=p8(e),isNaN(e)?p9:new Date(e))})})}_typeCheck(e){return p7(e)&&!isNaN(e.getTime())}prepareParam(e,t){let n;if(pD.isRef(e))n=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);n=r}return n}min(e,t=pp.min){let n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(e){return pK(e)||e>=this.resolve(n)}})}max(e,t=pp.max){var n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(e){return pK(e)||e<=this.resolve(n)}})}}bt.INVALID_DATE=p9,be.prototype=bt.prototype,be.INVALID_DATE=p9;var bn=n(11865),br=n.n(bn),bi=n(68929),ba=n.n(bi),bo=n(67523),bs=n.n(bo),bu=n(94633),bc=n.n(bu);function bl(e,t=[]){let n=[],r=[];function i(e,i){var a=(0,pC.split)(e)[0];~r.indexOf(a)||r.push(a),~t.indexOf(`${i}-${a}`)||n.push([i,a])}for(let a in e)if(py()(e,a)){let o=e[a];~r.indexOf(a)||r.push(a),pD.isRef(o)&&o.isSibling?i(o.path,a):pw(o)&&"deps"in o&&o.deps.forEach(e=>i(e,a))}return bc().array(r,n).reverse()}function bf(e,t){let n=1/0;return e.some((e,r)=>{var i;if((null==(i=t.path)?void 0:i.indexOf(e))!==-1)return n=r,!0}),n}function bd(e){return(t,n)=>bf(e,t)-bf(e,n)}function bh(){return(bh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}let bp=e=>"[object Object]"===Object.prototype.toString.call(e);function bb(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(e=>-1===n.indexOf(e))}let bm=bd([]);class bg extends pU{constructor(e){super({type:"object"}),this.fields=Object.create(null),this._sortErrors=bm,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{this.transform(function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e=null}return this.isType(e)?e:null}),e&&this.shape(e)})}_typeCheck(e){return bp(e)||"function"==typeof e}_cast(e,t={}){var n;let r=super._cast(e,t);if(void 0===r)return this.getDefault();if(!this._typeCheck(r))return r;let i=this.fields,a=null!=(n=t.stripUnknown)?n:this.spec.noUnknown,o=this._nodes.concat(Object.keys(r).filter(e=>-1===this._nodes.indexOf(e))),s={},u=bh({},t,{parent:s,__validating:t.__validating||!1}),c=!1;for(let l of o){let f=i[l],d=py()(r,l);if(f){let h,p=r[l];u.path=(t.path?`${t.path}.`:"")+l;let b="spec"in(f=f.resolve({value:p,context:t.context,parent:s}))?f.spec:void 0,m=null==b?void 0:b.strict;if(null==b?void 0:b.strip){c=c||l in r;continue}void 0!==(h=t.__validating&&m?r[l]:f.cast(r[l],u))&&(s[l]=h)}else d&&!a&&(s[l]=r[l]);s[l]!==r[l]&&(c=!0)}return c?s:r}_validate(e,t={},n){let r=[],{sync:i,from:a=[],originalValue:o=e,abortEarly:s=this.spec.abortEarly,recursive:u=this.spec.recursive}=t;a=[{schema:this,value:o},...a],t.__validating=!0,t.originalValue=o,t.from=a,super._validate(e,t,(e,c)=>{if(e){if(!pT.isError(e)||s)return void n(e,c);r.push(e)}if(!u||!bp(c)){n(r[0]||null,c);return}o=o||c;let l=this._nodes.map(e=>(n,r)=>{let i=-1===e.indexOf(".")?(t.path?`${t.path}.`:"")+e:`${t.path||""}["${e}"]`,s=this.fields[e];if(s&&"validate"in s){s.validate(c[e],bh({},t,{path:i,from:a,strict:!0,parent:c,originalValue:o[e]}),r);return}r(null)});pO({sync:i,tests:l,value:c,errors:r,endEarly:s,sort:this._sortErrors,path:t.path},n)})}clone(e){let t=super.clone(e);return t.fields=bh({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),n=t.fields;for(let[r,i]of Object.entries(this.fields)){let a=n[r];void 0===a?n[r]=i:a instanceof pU&&i instanceof pU&&(n[r]=i.concat(a))}return t.withMutation(()=>t.shape(n))}getDefaultFromShape(){let e={};return this._nodes.forEach(t=>{let n=this.fields[t];e[t]="default"in n?n.getDefault():void 0}),e}_getDefault(){return"default"in this.spec?super._getDefault():this._nodes.length?this.getDefaultFromShape():void 0}shape(e,t=[]){let n=this.clone(),r=Object.assign(n.fields,e);if(n.fields=r,n._sortErrors=bd(Object.keys(r)),t.length){Array.isArray(t[0])||(t=[t]);let i=t.map(([e,t])=>`${e}-${t}`);n._excludedEdges=n._excludedEdges.concat(i)}return n._nodes=bl(r,n._excludedEdges),n}pick(e){let t={};for(let n of e)this.fields[n]&&(t[n]=this.fields[n]);return this.clone().withMutation(e=>(e.fields={},e.shape(t)))}omit(e){let t=this.clone(),n=t.fields;for(let r of(t.fields={},e))delete n[r];return t.withMutation(()=>t.shape(n))}from(e,t,n){let r=(0,pC.getter)(e,!0);return this.transform(i=>{if(null==i)return i;let a=i;return py()(i,e)&&(a=bh({},i),n||delete a[e],a[t]=r(i)),a})}noUnknown(e=!0,t=pm.noUnknown){"string"==typeof e&&(t=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;let n=bb(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,t=pm.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>t&&bs()(t,(t,n)=>e(n)))}camelCase(){return this.transformKeys(ba())}snakeCase(){return this.transformKeys(br())}constantCase(){return this.transformKeys(e=>br()(e).toUpperCase())}describe(){let e=super.describe();return e.fields=pL()(this.fields,e=>e.describe()),e}}function bv(e){return new bg(e)}function by(){return(by=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function bw(e){return new b_(e)}bv.prototype=bg.prototype;class b_ extends pU{constructor(e){super({type:"array"}),this.innerType=e,this.withMutation(()=>{this.transform(function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e=null}return this.isType(e)?e:null})})}_typeCheck(e){return Array.isArray(e)}get _subType(){return this.innerType}_cast(e,t){let n=super._cast(e,t);if(!this._typeCheck(n)||!this.innerType)return n;let r=!1,i=n.map((e,n)=>{let i=this.innerType.cast(e,by({},t,{path:`${t.path||""}[${n}]`}));return i!==e&&(r=!0),i});return r?i:n}_validate(e,t={},n){var r,i;let a=[],o=t.sync,s=t.path,u=this.innerType,c=null!=(r=t.abortEarly)?r:this.spec.abortEarly,l=null!=(i=t.recursive)?i:this.spec.recursive,f=null!=t.originalValue?t.originalValue:e;super._validate(e,t,(e,r)=>{if(e){if(!pT.isError(e)||c)return void n(e,r);a.push(e)}if(!l||!u||!this._typeCheck(r)){n(a[0]||null,r);return}f=f||r;let i=Array(r.length);for(let d=0;d<r.length;d++){let h=r[d],p=`${t.path||""}[${d}]`,b=by({},t,{path:p,strict:!0,parent:r,index:d,originalValue:f[d]});i[d]=(e,t)=>u.validate(h,b,t)}pO({sync:o,path:s,value:r,errors:a,endEarly:c,tests:i},n)})}clone(e){let t=super.clone(e);return t.innerType=this.innerType,t}concat(e){let t=super.concat(e);return t.innerType=this.innerType,e.innerType&&(t.innerType=t.innerType?t.innerType.concat(e.innerType):e.innerType),t}of(e){let t=this.clone();if(!pw(e))throw TypeError("`array.of()` sub-schema must be a valid yup schema not: "+pl(e));return t.innerType=e,t}length(e,t=pg.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},test(t){return pK(t)||t.length===this.resolve(e)}})}min(e,t){return t=t||pg.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return pK(t)||t.length>=this.resolve(e)}})}max(e,t){return t=t||pg.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(t){return pK(t)||t.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,t)=>this._typeCheck(e)?e:null==t?[]:[].concat(t))}compact(e){let t=e?(t,n,r)=>!e(t,n,r):e=>!!e;return this.transform(e=>null!=e?e.filter(t):e)}describe(){let e=super.describe();return this.innerType&&(e.innerType=this.innerType.describe()),e}nullable(e=!0){return super.nullable(e)}defined(){return super.defined()}required(e){return super.required(e)}}bw.prototype=b_.prototype;var bE=bv().shape({name:p0().required("Required"),url:p0().required("Required")}),bS=function(e){var t=e.initialValues,n=e.onSubmit,r=e.submitButtonText,i=e.nameDisabled,a=void 0!==i&&i;return l.createElement(hT,{initialValues:t,validationSchema:bE,onSubmit:n},function(e){var t=e.isSubmitting;return l.createElement(l.Fragment,null,l.createElement(hR,{"data-testid":"bridge-form",noValidate:!0},l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:12,md:7},l.createElement(hP,{component:hX,id:"name",name:"name",label:"Name",disabled:a,required:!0,fullWidth:!0,FormHelperTextProps:{"data-testid":"name-helper-text"}})),l.createElement(d.Z,{item:!0,xs:12,md:7},l.createElement(hP,{component:hX,id:"url",name:"url",label:"Bridge URL",placeholder:"https://",required:!0,fullWidth:!0,FormHelperTextProps:{"data-testid":"url-helper-text"}})),l.createElement(d.Z,{item:!0,xs:12,md:7},l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:7},l.createElement(hP,{component:hX,id:"minimumContractPayment",name:"minimumContractPayment",label:"Minimum Contract Payment",placeholder:"0",fullWidth:!0,inputProps:{min:0},FormHelperTextProps:{"data-testid":"minimumContractPayment-helper-text"}})),l.createElement(d.Z,{item:!0,xs:7},l.createElement(hP,{component:hX,id:"confirmations",name:"confirmations",label:"Confirmations",placeholder:"0",type:"number",fullWidth:!0,inputProps:{min:0},FormHelperTextProps:{"data-testid":"confirmations-helper-text"}})))),l.createElement(d.Z,{item:!0,xs:12,md:7},l.createElement(ok.default,{variant:"contained",color:"primary",type:"submit",disabled:t,size:"large"},r)))))})},bk=function(e){var t=e.bridge,n=e.onSubmit,r={name:t.name,url:t.url,minimumContractPayment:t.minimumContractPayment,confirmations:t.confirmations};return l.createElement(ig,null,l.createElement(d.Z,{container:!0,spacing:40},l.createElement(d.Z,{item:!0,xs:12,md:11,lg:9},l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Edit Bridge",action:l.createElement(aA.Z,{component:tz,href:"/bridges/".concat(t.id)},"Cancel")}),l.createElement(aW.Z,null,l.createElement(bS,{nameDisabled:!0,initialValues:r,onSubmit:n,submitButtonText:"Save Bridge"}))))))};function bx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function bT(e){if(Array.isArray(e))return e}function bM(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function bO(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){bM(a,r,i,o,s,"next",e)}function s(e){bM(a,r,i,o,s,"throw",e)}o(void 0)})}}function bA(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bL(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function bC(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function bI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){bA(e,t,n[t])})}return e}function bD(e,t){return bT(e)||bL(e,t)||bP(e,t)||bC()}function bN(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function bP(e,t){if(e){if("string"==typeof e)return bx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bx(e,t)}}var bR=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};function bj(){var e=bN(["\n mutation UpdateBridge($id: ID!, $input: UpdateBridgeInput!) {\n updateBridge(id: $id, input: $input) {\n ... on UpdateBridgeSuccess {\n bridge {\n id\n }\n }\n ... on NotFoundError {\n message\n }\n }\n }\n"]);return bj=function(){return e},e}var bF=n0(bj()),bY=function(e){var t=e.id;return l.createElement(l.Fragment,null,l.createElement("span",null,"Successfully updated"),l.createElement(tz,{href:"/bridges/".concat(t)},t))},bB=function(){var e=(0,h.UO)().id,t=(0,A.I0)(),n=oq().handleMutationError,r=rv(o9,{variables:{id:e}}),i=r.data,a=r.loading,o=r.error,s=bD(oo(bF,{refetchQueries:[{query:o9,variables:{id:e}}]}),1)[0];if(a)return l.createElement(iR,null);if(o)return l.createElement(iD,{error:o});var u,c=(u=bO(function(r){var i,a,o,u,c,f;return bR(this,function(d){switch(d.label){case 0:return d.trys.push([0,2,,3]),[4,s(((o={}).variables={id:e,input:bI({},r)},o))];case 1:switch(u=null===(i=(a=d.sent()).data)||void 0===i?void 0:i.updateBridge,c={},null==u?void 0:u.__typename){case"UpdateBridgeSuccess":t((0,ty.t5)(function(){return l.createElement(bY,{id:u.bridge.id})},c));break;case"NotFoundError":t((0,ty.LO)(u.message))}return[3,3];case 2:return n(f=d.sent()),[3,3];case 3:return[2]}})}),function(e){return u.apply(this,arguments)}),f=null==i?void 0:i.bridge;switch(null==f?void 0:f.__typename){case"Bridge":return l.createElement(bk,{onSubmit:c,bridge:f});case"NotFoundError":return l.createElement(oa,null);default:return null}},bU={name:"",url:"",minimumContractPayment:"0",confirmations:0},bH=function(e){var t=e.onSubmit;return l.createElement(ig,null,l.createElement(d.Z,{container:!0,spacing:40},l.createElement(d.Z,{item:!0,xs:12,md:11,lg:9},l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"New Bridge"}),l.createElement(aW.Z,null,l.createElement(bS,{initialValues:bU,onSubmit:t,submitButtonText:"Create Bridge"}))))))};function b$(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function bz(e){if(Array.isArray(e))return e}function bG(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function bW(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){bG(a,r,i,o,s,"next",e)}function s(e){bG(a,r,i,o,s,"throw",e)}o(void 0)})}}function bK(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bV(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function bq(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function bZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){bK(e,t,n[t])})}return e}function bX(e,t){return bz(e)||bV(e,t)||bQ(e,t)||bq()}function bJ(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function bQ(e,t){if(e){if("string"==typeof e)return b$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b$(e,t)}}var b1=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};function b0(){var e=bJ(["\n mutation CreateBridge($input: CreateBridgeInput!) {\n createBridge(input: $input) {\n ... on CreateBridgeSuccess {\n bridge {\n id\n }\n incomingToken\n }\n }\n }\n"]);return b0=function(){return e},e}var b2=n0(b0()),b3=function(e){var t=e.id,n=e.incomingToken;return l.createElement(l.Fragment,null,l.createElement("span",null,"Successfully created bridge\xa0"),l.createElement(tz,{href:"/bridges/".concat(t)},t),l.createElement("span",null,"\xa0with incoming access token: ",n))},b4=function(){var e,t=(0,A.I0)(),n=oq().handleMutationError,r=bX(oo(b2),1)[0],i=(e=bW(function(e){var i,a,o,s,u,c;return b1(this,function(f){switch(f.label){case 0:return f.trys.push([0,2,,3]),[4,r(((o={}).variables={input:bZ({},e)},o))];case 1:return s=null===(i=(a=f.sent()).data)||void 0===i?void 0:i.createBridge,u={},(null==s?void 0:s.__typename)==="CreateBridgeSuccess"&&t((0,ty.t5)(function(){return l.createElement(b3,{id:s.bridge.id,incomingToken:s.incomingToken})},u)),[3,3];case 2:return n(c=f.sent()),[3,3];case 3:return[2]}})}),function(t){return e.apply(this,arguments)});return l.createElement(bH,{onSubmit:i})},b6=function(){var e=(0,h.$B)().path;return l.createElement(h.rs,null,l.createElement(h.AW,{exact:!0,path:"".concat(e,"/new")},l.createElement(b4,null)),l.createElement(h.AW,{path:"".concat(e,"/:id/edit")},l.createElement(bB,null)),l.createElement(h.AW,{path:"".concat(e,"/:id")},l.createElement(se,null)),l.createElement(h.AW,{exact:!0,path:e},l.createElement(sc,null)))},b5=n(48403),b8=n.n(b5),b9=n(24815),b7=n(66289);function me(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function mt(e){if(Array.isArray(e))return e}function mn(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function mr(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function mi(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ma(e,t){return mt(e)||mr(e,t)||mo(e,t)||mi()}function mo(e,t){if(e){if("string"==typeof e)return me(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return me(e,t)}}var ms=function(){var e=ma(l.useState(),2),t=e[0],n=e[1],r=(0,h.k6)(),i=(0,A.I0)();l.useEffect(function(){mn(t,b7._7)&&(i((0,ty.Jc)()),r.push("/signin"))},[i,t,r]);var a=t?function(){return l.createElement("div",null,"Error:"," ",mn(t,Error)?t.message:JSON.stringify(t))}:function(){return null};return{error:t,ErrorComponent:a,setError:n}},mu=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=e?function(){return l.createElement(x.default,{variant:"body1"},"Loading...")}:function(){return null};return{isLoading:e,LoadingPlaceholder:t}},mc=n(76023);function ml(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function mf(e){if(Array.isArray(e))return e}function md(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function mh(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){md(a,r,i,o,s,"next",e)}function s(e){md(a,r,i,o,s,"throw",e)}o(void 0)})}}function mp(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function mb(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function mm(e,t){return mf(e)||mp(e,t)||mg(e,t)||mb()}function mg(e,t){if(e){if("string"==typeof e)return ml(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ml(e,t)}}var mv=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},my=["debug","info","warn","error"],mw=function(e){return(0,b.createStyles)({actions:{display:"flex",justifyContent:"flex-end",marginTop:.5*e.spacing.unit},logLevelHelperText:{marginTop:-8}})},m_=(0,b.withStyles)(mw)(function(e){var t,n=e.classes,r=e.initialValues,i=(0,A.I0)(),a=hx({initialValues:r,onSubmit:(t=mh(function(e){var t,n,r,a;return mv(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=((n={}).level=e.level,n.sqlEnabled=e.sqlEnabled,n),[4,iG.v2.logConfig.updateLogConfig(t)];case 1:return o.sent(),r={},i((0,ty.t5)(function(){return l.createElement(l.Fragment,null,"Logging Configuration Updated")},r)),[3,3];case 2:return a=o.sent(),i((0,ty.cB)(aN,a)),[3,3];case 3:return[2]}})}),function(e){return t.apply(this,arguments)})});return l.createElement("form",{onSubmit:a.handleSubmit,"data-testid":"logging-form"},l.createElement(iw.Z,{id:"select-level",name:"level",fullWidth:!0,select:!0,label:"Log Level",value:a.values.level,defaultValue:r.defaultLogLevel,onChange:a.handleChange,error:a.touched.level&&Boolean(a.errors.level),helperText:"Override the LOG_LEVEL environment variable (until restart)"},my.map(function(e){return l.createElement(tE.default,{key:e,value:e},b8()(e).concat(e===r.defaultLogLevel?" (default)":""))})),l.createElement(b9.default,null,l.createElement(hz.Z,{name:"sqlEnabled",control:l.createElement(l.Fragment,null,l.createElement(h$.Z,{id:"sqlEnabled",name:"sqlEnabled",disabled:"debug"!==a.values.level,checked:a.values.sqlEnabled&&"debug"===a.values.level,onChange:a.handleChange})),label:"Log SQL Statements (debug only)"}),l.createElement(mc.default,{className:n.logLevelHelperText},"Override the LOG_SQL environment variable (until restart)")),l.createElement("br",null),l.createElement("div",{className:n.actions},l.createElement(aA.Z,{variant:"primary",type:"submit",disabled:a.isSubmitting},"Update")))}),mE=function(){var e=mm((0,l.useState)(null),2),t=e[0],n=e[1],r=ms(),i=r.error,a=r.ErrorComponent,o=r.setError,s=mu(!i&&!t).LoadingPlaceholder;return(0,l.useEffect)(function(){function e(){return t.apply(this,arguments)}function t(){return(t=mh(function(){var e,t,r,i,a,s,u,c,l;return mv(this,function(f){switch(f.label){case 0:return f.trys.push([0,2,,3]),[4,iG.v2.logConfig.getLogConfig()];case 1:return t=(e=f.sent()).data.attributes.serviceName.findIndex(function(e){return"Global"==e}),r=e.data.attributes.logLevel[t],i=e.data.attributes.defaultLogLevel,a=e.data.attributes.serviceName.findIndex(function(e){return"IsSqlEnabled"==e}),s="true"==e.data.attributes.logLevel[a],n(u=((c={}).defaultLogLevel=i,c.level=r,c.sqlEnabled=s,c)),[3,3];case 2:return o(l=f.sent()),[3,3];case 3:return[2]}})})).apply(this,arguments)}e()},[o]),l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Logging"}),l.createElement(aW.Z,null,l.createElement(s,null),l.createElement(a,null),t&&l.createElement(m_,{initialValues:t})))};function mS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function mk(e){if(Array.isArray(e))return e}function mx(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function mT(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){mx(a,r,i,o,s,"next",e)}function s(e){mx(a,r,i,o,s,"throw",e)}o(void 0)})}}function mM(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function mO(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function mA(e,t){return mk(e)||mM(e,t)||mL(e,t)||mO()}function mL(e,t){if(e){if("string"==typeof e)return mS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mS(e,t)}}var mC=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},mI=function(e){return(0,b.createStyles)({confirmDialog:{width:400},deleteCell:{"&:last-child":{paddingRight:1.5*e.spacing.unit}},deleteIcon:{fontSize:20}})},mD=6048e5,mN=(0,b.withStyles)(mI)(function(e){var t,n=e.classes,r=(0,A.I0)(),i=new Date(Date.now()-mD).toISOString(),a=mA((0,l.useState)(!1),2),o=a[0],s=a[1],u=(t=mT(function(){var e,t;return mC(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,r((0,ty.Iw)(i))];case 1:return n.sent(),e={},r((0,ty.t5)(function(){return l.createElement(l.Fragment,null,"Deleted completed job runs")},e)),s(!1),[3,3];case 2:return t=n.sent(),r((0,ty.LO)("Something went wrong")),[3,3];case 3:return[2]}})}),function(){return t.apply(this,arguments)});return l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Job Runs",subheader:"Reduce the database size by deleting old job runs"}),l.createElement(r8.Z,null,l.createElement(r9.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,l.createElement(x.default,null,"Errored Runs"),l.createElement(x.default,{variant:"subtitle2",color:"textSecondary"},"Keeps runs from the last week")),l.createElement(r7.default,{align:"right",className:n.deleteCell},l.createElement(y.default,{onClick:function(){return s(!0)},"data-cy":"delete-errored-job-runs"},l.createElement(ou.Z,{className:n.deleteIcon,color:"error"})))))),l.createElement(oC,{open:o,title:"Delete errored jobs runs",body:"Are you sure you want to delete all errored job runs up to\n ".concat(aw()(i).format("dddd, MMMM Do YYYY, h:mm:ss a"),"?"),confirmButtonText:"Confirm",onConfirm:u,cancelButtonText:"Cancel",onCancel:function(){return s(!1)}}))}),mP=n(16939),mR=n(80366),mj=n(37254),mF=n(63366);function mY(e,t){if(null==e)return{};var n,r,i=(0,mF.Z)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function mB(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function mU(e){if(Array.isArray(e))return mB(e)}function mH(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function m$(e,t){if(e){if("string"==typeof e)return mB(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mB(e,t)}}function mz(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function mG(e){return mU(e)||mH(e)||m$(e)||mz()}var mW=n(4942);function mK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})),r.forEach(function(t){(0,mW.Z)(e,t,n[t])})}return e}var mV=n(87462);function mq(e){var t=e.length;return 0===t||1===t?e:2===t?[e[0],e[1],"".concat(e[0],".").concat(e[1]),"".concat(e[1],".").concat(e[0])]:3===t?[e[0],e[1],e[2],"".concat(e[0],".").concat(e[1]),"".concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[0]),"".concat(e[1],".").concat(e[2]),"".concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[1],".").concat(e[0])]:t>=4?[e[0],e[1],e[2],e[3],"".concat(e[0],".").concat(e[1]),"".concat(e[0],".").concat(e[2]),"".concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[0]),"".concat(e[1],".").concat(e[2]),"".concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[1]),"".concat(e[2],".").concat(e[3]),"".concat(e[3],".").concat(e[0]),"".concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[0]),"".concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[1],".").concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[2],".").concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[3],".").concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[2],".").concat(e[1],".").concat(e[0])]:void 0}var mZ={};function mX(e){if(0===e.length||1===e.length)return e;var t=e.join(".");return mZ[t]||(mZ[t]=mq(e)),mZ[t]}function mJ(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return mX(e.filter(function(e){return"token"!==e})).reduce(function(e,t){return mK({},e,n[t])},t)}function mQ(e){return e.join(" ")}function m1(e,t){var n=0;return function(r){return n+=1,r.map(function(r,i){return m0({node:r,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(i)})})}}function m0(e){var t=e.node,n=e.stylesheet,r=e.style,i=void 0===r?{}:r,a=e.useInlineStyles,o=e.key,s=t.properties,u=t.type,c=t.tagName,f=t.value;if("text"===u)return f;if(c){var d,h=m1(n,a);if(a){var p=Object.keys(n).reduce(function(e,t){return t.split(".").forEach(function(t){e.includes(t)||e.push(t)}),e},[]),b=s.className&&s.className.includes("token")?["token"]:[],m=s.className&&b.concat(s.className.filter(function(e){return!p.includes(e)}));d=mK({},s,{className:mQ(m)||void 0,style:mJ(s.className,Object.assign({},s.style,i),n)})}else d=mK({},s,{className:mQ(s.className)});var g=h(t.children);return l.createElement(c,(0,mV.Z)({key:o},d),g)}}let m2=function(e,t){return -1!==e.listLanguages().indexOf(t)};var m3=/\n/g;function m4(e){return e.match(m3)}function m6(e){var t=e.lines,n=e.startingLineNumber,r=e.style;return t.map(function(e,t){var i=t+n;return l.createElement("span",{key:"line-".concat(t),className:"react-syntax-highlighter-line-number",style:"function"==typeof r?r(i):r},"".concat(i,"\n"))})}function m5(e){var t=e.codeString,n=e.codeStyle,r=e.containerStyle,i=void 0===r?{float:"left",paddingRight:"10px"}:r,a=e.numberStyle,o=void 0===a?{}:a,s=e.startingLineNumber;return l.createElement("code",{style:Object.assign({},n,i)},m6({lines:t.replace(/\n$/,"").split("\n"),style:o,startingLineNumber:s}))}function m8(e){return"".concat(e.toString().length,".25em")}function m9(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function m7(e,t,n){var r,i={display:"inline-block",minWidth:m8(n),paddingRight:"1em",textAlign:"right",userSelect:"none"};return mK({},i,"function"==typeof e?e(t):e)}function ge(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,i=e.largestLineNumber,a=e.showInlineLineNumbers,o=e.lineProps,s=void 0===o?{}:o,u=e.className,c=void 0===u?[]:u,l=e.showLineNumbers,f=e.wrapLongLines,d="function"==typeof s?s(n):s;if(d.className=c,n&&a){var h=m7(r,n,i);t.unshift(m9(n,h))}return f&l&&(d.style=mK({},d.style,{display:"flex"})),{type:"element",tagName:"span",properties:d,children:t}}function gt(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=0;r<e.length;r++){var i=e[r];if("text"===i.type)n.push(ge({children:[i],className:mG(new Set(t))}));else if(i.children){var a=t.concat(i.properties.className);n=n.concat(gt(i.children,a))}}return n}function gn(e,t,n,r,i,a,o,s,u){var c,l=gt(e.value),f=[],d=-1,h=0;function p(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return ge({children:e,lineNumber:t,lineNumberStyle:s,largestLineNumber:o,showInlineLineNumbers:i,lineProps:n,className:a,showLineNumbers:r,wrapLongLines:u})}function b(e,t){if(r&&t&&i){var n=m7(s,t,o);e.unshift(m9(t,n))}return e}function m(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return t||r.length>0?p(e,n,r):b(e,n)}for(var g=function(){var e=l[h],t=e.children[0].value;if(m4(t)){var n=t.split("\n");n.forEach(function(t,i){var o=r&&f.length+a,s={type:"text",value:"".concat(t,"\n")};if(0===i){var u=l.slice(d+1,h).concat(ge({children:[s],className:e.properties.className})),c=m(u,o);f.push(c)}else if(i===n.length-1){if(l[h+1]&&l[h+1].children&&l[h+1].children[0]){var p={type:"text",value:"".concat(t)},b=ge({children:[p],className:e.properties.className});l.splice(h+1,0,b)}else{var g=[s],v=m(g,o,e.properties.className);f.push(v)}}else{var y=[s],w=m(y,o,e.properties.className);f.push(w)}}),d=h}h++};h<l.length;)g();if(d!==l.length-1){var v=l.slice(d+1,l.length);if(v&&v.length){var y=r&&f.length+a,w=m(v,y);f.push(w)}}return t?f:(c=[]).concat.apply(c,f)}function gr(e){var t=e.rows,n=e.stylesheet,r=e.useInlineStyles;return t.map(function(e,t){return m0({node:e,stylesheet:n,useInlineStyles:r,key:"code-segement".concat(t)})})}function gi(e){return e&&void 0!==e.highlightAuto}function ga(e){var t=e.astGenerator,n=e.language,r=e.code,i=e.defaultCodeValue;if(gi(t)){var a=m2(t,n);return"text"===n?{value:i,language:"text"}:a?t.highlight(n,r):t.highlightAuto(r)}try{return n&&"text"!==n?{value:t.highlight(r,n)}:{value:i}}catch(o){return{value:i}}}function go(e,t){return function(n){var r=n.language,i=n.children,a=n.style,o=void 0===a?t:a,s=n.customStyle,u=void 0===s?{}:s,c=n.codeTagProps,f=void 0===c?{className:r?"language-".concat(r):void 0,style:mK({},o['code[class*="language-"]'],o['code[class*="language-'.concat(r,'"]')])}:c,d=n.useInlineStyles,h=void 0===d||d,p=n.showLineNumbers,b=void 0!==p&&p,m=n.showInlineLineNumbers,g=void 0===m||m,v=n.startingLineNumber,y=void 0===v?1:v,w=n.lineNumberContainerStyle,_=n.lineNumberStyle,E=void 0===_?{}:_,S=n.wrapLines,k=n.wrapLongLines,x=void 0!==k&&k,T=n.lineProps,M=void 0===T?{}:T,O=n.renderer,A=n.PreTag,L=void 0===A?"pre":A,C=n.CodeTag,I=void 0===C?"code":C,D=n.code,N=void 0===D?Array.isArray(i)?i[0]:i:D,P=n.astGenerator,R=mY(n,["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"]);P=P||e;var j=b?l.createElement(m5,{containerStyle:w,codeStyle:f.style||{},numberStyle:E,startingLineNumber:y,codeString:N}):null,F=o.hljs||o['pre[class*="language-"]']||{backgroundColor:"#fff"},Y=gi(P)?"hljs":"prismjs",B=h?Object.assign({},R,{style:Object.assign({},F,u)}):Object.assign({},R,{className:R.className?"".concat(Y," ").concat(R.className):Y,style:Object.assign({},u)});if(!P)return l.createElement(L,B,j,l.createElement(I,f,N));(void 0===S&&O||x)&&(S=!0),O=O||gr;var U=[{type:"text",value:N}],H=ga({astGenerator:P,language:r,code:N,defaultCodeValue:U});null===H.language&&(H.value=U);var $=H.value.length+y,z=gn(H,S,M,b,g,y,$,E,x);return x?f.style=mK({},f.style,{whiteSpace:"pre-wrap"}):f.style=mK({},f.style,{whiteSpace:"pre"}),l.createElement(L,B,l.createElement(I,f,!g&&j,O({rows:z,stylesheet:o,useInlineStyles:h})))}}let gs={'code[class*="language-"]':{color:"black",background:"none",textShadow:"0 1px white",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"black",background:"#f5f2f0",textShadow:"0 1px white",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"]::selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#b3d4fc"},':not(pre) > code[class*="language-"]':{background:"#f5f2f0",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"slategray"},prolog:{color:"slategray"},doctype:{color:"slategray"},cdata:{color:"slategray"},punctuation:{color:"#999"},namespace:{Opacity:".7"},property:{color:"#905"},tag:{color:"#905"},boolean:{color:"#905"},number:{color:"#905"},constant:{color:"#905"},symbol:{color:"#905"},deleted:{color:"#905"},selector:{color:"#690"},"attr-name":{color:"#690"},string:{color:"#690"},char:{color:"#690"},builtin:{color:"#690"},inserted:{color:"#690"},operator:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},entity:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)",cursor:"help"},url:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".language-css .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".style .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},atrule:{color:"#07a"},"attr-value":{color:"#07a"},keyword:{color:"#07a"},function:{color:"#DD4A68"},"class-name":{color:"#DD4A68"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"bold"},variable:{color:"#e90"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}};var gu=n(98695),gc=n.n(gu);let gl=["abap","abnf","actionscript","ada","agda","al","antlr4","apacheconf","apl","applescript","aql","arduino","arff","asciidoc","asm6502","aspnet","autohotkey","autoit","bash","basic","batch","bbcode","birb","bison","bnf","brainfuck","brightscript","bro","bsl","c","cil","clike","clojure","cmake","coffeescript","concurnas","cpp","crystal","csharp","csp","css-extras","css","cypher","d","dart","dax","dhall","diff","django","dns-zone-file","docker","ebnf","editorconfig","eiffel","ejs","elixir","elm","erb","erlang","etlua","excel-formula","factor","firestore-security-rules","flow","fortran","fsharp","ftl","gcode","gdscript","gedcom","gherkin","git","glsl","gml","go","graphql","groovy","haml","handlebars","haskell","haxe","hcl","hlsl","hpkp","hsts","http","ichigojam","icon","iecst","ignore","inform7","ini","io","j","java","javadoc","javadoclike","javascript","javastacktrace","jolie","jq","js-extras","js-templates","jsdoc","json","json5","jsonp","jsstacktrace","jsx","julia","keyman","kotlin","latex","latte","less","lilypond","liquid","lisp","livescript","llvm","lolcode","lua","makefile","markdown","markup-templating","markup","matlab","mel","mizar","mongodb","monkey","moonscript","n1ql","n4js","nand2tetris-hdl","naniscript","nasm","neon","nginx","nim","nix","nsis","objectivec","ocaml","opencl","oz","parigp","parser","pascal","pascaligo","pcaxis","peoplecode","perl","php-extras","php","phpdoc","plsql","powerquery","powershell","processing","prolog","properties","protobuf","pug","puppet","pure","purebasic","purescript","python","q","qml","qore","r","racket","reason","regex","renpy","rest","rip","roboconf","robotframework","ruby","rust","sas","sass","scala","scheme","scss","shell-session","smali","smalltalk","smarty","sml","solidity","solution-file","soy","sparql","splunk-spl","sqf","sql","stan","stylus","swift","t4-cs","t4-templating","t4-vb","tap","tcl","textile","toml","tsx","tt2","turtle","twig","typescript","typoscript","unrealscript","vala","vbnet","velocity","verilog","vhdl","vim","visual-basic","warpscript","wasm","wiki","xeora","xml-doc","xojo","xquery","yaml","yang","zig"];var gf=go(gc(),gs);gf.supportedLanguages=gl;let gd=gf;var gh=n(64566);function gp(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function gb(){var e=gp(["\n query FetchConfigV2 {\n configv2 {\n user\n effective\n }\n }\n"]);return gb=function(){return e},e}var gm=n0(gb()),gg=function(e){var t=e.children;return l.createElement(ir.Z,null,l.createElement(r7.default,{component:"th",scope:"row",colSpan:3},t))},gv=function(){return l.createElement(gg,null,"...")},gy=function(e){var t=e.children;return l.createElement(gg,null,t)},gw=function(e){var t=e.loading,n=e.toml,r=e.error,i=void 0===r?"":r,a=e.title,o=e.expanded;if(i)return l.createElement(gy,null,i);if(t)return l.createElement(gv,null);a||(a="TOML");var s={display:"block"};return l.createElement(x.default,null,l.createElement(mP.Z,{defaultExpanded:o},l.createElement(mR.Z,{expandIcon:l.createElement(gh.Z,null)},a),l.createElement(mj.Z,{style:s},l.createElement(gd,{language:"toml",style:gs},n))))},g_=function(){var e=rv(gm,{fetchPolicy:"cache-and-network"}),t=e.data,n=e.loading,r=e.error;return(null==t?void 0:t.configv2.effective)=="N/A"?l.createElement(l.Fragment,null,l.createElement(d.Z,{item:!0,xs:12},l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"TOML Configuration"}),l.createElement(gw,{title:"V2 config dump:",error:null==r?void 0:r.message,loading:n,toml:null==t?void 0:t.configv2.user,showHead:!0})))):l.createElement(l.Fragment,null,l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12},l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"TOML Configuration"}),l.createElement(gw,{title:"User specified:",error:null==r?void 0:r.message,loading:n,toml:null==t?void 0:t.configv2.user,showHead:!0,expanded:!0}),l.createElement(gw,{title:"Effective (with defaults):",error:null==r?void 0:r.message,loading:n,toml:null==t?void 0:t.configv2.effective,showHead:!0})))))},gE=n(34823),gS=function(e){return(0,b.createStyles)({cell:{paddingTop:1.5*e.spacing.unit,paddingBottom:1.5*e.spacing.unit}})},gk=(0,b.withStyles)(gS)(function(e){var t=e.classes,n=(0,A.I0)();(0,l.useEffect)(function(){n((0,ty.DQ)())});var r=(0,A.v9)(gE.N,A.wU);return l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Node"}),l.createElement(r8.Z,null,l.createElement(r9.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,{className:t.cell},l.createElement(x.default,null,"Version"),l.createElement(x.default,{variant:"subtitle1",color:"textSecondary"},r.version))),l.createElement(ir.Z,null,l.createElement(r7.default,{className:t.cell},l.createElement(x.default,null,"SHA"),l.createElement(x.default,{variant:"subtitle1",color:"textSecondary"},r.commitSHA))))))}),gx=function(){return l.createElement(ig,null,l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,sm:12,md:8},l.createElement(d.Z,{container:!0},l.createElement(g_,null))),l.createElement(d.Z,{item:!0,sm:12,md:4},l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12},l.createElement(gk,null)),l.createElement(d.Z,{item:!0,xs:12},l.createElement(mN,null)),l.createElement(d.Z,{item:!0,xs:12},l.createElement(mE,null))))))},gT=function(){return l.createElement(gx,null)},gM=function(){return l.createElement(gT,null)},gO=n(44431),gA=1e18,gL=function(e){return new gO.BigNumber(e).dividedBy(gA).toFixed(8)},gC=function(e){var t=e.keys,n=e.chainID,r=e.hideHeaderTitle;return l.createElement(l.Fragment,null,l.createElement(sl.Z,{title:!r&&"Account Balances",subheader:"Chain ID "+n}),l.createElement(aW.Z,null,l.createElement(w.default,{dense:!1,disablePadding:!0},t&&t.map(function(e,r){return l.createElement(l.Fragment,null,l.createElement(_.default,{disableGutters:!0,key:["acc-balance",n.toString(),r.toString()].join("-")},l.createElement(E.Z,{primary:l.createElement(l.Fragment,null,l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:12},l.createElement(op,{title:"Address"}),l.createElement(ob,{value:e.address})),l.createElement(d.Z,{item:!0,xs:6},l.createElement(op,{title:"Native Token Balance"}),l.createElement(ob,{value:e.ethBalance||"--"})),l.createElement(d.Z,{item:!0,xs:6},l.createElement(op,{title:"LINK Balance"}),l.createElement(ob,{value:e.linkBalance?gL(e.linkBalance):"--"}))))})),r+1<t.length&&l.createElement(aK.Z,null))}))))};function gI(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function gD(){var e=gI(["\n fragment AccountBalancesPayload_ResultsFields on EthKey {\n address\n chain {\n id\n }\n ethBalance\n isDisabled\n linkBalance\n }\n"]);return gD=function(){return e},e}var gN=n0(gD()),gP=function(e){var t=e.data,n=e.errorMsg,r=e.loading,i=null==t?void 0:t.ethKeys.results,a={};return null==i||i.forEach(function(e){void 0===a[e.chain.id]&&(a[e.chain.id]=[]),a[e.chain.id].push(e)}),l.createElement(r5.Z,null,n&&l.createElement(l.Fragment,null,l.createElement(sl.Z,{title:"Account Balances"}),l.createElement(d.Z,{item:!0,xs:12},l.createElement(ob,{value:n}))),r&&l.createElement(d.Z,{item:!0,xs:12,style:{display:"flex",justifyContent:"center"}},l.createElement(iN.Z,{"data-testid":"loading-spinner",size:24})),!(null==i?void 0:i.length)&&!r&&!n&&l.createElement(l.Fragment,null,l.createElement(sl.Z,{title:"Account Balances"}),l.createElement(d.Z,{item:!0,xs:12},l.createElement(ob,{value:"No account available"}))),i&&Object.keys(a).map(function(e,t){return l.createElement(gC,{key:e,keys:a[e],chainID:e,hideHeaderTitle:!!t})}))};function gR(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function gj(){var e=gR(["\n ","\n query FetchAccountBalances {\n ethKeys {\n results {\n ...AccountBalancesPayload_ResultsFields\n }\n }\n }\n"]);return gj=function(){return e},e}var gF=n0(gj(),gN),gY=function(){var e=rv(gF,{fetchPolicy:"cache-and-network"}),t=e.data,n=e.loading,r=e.error;return l.createElement(gP,{data:t,errorMsg:null==r?void 0:r.message,loading:n})},gB=n(21700),gU=function(e){var t=e.msg;return t?l.createElement(ir.Z,null,l.createElement(r7.default,{component:"th",scope:"row"},t)):null},gH=function(e){return(0,b.createStyles)({cell:{padding:2*e.spacing.unit}})},g$=(0,b.withStyles)(gH)(function(e){var t=e.classes;return e.visible?l.createElement(ir.Z,null,l.createElement(r7.default,{colSpan:100,align:"center",className:t.cell},l.createElement(iN.Z,{"data-testid":"loading-spinner",size:24}))):null}),gz=function(e){var t=e.children;return e.visible?l.createElement(ir.Z,null,l.createElement(r7.default,{component:"th",scope:"row"},t||"No entries to show")):null};function gG(){return(gG=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var gW=function(e){return l.createElement("svg",gG({viewBox:"0 0 48 48"},e),l.createElement("path",{d:"M24 48C10.8 48 0 37.2 0 24S10.8 0 24 0s24 10.8 24 24-10.8 24-24 24zm0-44C13 4 4 13 4 24s9 20 20 20 20-9 20-20S35 4 24 4z",fill:"transparent"}),l.createElement("circle",{cx:24,cy:24,r:20,fill:"#ffecf0"}),l.createElement("path",{d:"M16.8 30.9H31c.5 0 1-.3 1.2-.8.3-.6.3-1.2.1-1.8l-6.5-11c-.4-.8-1.1-1.3-1.9-1.4-.8.1-1.6.6-1.9 1.3l-6.4 11c-.3.6-.3 1.3.1 1.8.1.5.6.8 1.1.9zm7.1-5.5c-.4 0-.7-.4-.7-.8l-.4-3.4c0-.6.5-1.1 1.1-1.1s1.1.5 1.1 1.1l-.4 3.4c0 .4-.3.8-.7.8zm0 1.1c.6 0 1.1.5 1.1 1.1v.1c0 .6-.5 1.1-1.1 1.1s-1.1-.5-1.1-1.1c0-.6.5-1.1 1.1-1.2zm-7.1 5.8c-1 0-2-.6-2.5-1.5-.6-1-.6-2.3-.1-3.3l6.5-11.2c.6-1.2 1.8-2 3.1-2.1 1.3.1 2.5.9 3.1 2l6.5 11.1c.5 1.1.5 2.3-.1 3.4-.5.9-1.4 1.4-2.4 1.5l-14.1.1z",fillRule:"evenodd",clipRule:"evenodd",fill:"#ff4169"}))};let gK=gW;function gV(){return(gV=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var gq=function(e){return l.createElement("svg",gV({fill:"none",viewBox:"0 0 48 48"},e),l.createElement("path",{d:"M24 46C36.1503 46 46 36.1503 46 24C46 11.8497 36.1503 2 24 2C11.8497 2 2 11.8497 2 24C2 36.1503 11.8497 46 24 46Z",stroke:"white",strokeWidth:"4"}),l.createElement("path",{d:"M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44Z",fill:"#E8ECEF"}),l.createElement("path",{d:"M24.07 11.72C21.7307 11.722 19.4445 12.4175 17.5003 13.7186C15.5562 15.0197 14.0415 16.868 13.1476 19.0298C12.2538 21.1916 12.0209 23.5699 12.4785 25.864C12.9361 28.1582 14.0636 30.2651 15.7185 31.9186C17.3733 33.5721 19.4812 34.6978 21.7758 35.1534C24.0703 35.6091 26.4484 35.3742 28.6095 34.4785C30.7705 33.5829 32.6175 32.0666 33.917 30.1214C35.2164 28.1761 35.91 25.8893 35.91 23.55C35.9113 21.9952 35.6059 20.4555 35.0112 19.019C34.4166 17.5825 33.5443 16.2774 32.4445 15.1784C31.3446 14.0795 30.0388 13.2084 28.6018 12.6149C27.1647 12.0215 25.6248 11.7174 24.07 11.72V11.72ZM24.07 33.01C22.199 33.01 20.37 32.4552 18.8143 31.4157C17.2586 30.3762 16.0461 28.8988 15.3301 27.1702C14.6141 25.4416 14.4268 23.5395 14.7918 21.7044C15.1568 19.8694 16.0578 18.1838 17.3808 16.8608C18.7038 15.5378 20.3894 14.6368 22.2245 14.2718C24.0595 13.9068 25.9616 14.0941 27.6902 14.8101C29.4188 15.5261 30.8962 16.7386 31.9357 18.2943C32.9752 19.85 33.53 21.679 33.53 23.55C33.5274 26.0538 32.5323 28.4543 30.7628 30.2257C28.9933 31.9971 26.5938 32.9947 24.09 33L24.07 33.01Z",fill:"#5A6169",fillOpacity:"0.75"}),l.createElement("path",{d:"M24.68 17.64H22.9V24.73L29.11 28.45L30 27L24.68 23.84V17.64Z",fill:"#5A6169",fillOpacity:"0.75"}))};let gZ=gq;function gX(){return(gX=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var gJ=function(e){return l.createElement("svg",gX({id:"prefix__Layer_1","data-name":"Layer 1",viewBox:"0 0 48 48"},e),l.createElement("defs",null,l.createElement("style",null,".prefix__cls-3{fill:#b0b0b0}")),l.createElement("g",{id:"prefix__Time-Icon"},l.createElement("circle",{id:"prefix__path-1",cx:24,cy:24,r:20,fill:"#f0f0f0",className:"pending-icon"})),l.createElement("g",{id:"prefix__Time-Icon-2","data-name":"Time-Icon"},l.createElement("g",{id:"prefix__Shape"},l.createElement("path",{className:"prefix__cls-3",d:"M23.94 11.64a11.83 11.83 0 1 0 11.84 11.83 11.82 11.82 0 0 0-11.84-11.83zm0 21.29a9.46 9.46 0 1 1 9.46-9.46 9.46 9.46 0 0 1-9.4 9.46z"}),l.createElement("path",{fill:"none",d:"M9.77 9.28h28.38v28.38H9.77V9.28z"}),l.createElement("path",{className:"prefix__cls-3",d:"M24.55 17.56h-1.78v7.09l6.21 3.73.89-1.46-5.32-3.16v-6.2z"}))))};let gQ=gJ;function g1(){return(g1=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var g0=function(e){return l.createElement("svg",g1({"data-name":"Layer 1",viewBox:"0 0 48 48"},e),l.createElement("defs",null,l.createElement("mask",{id:"prefix__a",x:13.75,y:16,width:21,height:15,maskUnits:"userSpaceOnUse"},l.createElement("path",{fillRule:"evenodd",fill:"#fff",d:"M13.75 16h21v15h-21V16z"}))),l.createElement("circle",{"data-name":"path-1",cx:24,cy:24,r:20,fill:"#e8faf1"}),l.createElement("g",null,l.createElement("g",{mask:"url(#prefix__a)"},l.createElement("path",{d:"M30.81 17a1.89 1.89 0 0 0-1.29.56c-2.94 2.9-5.2 5.33-7.89 8.05l-2.74-2.28a1.9 1.9 0 0 0-2.66.14 1.84 1.84 0 0 0 .14 2.62l.09.07 4.08 3.4a1.9 1.9 0 0 0 2.55-.11c3.38-3.34 5.79-6 9.09-9.27a1.82 1.82 0 0 0 0-2.62 1.92 1.92 0 0 0-1.4-.56",fill:"#17c671",fillRule:"evenodd"}))))};let g2=g0;var g3=function(e){var t=e.status,n=e.width,r=e.height;switch(t){case"COMPLETED":return l.createElement(g2,{width:n,height:r,"data-testid":"completed"});case"ERRORED":return l.createElement(gK,{width:n,height:r,"data-testid":"errored"});case"RUNNING":return l.createElement(gQ,{width:n,height:r,"data-testid":"running"});case"SUSPENDED":return l.createElement(gZ,{width:n,height:r,"data-testid":"suspended"});default:return null}},g4=function(e){var t=e.palette,n=e.spacing;return(0,b.createStyles)({cell:{padding:0},content:{position:"relative",paddingLeft:50},status:{position:"absolute",top:0,left:0,paddingTop:18,paddingLeft:30,borderRight:"solid 1px",borderRightColor:t.divider,width:50,height:"100%"},runDetails:{paddingTop:3*n.unit,paddingBottom:3*n.unit,paddingLeft:4*n.unit,paddingRight:4*n.unit}})},g6=(0,b.withStyles)(g4)(function(e){var t=e.classes,n=e.run;return l.createElement(ir.Z,null,l.createElement(r7.default,{scope:"row",className:t.cell},l.createElement("div",{className:t.content},l.createElement("div",{className:t.status},l.createElement(g3,{width:38,status:n.status})),l.createElement("div",{className:t.runDetails},l.createElement(d.Z,{container:!0,spacing:0},l.createElement(d.Z,{item:!0,xs:12},l.createElement(ih,{href:"/jobs/".concat(n.job.id)},l.createElement(x.default,{variant:"h5",color:"primary",component:"span"},"Job: ",n.job.id))),l.createElement(d.Z,{item:!0,xs:12},l.createElement(ih,{href:"/runs/".concat(n.id)},l.createElement(x.default,{variant:"subtitle1",color:"textSecondary",component:"span"},"Run: ",n.id))))))),l.createElement(r7.default,{align:"right"},l.createElement(x.default,{variant:"body1",color:"textSecondary"},l.createElement(aO,{tooltip:!0},n.createdAt))))});function g5(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function g8(){var e=g5(["\n fragment RecentJobRunsPayload_ResultsFields on JobRun {\n id\n allErrors\n createdAt\n finishedAt\n status\n job {\n id\n }\n }\n"]);return g8=function(){return e},e}var g9=n0(g8()),g7=function(e){var t=e.palette,n=e.spacing;return(0,b.createStyles)({footer:{borderColor:t.divider,borderTop:"1px solid",paddingTop:2*n.unit,paddingBottom:2*n.unit}})},ve=(0,b.withStyles)(g7)(function(e){var t,n,r=e.classes,i=e.data,a=e.loading,o=e.errorMsg,s=e.maxRunsSize;return l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Activity",action:l.createElement(aA.Z,{href:"/jobs/new",component:tz},"New Job")}),l.createElement(r8.Z,null,l.createElement(r9.Z,null,l.createElement(g$,{visible:a}),l.createElement(gz,{visible:(null===(t=null==i?void 0:i.jobRuns.results)||void 0===t?void 0:t.length)===0},"No recent activity"),l.createElement(gU,{msg:o}),null===(n=null==i?void 0:i.jobRuns.results)||void 0===n?void 0:n.map(function(e,t){return l.createElement(g6,{run:e,key:t})})),i&&i.jobRuns.metadata.total>s&&l.createElement(gB.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,{className:r.footer},l.createElement(aA.Z,{href:"/runs",component:tz},"View More"))))))});function vt(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function vn(){var e=vt(["\n ","\n query FetchRecentJobRuns($offset: Int, $limit: Int) {\n jobRuns(offset: $offset, limit: $limit) {\n results {\n ...RecentJobRunsPayload_ResultsFields\n }\n metadata {\n total\n }\n }\n }\n"]);return vn=function(){return e},e}var vr=5,vi=n0(vn(),g9),va=function(){var e=rv(vi,{variables:{offset:0,limit:vr},fetchPolicy:"cache-and-network"}),t=e.data,n=e.loading,r=e.error;return l.createElement(ve,{data:t,errorMsg:null==r?void 0:r.message,loading:n,maxRunsSize:vr})},vo=function(e){return(0,b.createStyles)({style:{textAlign:"center",padding:2.5*e.spacing.unit,position:"fixed",left:"0",bottom:"0",width:"100%",borderRadius:0},bareAnchor:{color:e.palette.common.black,textDecoration:"none"}})},vs=(0,b.withStyles)(vo)(function(e){var t=e.classes,n=(0,A.v9)(gE.N,A.wU),r=(0,A.I0)();return(0,l.useEffect)(function(){r((0,ty.DQ)())}),l.createElement(ii.default,{className:t.style},l.createElement(x.default,null,"Chainlink Node ",n.version," at commit"," ",l.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://github.com/smartcontractkit/chainlink/commit/".concat(n.commitSHA),className:t.bareAnchor},n.commitSHA)))}),vu=function(e){return(0,b.createStyles)({cell:{borderColor:e.palette.divider,borderTop:"1px solid",borderBottom:"none",paddingTop:2*e.spacing.unit,paddingBottom:2*e.spacing.unit,paddingLeft:2*e.spacing.unit},block:{display:"block"},overflowEllipsis:{textOverflow:"ellipsis",overflow:"hidden"}})},vc=(0,b.withStyles)(vu)(function(e){var t=e.classes,n=e.job;return l.createElement(ir.Z,null,l.createElement(r7.default,{scope:"row",className:t.cell},l.createElement(d.Z,{container:!0,spacing:0},l.createElement(d.Z,{item:!0,xs:12},l.createElement(ih,{href:"/jobs/".concat(n.id),classes:{linkContent:t.block}},l.createElement(x.default,{className:t.overflowEllipsis,variant:"body1",component:"span",color:"primary"},n.name||n.id))),l.createElement(d.Z,{item:!0,xs:12},l.createElement(x.default,{variant:"body1",color:"textSecondary"},"Created ",l.createElement(aO,{tooltip:!0},n.createdAt))))))});function vl(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function vf(){var e=vl(["\n fragment RecentJobsPayload_ResultsFields on Job {\n id\n name\n createdAt\n }\n"]);return vf=function(){return e},e}var vd=n0(vf()),vh=function(){return(0,b.createStyles)({cardHeader:{borderBottom:0},table:{tableLayout:"fixed"}})},vp=(0,b.withStyles)(vh)(function(e){var t,n,r=e.classes,i=e.data,a=e.errorMsg,o=e.loading;return l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Recent Jobs",className:r.cardHeader}),l.createElement(r8.Z,{className:r.table},l.createElement(r9.Z,null,l.createElement(g$,{visible:o}),l.createElement(gz,{visible:(null===(t=null==i?void 0:i.jobs.results)||void 0===t?void 0:t.length)===0},"No recently created jobs"),l.createElement(gU,{msg:a}),null===(n=null==i?void 0:i.jobs.results)||void 0===n?void 0:n.map(function(e,t){return l.createElement(vc,{job:e,key:t})}))))});function vb(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function vm(){var e=vb(["\n ","\n query FetchRecentJobs($offset: Int, $limit: Int) {\n jobs(offset: $offset, limit: $limit) {\n results {\n ...RecentJobsPayload_ResultsFields\n }\n }\n }\n"]);return vm=function(){return e},e}var vg=5,vv=n0(vm(),vd),vy=function(){var e=rv(vv,{variables:{offset:0,limit:vg},fetchPolicy:"cache-and-network"}),t=e.data,n=e.loading,r=e.error;return l.createElement(vp,{data:t,errorMsg:null==r?void 0:r.message,loading:n})},vw=function(){return l.createElement(ig,null,l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:8},l.createElement(va,null)),l.createElement(d.Z,{item:!0,xs:4},l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12},l.createElement(gY,null)),l.createElement(d.Z,{item:!0,xs:12},l.createElement(vy,null))))),l.createElement(vs,null))},v_=function(){return l.createElement(vw,null)},vE=function(){return l.createElement(v_,null)},vS=n(87239),vk=function(e){switch(e){case"DirectRequestSpec":return"Direct Request";case"FluxMonitorSpec":return"Flux Monitor";default:return e.replace(/Spec$/,"")}},vx=n(5022),vT=n(78718),vM=n.n(vT);function vO(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function vA(e){if(Array.isArray(e))return vO(e)}function vL(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vC(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function vI(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function vD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){vL(e,t,n[t])})}return e}function vN(e){return vA(e)||vC(e)||vP(e)||vI()}function vP(e,t){if(e){if("string"==typeof e)return vO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vO(e,t)}}var vR=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return vM().apply(void 0,[e,"type","schemaVersion","name","externalJobID","gasLimit","forwardingAllowed",].concat(vN(n)))},vj=function(e){var t=e.observationSource;return{observationSource:""===t?null:t}},vF=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return vM().apply(void 0,[e].concat(vN(n)))},vY=function(e){try{return vx.stringify(e)}catch(t){return console.error("Failed to stringify job spec with the following error: ".concat(t)),""}},vB=function(e){var t={};switch(e.spec.__typename){case"CronSpec":t=vD({},vR(e,"maxTaskDuration"),vF(e.spec,"schedule","evmChainID"),vj(e));break;case"DirectRequestSpec":t=vD({},vR(e,"maxTaskDuration"),vF(e.spec,"contractAddress","evmChainID","minIncomingConfirmations","minContractPaymentLinkJuels","requesters"),vj(e));break;case"FluxMonitorSpec":t=vD({},vR(e,"maxTaskDuration"),vF(e.spec,"absoluteThreshold","contractAddress","drumbeatEnabled","drumbeatSchedule","drumbeatRandomDelay","evmChainID","idleTimerPeriod","idleTimerDisabled","minPayment","pollTimerPeriod","pollTimerDisabled","threshold"),vj(e));break;case"KeeperSpec":t=vD({},vR(e),vF(e.spec,"contractAddress","evmChainID","fromAddress"),vj(e));break;case"OCRSpec":t=vD({},vR(e,"maxTaskDuration"),vF(e.spec,"blockchainTimeout","contractAddress","contractConfigConfirmations","contractConfigTrackerPollInterval","contractConfigTrackerSubscribeInterval","evmChainID","isBootstrapPeer","keyBundleID","observationTimeout","p2pv2Bootstrappers","transmitterAddress"),vj(e));break;case"OCR2Spec":t=vD({},vR(e,"maxTaskDuration"),vF(e.spec,"blockchainTimeout","contractID","contractConfigConfirmations","contractConfigTrackerPollInterval","ocrKeyBundleID","monitoringEndpoint","p2pv2Bootstrappers","relay","relayConfig","pluginType","pluginConfig","feedID"),vF(e.spec,"transmitterID"),vj(e));break;case"VRFSpec":t=vD({},vR(e),vF(e.spec,"coordinatorAddress","evmChainID","fromAddresses","minIncomingConfirmations","pollPeriod","publicKey","requestedConfsDelay","requestTimeout","batchCoordinatorAddress","batchFulfillmentEnabled","batchFulfillmentGasMultiplier","chunkSize","backoffInitialDelay","backoffMaxDelay","gasLanePrice","vrfOwnerAddress"),vj(e));break;case"BlockhashStoreSpec":t=vD({},vR(e),vF(e.spec,"coordinatorV1Address","coordinatorV2Address","coordinatorV2PlusAddress","waitBlocks","lookbackBlocks","blockhashStoreAddress","trustedBlockhashStoreAddress","trustedBlockhashStoreBatchSize","pollPeriod","runTimeout","evmChainID","fromAddresses"),vj(e));break;case"BlockHeaderFeederSpec":t=vD({},vR(e),vF(e.spec,"coordinatorV1Address","coordinatorV2Address","coordinatorV2PlusAddress","waitBlocks","lookbackBlocks","blockhashStoreAddress","batchBlockhashStoreAddress","pollPeriod","runTimeout","evmChainID","fromAddresses","getBlockhashesBatchSize","storeBlockhashesBatchSize"),vj(e));break;case"BootstrapSpec":t=vD({},vR(e),vF(e.spec,"contractID","relay","relayConfig","monitoringEndpoint","blockchainTimeout","contractConfigTrackerPollInterval","contractConfigConfirmations"));break;case"GatewaySpec":t=vD({},vR(e),vF(e.spec,"gatewayConfig"));break;case"WorkflowSpec":t=vD({},vR(e),vF(e.spec,"workflowID","workflow","workflowOwner"));break;case"StandardCapabilitiesSpec":t=vD({},vR(e),vF(e.spec,"command","config"));break;case"WebhookSpec":t=vD({},vR(e),vj(e));break;case"StreamSpec":t=vD({},vR(e,"maxTaskDuration"),vF(e.spec,"streamID"),vj(e));break;default:return{definition:""}}return{definition:vY(t)}};function vU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function vH(e){if(Array.isArray(e))return e}function v$(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function vz(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function vG(e,t){return vH(e)||v$(e,t)||vW(e,t)||vz()}function vW(e,t){if(e){if("string"==typeof e)return vU(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vU(e,t)}}var vK=function(e){var t=e.job,n=e.onDelete,r=vG(l.useState(null),2),i=r[0],a=r[1],o=vG(l.useState(!1),2),s=o[0],u=o[1],c=function(e){a(e.currentTarget)},f=function(){a(null)},h=vB(t).definition;return l.createElement(l.Fragment,null,l.createElement(oh,{actions:l.createElement("div",null,l.createElement(y.default,{onClick:c,"aria-label":"open-menu"},l.createElement(ol.Z,null)),l.createElement(t_.Z,{anchorEl:i,open:Boolean(i),onClose:f,disableAutoFocusItem:!0},l.createElement(tN,{to:"/jobs/new?definition=".concat(encodeURIComponent(h))},l.createElement(oc.Z,null,l.createElement(vS.Z,null)),l.createElement(E.Z,null,"Duplicate")),l.createElement(tE.default,{onClick:function(){return u(!0)}},l.createElement(oc.Z,null,l.createElement(ou.Z,null)),l.createElement(E.Z,null,"Delete"))))},l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12,sm:6,md:1},l.createElement(op,{title:"ID"}),l.createElement(ob,{value:t.id})),l.createElement(d.Z,{item:!0,xs:12,sm:6,md:2},l.createElement(op,{title:"Type"}),l.createElement(ob,{value:vk(t.spec.__typename)})),l.createElement(d.Z,{item:!0,xs:12,sm:6,md:5},l.createElement(op,{title:"External Job ID"}),l.createElement(ob,{value:vk(t.externalJobID)})),l.createElement(d.Z,{item:!0,xs:12,sm:6,md:4},l.createElement(op,{title:"Created"}),l.createElement(ob,null,l.createElement(aO,{tooltip:!0},t.createdAt))))),l.createElement(oC,{open:s,title:"Delete Job?",body:"Warning: This action cannot be undone!",confirmButtonText:"Confirm",onConfirm:function(){n(),u(!1)},cancelButtonText:"Cancel",onCancel:function(){return u(!1)}}))},vV=n(70398),vq=n(12794),vZ=n(75759);function vX(){return(vX=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var vJ=function(e){return l.createElement(vZ.Z,vX({},e,{component:tI.rU}),e.children)};function vQ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v1,v0=function(e){return(0,b.createStyles)({tabs:{marginTop:4*e.spacing.unit,marginBottom:2.5*e.spacing.unit,borderBottom:"1px solid ".concat(e.palette.grey["300"])},badge:{padding:"0 ".concat(2*e.spacing.unit,"px")}})};(v1=s||(s={}))[v1.Overview=0]="Overview",v1[v1.Definition=1]="Definition",v1[v1.Errors=2]="Errors",v1[v1.Runs=3]="Runs";var v2=(0,b.withStyles)(v0)(function(e){var t=e.classes,n=e.id,r=e.errorsCount,i=e.refetchRecentRuns,a=e.runsCount,o=(0,h.TH)().pathname,u=l.useMemo(function(){var e;return vQ(e={},s.Overview,"/jobs/".concat(n)),vQ(e,s.Definition,"/jobs/".concat(n,"/definition")),vQ(e,s.Errors,"/jobs/".concat(n,"/errors")),vQ(e,s.Runs,"/jobs/".concat(n,"/runs")),e},[n]);return l.createElement(vq.Z,{value:o,className:t.tabs,indicatorColor:"primary",onChange:function(e,t){t===u[s.Overview]&&i()}},l.createElement(vJ,{label:"Overview",to:u[s.Overview],value:u[s.Overview]}),l.createElement(vJ,{label:"Definition",to:u[s.Definition],value:u[s.Definition]}),l.createElement(vJ,{label:l.createElement(vV.Z,{badgeContent:r,color:"error",className:t.badge},"Errors"),to:u[s.Errors],value:u[s.Errors]}),l.createElement(vJ,{label:l.createElement(vV.Z,{badgeContent:a,color:"primary",className:t.badge,max:99999},"Runs"),to:u[s.Runs],value:u[s.Runs]}))}),v3=n(12740);function v4(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function v6(e){if(Array.isArray(e))return e}function v5(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function v8(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function v9(e,t){return v6(e)||v5(e,t)||v7(e,t)||v8()}function v7(e,t){if(e){if("string"==typeof e)return v4(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v4(e,t)}}var ye=function(e){return(0,b.createStyles)({dialogContent:{paddingTop:1*e.spacing.unit},textarea:{width:400},closeButton:{position:"absolute",right:e.spacing.unit,top:e.spacing.unit,color:e.palette.grey[500]}})},yt=(0,b.withStyles)(ye)(function(e){var t=e.open,n=e.onClose,r=e.onRun,i=e.classes,a=v9(l.useState(""),2),o=a[0],s=a[1],u=l.useCallback(function(){r(o),n()},[r,n,o]);return l.createElement(aD.Z,{onClose:n,open:t},l.createElement(oO.Z,{disableTypography:!0},l.createElement(x.default,{variant:"h5"},"Pipeline Input"),l.createElement(y.default,{"aria-label":"Close",className:i.closeButton,onClick:n},l.createElement(v3.Z,null))),l.createElement(oT.Z,{className:i.dialogContent},l.createElement(iw.Z,{className:i.textarea,multiline:!0,rows:6,variant:"outlined",onChange:function(e){return s(e.target.value)}})),l.createElement(ox.Z,null,l.createElement(aA.Z,{variant:"primary",onClick:u},"Run Job")))}),yn=n(74855);function yr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function yi(e){if(Array.isArray(e))return e}function ya(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function yo(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ys(e,t){return yi(e)||ya(e,t)||yu(e,t)||yo()}function yu(e,t){if(e){if("string"==typeof e)return yr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yr(e,t)}}var yc=function(e){var t=e.data,n=e.title,r=ys(l.useState(!1),2),i=r[0],a=r[1];return l.createElement(yn.CopyToClipboard,{text:t,onCopy:function(){return a(!0)}},l.createElement(a_.Z,{title:"Copied!",open:i,onClose:function(){return a(!1)}},l.createElement(aA.Z,{variant:"secondary",onMouseLeave:function(){return a(!1)}},n)))},yl=function(e){var t=vB(e.job).definition;return l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Definition",action:l.createElement(yc,{title:"Copy",data:t})}),l.createElement(aW.Z,null,l.createElement(x.default,{style:{margin:0},variant:"body1",component:"pre"},l.createElement(gd,{language:"toml",style:gs,"data-testid":"definition"},t))))},yf=function(e){var t=e.job,n=["Occurrences","Created","Last Seen","Message"];return l.createElement(r5.Z,null,l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,n.map(function(e){return l.createElement(r7.default,{key:e},e)}))),l.createElement(r9.Z,null,0===t.errors.length&&l.createElement(ir.Z,null,l.createElement(r7.default,{component:"th",scope:"row",colSpan:5},"No errors")),t.errors.map(function(e,t){return l.createElement(ir.Z,{key:t},l.createElement(r7.default,null,e.occurrences),l.createElement(r7.default,null,l.createElement(aO,{tooltip:!0},e.createdAt)),l.createElement(r7.default,null,l.createElement(aO,{tooltip:!0},e.updatedAt)),l.createElement(r7.default,null,e.description))}))))},yd=function(e){return(0,b.createStyles)({jobRunsCard:{overflow:"auto"},idCell:{width:"40%"},stampCell:{width:"30%"},statusCell:{textAlign:"end",width:"30%"},runDetails:{paddingTop:2*e.spacing.unit,paddingBottom:2*e.spacing.unit,paddingLeft:2*e.spacing.unit},stamp:{paddingLeft:e.spacing.unit},status:{paddingLeft:1.5*e.spacing.unit,paddingRight:1.5*e.spacing.unit,paddingTop:e.spacing.unit/2,paddingBottom:e.spacing.unit/2,borderRadius:2*e.spacing.unit,marginRight:e.spacing.unit,width:"fit-content",display:"inline-block",textTransform:"capitalize"},errored:{backgroundColor:e.palette.error.light,color:e.palette.error.main},running:{backgroundColor:e.palette.listPendingStatus.background,color:e.palette.listPendingStatus.color},completed:{backgroundColor:e.palette.listCompletedStatus.background,color:e.palette.listCompletedStatus.color},noRuns:{padding:2*e.spacing.unit}})},yh=function(e,t){switch(t){case"COMPLETED":case"ERRORED":case"RUNNING":return e[t.toLowerCase()];default:return null}},yp=(0,b.withStyles)(yd)(function(e){var t=e.classes,n=e.runs,r=(0,h.k6)();return l.createElement(r8.Z,{padding:"none"},l.createElement(r9.Z,null,0===n.length&&l.createElement(ir.Z,null,l.createElement(r7.default,{colSpan:5},l.createElement(x.default,{variant:"body1",color:"textSecondary",className:t.noRuns},"No jobs have been run yet"))),n.length>0&&n.map(function(e){return l.createElement(ir.Z,{key:e.id,style:{cursor:"pointer"},onClick:function(){return r.push("/runs/".concat(e.id))}},l.createElement(r7.default,{className:t.idCell,scope:"row"},l.createElement("div",{className:t.runDetails},l.createElement(x.default,{variant:"h5",color:"primary",component:"span"},e.id))),l.createElement(r7.default,{className:t.stampCell},l.createElement(x.default,{variant:"body1",color:"textSecondary",className:t.stamp},"Created ",l.createElement(aO,{tooltip:!0},e.createdAt))),l.createElement(r7.default,{className:t.statusCell,scope:"row"},l.createElement(x.default,{variant:"body1",className:O()(t.status,yh(t,e.status))},e.status.toLowerCase())))})))}),yb=n(16839),ym=n.n(yb);function yg(e){var t=e.replace(/\w+\s*=\s*<([^>]|[\r\n])*>/g,""),n=ym().read(t),r=n.edges();return n.nodes().map(function(e){var t={id:e,parentIds:r.filter(function(t){return t.w===e}).map(function(e){return e.v})};return Object.keys(n.node(e)).length>0&&(t.attributes=n.node(e)),t})}var yv=n(94164),yy=function(e){var t=e.data,n=[];return(null==t?void 0:t.attributes)&&Object.keys(t.attributes).forEach(function(e){var r;n.push(l.createElement("div",{key:e},l.createElement(x.default,{variant:"body1",color:"textSecondary",component:"div"},l.createElement("b",null,e,":")," ",null===(r=t.attributes)||void 0===r?void 0:r[e])))}),l.createElement("div",null,t&&l.createElement(x.default,{variant:"body1",color:"textPrimary"},l.createElement("b",null,t.id)),n)},yw=n(73343),y_=n(3379),yE=n.n(y_);function yS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function yk(e){if(Array.isArray(e))return e}function yx(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function yT(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function yM(e,t){return yk(e)||yx(e,t)||yO(e,t)||yT()}function yO(e,t){if(e){if("string"==typeof e)return yS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yS(e,t)}}var yA=function(e){var t,n=e.nodesData,r=yM(l.useState({}),2),i=r[0],a=r[1];l.useEffect(function(){var e=function(e){var t=!0,r=!1,i=void 0;try{for(var a,o=n[Symbol.iterator]();!(t=(a=o.next()).done);t=!0){var s=a.value;if(e===s.id)return s}}catch(u){r=!0,i=u}finally{try{t||null==o.return||o.return()}finally{if(r)throw i}}};if(n){var t={nodes:[],links:[]},r=[],i=[];n.map(function(e){t.nodes.push({id:e.id}),e.parentIds.map(function(n){t.links.push({source:n,target:e.id})}),r.push({id:e.id,width:90,height:40}),e.parentIds.map(function(t){i.push({id:"e".concat(e.id),sources:[e.id],targets:[t]})})});var o=function(t){var n,r=e(t.id);switch(null==r?void 0:null===(n=r.attributes)||void 0===n?void 0:n.status){case"COMPLETE":return l.createElement(g2,{className:"task-run-icon-success task-run-icon",id:"success-run-icon-".concat(t.id)});case"ERROR":return l.createElement(gK,{className:"task-run-icon-error task-run-icon",id:"error-run-icon-".concat(t.id)});default:return l.createElement(gQ,{className:"task-run-icon-pending task-run-icon",id:"pending-run-icon-".concat(t.id)})}};new(yE())().layout({id:"task-list-graph-d3",children:r,edges:i},{layoutOptions:{"elk.algorithm":"org.eclipse.elk.layered","elk.direction":"LEFT","elk.layered.nodePlacement.strategy":"SIMPLE","elk.layered.wrapping.strategy":"SINGLE_EDGE","elk.aspectRatio":"1.0f","org.eclipse.elk.padding":"[top=50, left=50, bottom=50, right=5]","elk.layered.spacing.edgeNodeBetweenLayers":"1","elk.zoomToFit":"TRUE","elk.layered.considerModelOrder.strategy":"PREFER_EDGES","elk.layered.unnecessaryBendpoints":"TRUE"}}).then(function(e){var n;t.nodes=[],null===(n=e.children)||void 0===n||n.map(function(e){e.x&&e.y&&t.nodes.push({id:e.id,x:"".concat(e.x),y:"".concat(e.y),viewGenerator:o,size:400})}),a(t)})}},[n]);var o=0;null===(t=i.nodes)||void 0===t||t.map(function(e){e.y&&o<parseInt(e.y,10)&&(o=parseInt(e.y,10))});var s={automaticRearrangeAfterDropNode:!1,collapsible:!1,directed:!0,disableLinkForce:!0,focusAnimationDuration:.75,focusZoom:1,height:o+50,highlightDegree:0,highlightOpacity:1,link:{color:"#d3d3d3",fontColor:"black",fontSize:12,fontWeight:"normal",highlightColor:"blue",highlightFontSize:8,highlightFontWeight:"bold",mouseCursor:"pointer",opacity:1,renderLabel:!1,strokeWidth:3,markerHeight:3,markerWidth:3},linkHighlightBehavior:!0,maxZoom:3,minZoom:.3,node:{color:"#d3d3d3",fontColor:"black",fontSize:14,fontWeight:"normal",highlightColor:"red",highlightFontSize:16,highlightFontWeight:"bold",highlightStrokeColor:"blue",labelProperty:"name",mouseCursor:"pointer",opacity:1,renderLabel:!0,strokeColor:"none",strokeWidth:2,labelPosition:"top"},nodeHighlightBehavior:!0,panAndZoom:!0,staticGraph:!0,width:"100%"},u=0,c=0,f=function(e){c=e.clientY,u=e.clientX};(0,l.useEffect)(function(){return window.addEventListener("mousemove",f),function(){window.removeEventListener("mousemove",f)}});var d=function(e){var t,n,r=document.getElementById("tooltip-d3-chart-".concat(e));if(r){var i=50,a=10;t=u+r.getBoundingClientRect().width+i>window.innerWidth?u-r.getBoundingClientRect().width-a:u+a,n=c+r.getBoundingClientRect().height+i>window.innerHeight?c-r.getBoundingClientRect().height-a:c+a,r.style.opacity=String(1),r.style.top="".concat(n,"px"),r.style.left="".concat(t,"px"),r.style.zIndex=String(1)}},h=function(e){var t=document.getElementById("tooltip-d3-chart-".concat(e));t&&(t.style.opacity=String(0),t.style.zIndex=String(-1))};return l.createElement("div",{style:{fontFamily:"sans-serif",fontWeight:"normal"}},l.createElement(yv.kJ,{id:"task-list-graph-d3",data:i,config:s,onMouseOverNode:d,onMouseOutNode:h},"D3 chart"),n.map(function(e){return l.createElement("div",{key:"d3-tooltip-key-".concat(e.id),id:"tooltip-d3-chart-".concat(e.id),style:{position:"absolute",opacity:"0",border:"1px solid rgba(0, 0, 0, 0.1)",padding:yw.r.spacing.unit,background:"white",borderRadius:5,zIndex:-1,inlineSize:"min-content"}},l.createElement(yy,{data:e}))}))};function yL(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function yC(e){if(Array.isArray(e))return e}function yI(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yD(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function yN(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function yP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){yI(e,t,n[t])})}return e}function yR(e,t){return yC(e)||yD(e,t)||yj(e,t)||yN()}function yj(e,t){if(e){if("string"==typeof e)return yL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yL(e,t)}}var yF=function(e){var t=e.attributes,n=e.observationSource,r=yR(l.useState(),2),i=r[0],a=r[1];return l.useEffect(function(){if(n&&""!==n)try{var e=yg("digraph {".concat(n,"}"));if(t)for(var r=0;r<e.length;r++){var i=e[r];t[i.id]&&(e[r].attributes=yP({},i.attributes,t[i.id]))}a({graph:e})}catch(o){a({errorMsg:"Failed to parse task graph"})}else a({errorMsg:"No Task Graph Found"})},[t,n,a]),l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Task List",id:"graph-max-width"}),l.createElement(aW.Z,null,i&&i.errorMsg&&l.createElement(x.default,{align:"center",variant:"subtitle1"},i.errorMsg),i&&i.graph&&l.createElement(yA,{nodesData:i.graph})))},yY=5,yB=function(e){var t=e.spacing;return(0,b.createStyles)({runDetails:{paddingTop:2*t.unit,paddingBottom:2*t.unit,paddingLeft:2*t.unit}})},yU=(0,b.withStyles)(yB)(function(e){var t=e.classes,n=e.job,r=l.useMemo(function(){return n.runs.results.map(function(e){var t,n=e.allErrors,r=e.id,i=e.createdAt;return{id:r,createdAt:i,errors:n,finishedAt:e.finishedAt,status:e.status}})},[n.runs]);return l.createElement(d.Z,{container:!0,spacing:32},l.createElement(d.Z,{item:!0,xs:12,sm:6},l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Recent job runs"}),l.createElement(yp,{runs:r}),n.runs.metadata.total>yY&&l.createElement("div",{className:t.runDetails},l.createElement(aA.Z,{href:"/jobs/".concat(n.id,"/runs"),component:tz},"View more")))),l.createElement(d.Z,{item:!0,xs:12,sm:6},l.createElement(yF,{observationSource:n.observationSource})))});function yH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function y$(e){if(Array.isArray(e))return e}function yz(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function yG(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function yW(e,t){return y$(e)||yz(e,t)||yK(e,t)||yG()}function yK(e,t){if(e){if("string"==typeof e)return yH(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yH(e,t)}}var yV=function(e){var t=e.fetchMore,n=e.job,r=(0,h.k6)(),i=(0,h.TH)(),a=new URLSearchParams(i.search),o=yW(l.useState({page:parseInt(a.get("page")||"1",10),pageSize:parseInt(a.get("size")||"10",10)}),2),s=o[0],u=s.page,c=s.pageSize,f=o[1];l.useEffect(function(){t(u,c)},[t,u,c]),l.useEffect(function(){r.replace({search:"?page=".concat(u,"&size=").concat(c)})},[r,u,c]);var d=l.useMemo(function(){return n.runs.results.map(function(e){var t,n=e.allErrors,r=e.id,i=e.createdAt;return{id:r,createdAt:i,errors:n,finishedAt:e.finishedAt,status:e.status}})},[n.runs]);return l.createElement(l.Fragment,null,l.createElement(r5.Z,null,l.createElement(yp,{runs:d}),l.createElement(it.Z,{component:"div",count:n.runs.metadata.total,rowsPerPage:c,rowsPerPageOptions:[10,25,50,100],page:u-1,onChangePage:function(e,t){f({page:t+1,pageSize:c})},onChangeRowsPerPage:function(e){f({page:1,pageSize:parseInt(e.target.value,10)})},backIconButtonProps:{"aria-label":"prev-page"},nextIconButtonProps:{"aria-label":"next-page"}})))};function yq(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function yZ(e){if(Array.isArray(e))return e}function yX(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function yJ(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function yQ(e,t){return yZ(e)||yX(e,t)||y0(e,t)||yJ()}function y1(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function y0(e,t){if(e){if("string"==typeof e)return yq(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yq(e,t)}}function y2(){var e=y1(["\n fragment JobPayload_Spec on JobSpec {\n ... on CronSpec {\n schedule\n evmChainID\n }\n ... on DirectRequestSpec {\n contractAddress\n evmChainID\n minIncomingConfirmations\n minContractPaymentLinkJuels\n requesters\n }\n ... on FluxMonitorSpec {\n absoluteThreshold\n contractAddress\n drumbeatEnabled\n drumbeatRandomDelay\n drumbeatSchedule\n evmChainID\n idleTimerDisabled\n idleTimerPeriod\n minPayment\n pollTimerDisabled\n pollTimerPeriod\n threshold\n }\n ... on KeeperSpec {\n contractAddress\n evmChainID\n fromAddress\n }\n ... on OCRSpec {\n blockchainTimeout\n contractAddress\n contractConfigConfirmations\n contractConfigTrackerPollInterval\n contractConfigTrackerSubscribeInterval\n evmChainID\n isBootstrapPeer\n keyBundleID\n observationTimeout\n p2pv2Bootstrappers\n transmitterAddress\n }\n ... on OCR2Spec {\n blockchainTimeout\n contractID\n contractConfigConfirmations\n contractConfigTrackerPollInterval\n ocrKeyBundleID\n monitoringEndpoint\n p2pv2Bootstrappers\n relay\n relayConfig\n transmitterID\n pluginType\n pluginConfig\n feedID\n }\n ... on VRFSpec {\n evmChainID\n gasLanePrice\n coordinatorAddress\n fromAddresses\n minIncomingConfirmations\n pollPeriod\n publicKey\n requestedConfsDelay\n batchCoordinatorAddress\n batchFulfillmentEnabled\n batchFulfillmentGasMultiplier\n chunkSize\n requestTimeout\n backoffInitialDelay\n backoffMaxDelay\n vrfOwnerAddress\n }\n ... on BlockhashStoreSpec {\n coordinatorV1Address\n coordinatorV2Address\n waitBlocks\n lookbackBlocks\n blockhashStoreAddress\n pollPeriod\n runTimeout\n evmChainID\n fromAddresses\n coordinatorV2PlusAddress\n trustedBlockhashStoreAddress\n trustedBlockhashStoreBatchSize\n }\n ... on BlockHeaderFeederSpec {\n coordinatorV1Address\n coordinatorV2Address\n waitBlocks\n lookbackBlocks\n blockhashStoreAddress\n batchBlockhashStoreAddress\n pollPeriod\n runTimeout\n evmChainID\n fromAddresses\n getBlockhashesBatchSize\n storeBlockhashesBatchSize\n coordinatorV2PlusAddress\n }\n ... on BootstrapSpec {\n contractID\n relay\n monitoringEndpoint\n relayConfig\n blockchainTimeout\n contractConfigTrackerPollInterval\n contractConfigConfirmations\n createdAt\n }\n ... on GatewaySpec {\n gatewayConfig\n createdAt\n }\n ... on WorkflowSpec {\n workflowID\n workflowOwner\n workflow\n }\n ... on StandardCapabilitiesSpec {\n command\n config\n createdAt\n }\n ... on StreamSpec {\n streamID\n }\n }\n"]);return y2=function(){return e},e}function y3(){var e=y1(["\n fragment JobPayload_RunsFields on JobRun {\n id\n allErrors\n status\n createdAt\n finishedAt\n }\n"]);return y3=function(){return e},e}function y4(){var e=y1(["\n fragment JobPayload_ErrorsFields on JobError {\n description\n occurrences\n createdAt\n updatedAt\n }\n"]);return y4=function(){return e},e}function y6(){var e=y1(["\n ","\n ","\n ","\n fragment JobPayload_Fields on Job {\n id\n name\n externalJobID\n observationSource\n createdAt\n schemaVersion\n type\n maxTaskDuration\n gasLimit\n forwardingAllowed\n spec {\n __typename\n ...JobPayload_Spec\n }\n runs(offset: $offset, limit: $limit) {\n results {\n ...JobPayload_RunsFields\n }\n metadata {\n total\n }\n }\n errors {\n ...JobPayload_ErrorsFields\n }\n }\n"]);return y6=function(){return e},e}var y5=n0(y2()),y8=n0(y3()),y9=n0(y4()),y7=n0(y6(),y5,y8,y9),we=function(e){var t=e.job,n=e.runsCount,r=e.onDelete,i=e.onRun,a=e.refetch,o=e.refetchRecentRuns,s=(0,h.$B)().path,u=yQ(l.useState(!1),2),c=u[0],f=u[1];return l.createElement(l.Fragment,null,l.createElement(ig,null,l.createElement(d.Z,{container:!0,spacing:32},l.createElement(d.Z,{item:!0,xs:9},l.createElement(iy,null,t.name||"--")),l.createElement(d.Z,{item:!0,xs:3,style:{textAlign:"right"}},"WebhookSpec"===t.spec.__typename&&l.createElement(aA.Z,{variant:"primary",onClick:function(){return f(!0)}},"Run"))),l.createElement(vK,{job:t,onDelete:r}),l.createElement(v2,{id:t.id,errorsCount:t.errors.length,runsCount:n,refetchRecentRuns:o}),l.createElement(h.rs,null,l.createElement(h.AW,{path:"".concat(s,"/definition")},l.createElement(yl,{job:t})),l.createElement(h.AW,{exact:!0,path:"".concat(s,"/errors")},l.createElement(yf,{job:t})),l.createElement(h.AW,{exact:!0,path:"".concat(s,"/runs")},l.createElement(yV,{job:t,fetchMore:a})),l.createElement(h.AW,{exact:!0,path:s},l.createElement(yU,{job:t})))),l.createElement(yt,{open:c,onClose:function(){return f(!1)},onRun:i}))};function wt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function wn(e){if(Array.isArray(e))return e}function wr(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function wi(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){wr(a,r,i,o,s,"next",e)}function s(e){wr(a,r,i,o,s,"throw",e)}o(void 0)})}}function wa(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function wo(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ws(e,t){return wn(e)||wa(e,t)||wc(e,t)||wo()}function wu(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function wc(e,t){if(e){if("string"==typeof e)return wt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wt(e,t)}}var wl=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};function wf(){var e=wu(["\n ","\n query FetchJob($id: ID!, $offset: Int, $limit: Int) {\n job(id: $id) {\n __typename\n ... on Job {\n ...JobPayload_Fields\n }\n ... on NotFoundError {\n message\n }\n }\n }\n"]);return wf=function(){return e},e}function wd(){var e=wu(["\n mutation DeleteJob($id: ID!) {\n deleteJob(id: $id) {\n ... on DeleteJobSuccess {\n job {\n id\n }\n }\n ... on NotFoundError {\n message\n }\n }\n }\n"]);return wd=function(){return e},e}var wh=5,wp=n0(wf(),y7),wb=n0(wd()),wm=function(e){var t=e.data;return l.createElement(l.Fragment,null,"Successfully created job run"," ",l.createElement(tz,{href:"/runs/".concat(t.id)},t.id))},wg=function(){var e=(0,h.UO)().id,t=(0,A.I0)(),n=(0,h.k6)(),r=(0,h.TH)().search,i=oq().handleMutationError,a=l.useMemo(function(){return new URLSearchParams(r)},[]),o=parseInt(a.get("page")||"1",10),s=parseInt(a.get("per")||wh.toString(),10),u=rv(wp,{variables:{id:e,offset:(o-1)*s,limit:s},fetchPolicy:"network-only"}),c=u.data,f=u.loading,d=u.error,p=u.refetch,b=ws(oo(wb),1)[0];if(f)return l.createElement(iR,null);if(d)return l.createElement(iD,{error:d});var m,g,v=(m=wi(function(){var r,a,o,s,u;return wl(this,function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),[4,b(((o={}).variables={id:e},o))];case 1:switch(null==(s=null===(r=(a=c.sent()).data)||void 0===r?void 0:r.deleteJob)?void 0:s.__typename){case"DeleteJobSuccess":n.push("/jobs"),setTimeout(function(){return t((0,ty.qt)("Successfully deleted job ".concat(e)))},200);break;case"NotFoundError":t((0,ty.LO)(s.message))}return[3,3];case 2:return i(u=c.sent()),[3,3];case 3:return[2]}})}),function(){return m.apply(this,arguments)}),y=(g=wi(function(n){return wl(this,function(r){switch(r.label){case 0:return[4,t((0,ty.tA)(e,n,wm,aN))];case 1:return r.sent(),p(),[2]}})}),function(e){return g.apply(this,arguments)}),w=function(e,t){p({offset:(e-1)*s,limit:t})},_=function(){p({offset:0,limit:wh})},E=null==c?void 0:c.job;switch(null==E?void 0:E.__typename){case"Job":return l.createElement(we,{job:E,runsCount:E.runs.metadata.total,onDelete:v,onRun:y,refetch:w,refetchRecentRuns:_});case"NotFoundError":return l.createElement(oa,null);default:return null}},wv=(0,b.withStyles)(iu)(function(e){var t=e.job,n=e.classes;return l.createElement(ir.Z,{className:n.row,hover:!0},l.createElement(r7.default,{className:n.cell,component:"th",scope:"row"},l.createElement(ih,{className:n.link,href:"/jobs/".concat(t.id)},t.id)),l.createElement(r7.default,null,""!=t.name?t.name:"--"),l.createElement(r7.default,null,vk(t.spec.__typename)),l.createElement(r7.default,null,t.externalJobID),l.createElement(r7.default,null,l.createElement(aO,{tooltip:!0},t.createdAt)))});function wy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ww(e){if(Array.isArray(e))return e}function w_(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function wE(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function wS(e,t){return ww(e)||w_(e,t)||wx(e,t)||wE()}function wk(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function wx(e,t){if(e){if("string"==typeof e)return wy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wy(e,t)}}function wT(){var e=wk(["\n fragment JobsPayload_ResultsFields on Job {\n id\n name\n externalJobID\n createdAt\n spec {\n __typename\n ... on OCRSpec {\n contractAddress\n keyBundleID\n transmitterAddress\n }\n }\n }\n"]);return wT=function(){return e},e}var wM=n0(wT()),wO=function(e){var t=e.toLowerCase();return function(e){return e.toLowerCase().includes(t)}},wA=function(e){return function(t){return""===e||wL(t,e)}};function wL(e,t){var n=wO(t),r=[e.id,e.name||"",e.spec.__typename,e.externalJobID,],i=e.spec;return"OCRSpec"==i.__typename&&["contractAddress","keyBundleID","transmitterAddress",].forEach(function(e){r.push(String(i[e]))}),r.some(n)}var wC=function(e){var t=e.jobs,n=e.page,r=e.pageSize,i=e.total,a=(0,h.k6)(),o=wS(l.useState(""),2),s=o[0],u=o[1],c=l.useMemo(function(){return wA(s.trim())},[s]);return l.createElement(ig,null,l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:9},l.createElement(iy,null,"Jobs")),l.createElement(d.Z,{item:!0,xs:3},l.createElement(d.Z,{container:!0,justify:"flex-end"},l.createElement(d.Z,{item:!0},l.createElement(aA.Z,{variant:"secondary",component:tz,href:"/jobs/new"},"New Job")))),l.createElement(d.Z,{item:!0,xs:12},l.createElement(iE,{value:s,onChange:u,placeholder:"Search jobs"}),l.createElement(r5.Z,null,l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,"ID"),l.createElement(r7.default,null,"Name"),l.createElement(r7.default,null,"Type"),l.createElement(r7.default,null,"External Job ID"),l.createElement(r7.default,null,"Created"))),l.createElement(r9.Z,null,0===t.length&&l.createElement(ir.Z,null,l.createElement(r7.default,{component:"th",scope:"row",colSpan:3},"You haven’t created any jobs yet. Create a new job"," ",l.createElement(ih,{href:"/jobs/new"},"here"))),t.filter(c).map(function(e){return l.createElement(wv,{key:e.id,job:e})}))),l.createElement(it.Z,{component:"div",count:i,rowsPerPage:r,rowsPerPageOptions:[r],page:n-1,onChangePage:function(e,t){a.push("/jobs?page=".concat(t+1,"&per=").concat(r))},onChangeRowsPerPage:function(){},backIconButtonProps:{"aria-label":"prev-page"},nextIconButtonProps:{"aria-label":"next-page"}})))))};function wI(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function wD(){var e=wI(["\n ","\n query FetchJobs($offset: Int, $limit: Int) {\n jobs(offset: $offset, limit: $limit) {\n results {\n ...JobsPayload_ResultsFields\n }\n metadata {\n total\n }\n }\n }\n"]);return wD=function(){return e},e}var wN=n0(wD(),wM),wP=function(){var e=ij(),t=parseInt(e.get("page")||"1",10),n=parseInt(e.get("per")||"1000",10),r=rv(wN,{variables:{offset:(t-1)*n,limit:n},fetchPolicy:"network-only"}),i=r.data,a=r.loading,o=r.error;return a?l.createElement(iR,null):o?l.createElement(iD,{error:o}):i?l.createElement(wC,{jobs:i.jobs.results,page:t,pageSize:n,total:i.jobs.metadata.total}):null},wR=["refetch","reobserve","fetchMore","updateQuery","startPolling","subscribeToMore",];function wj(e,t){var n,r=(0,l.useRef)(),i=(0,l.useRef)(),a=(0,l.useRef)(),o=r.current?(0,ra.J)(t,r.current):t,s=null!==(n=null==o?void 0:o.query)&&void 0!==n?n:e;i.current=o,a.current=s;var u=ry(rh(t&&t.client),s),c=u.useQuery((0,t0.pi)((0,t0.pi)({},o),{skip:!r.current})),f=c.observable.options.initialFetchPolicy||u.getDefaultFetchPolicy(),d=Object.assign(c,{called:!!r.current}),h=(0,l.useMemo)(function(){for(var e={},t=function(t){var n=d[t];e[t]=function(){return r.current||(r.current=Object.create(null),u.forceUpdate()),n.apply(this,arguments)}},n=0,i=wR;n<i.length;n++)t(i[n]);return e},[]);return Object.assign(d,h),[(0,l.useCallback)(function(e){r.current=e?(0,t0.pi)((0,t0.pi)({},e),{fetchPolicy:e.fetchPolicy||f}):{fetchPolicy:f};var t=(0,ra.J)(i.current,(0,t0.pi)({query:a.current},r.current)),n=u.executeQuery((0,t0.pi)((0,t0.pi)({},t),{skip:!1})).then(function(e){return Object.assign(e,h)});return n.catch(function(){}),n},[]),d]}function wF(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){wF(e,t,n[t])})}return e}function wB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wU(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):wB(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var wH=function(e){return e.errors.reduce(function(e,t){var n=t.path.replace(/^input\//,"");return wU(wY({},e),wF({},n,t.message))},{})},w$=n(23279),wz=n.n(w$),wG=bv().shape({toml:p0().required("Required").test("toml","Invalid TOML",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";try{return vx.parse(e),!0}catch(t){return!1}})}),wW=function(e){var t=e.initialValues,n=e.onSubmit,r=e.onTOMLChange;return l.createElement(hT,{initialValues:t,validationSchema:wG,onSubmit:n},function(e){var t=e.isSubmitting,n=e.values;return r&&r(n.toml),l.createElement(hR,{"data-testid":"job-form",noValidate:!0},l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:12},l.createElement(hP,{component:hX,id:"toml",name:"toml",label:"Job Spec (TOML)",required:!0,fullWidth:!0,multiline:!0,rows:10,rowsMax:25,variant:"outlined",autoComplete:"off",FormHelperTextProps:{"data-testid":"toml-helper-text"}})),l.createElement(d.Z,{item:!0,xs:12,md:7},l.createElement(ok.default,{variant:"contained",color:"primary",type:"submit",disabled:t,size:"large"},"Create Job"))))})},wK=n(50109),wV="persistSpec";function wq(e){var t=e.query,n=new URLSearchParams(t).get("definition");return n?(wK.t8(wV,n),{toml:n}):{toml:wK.U2(wV)||""}}var wZ=function(e){var t=e.onSubmit,n=e.onTOMLChange,r=wq({query:(0,h.TH)().search}),i=function(e){var t=e.replace(/[\u200B-\u200D\uFEFF]/g,"");wK.t8("".concat(wV),t),n&&n(t)};return l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"New Job"}),l.createElement(aW.Z,null,l.createElement(wW,{initialValues:r,onSubmit:t,onTOMLChange:i})))};function wX(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function wJ(e){if(Array.isArray(e))return e}function wQ(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function w1(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function w0(e,t){return wJ(e)||wQ(e,t)||w2(e,t)||w1()}function w2(e,t){if(e){if("string"==typeof e)return wX(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wX(e,t)}}var w3=function(e){var t=e.toml,n=w0(l.useState(""),2),r=n[0],i=n[1];return l.useEffect(function(){try{var e=vx.parse(t);e.observationSource?i(e.observationSource.trim()):i("")}catch(n){i("")}},[t]),l.createElement(yF,{observationSource:r})};function w4(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function w6(e){if(Array.isArray(e))return e}function w5(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function w8(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function w9(e,t){return w6(e)||w5(e,t)||w7(e,t)||w8()}function w7(e,t){if(e){if("string"==typeof e)return w4(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return w4(e,t)}}var _e=function(e){var t=e.onSubmit,n=w9(l.useState(""),2),r=n[0],i=n[1],a=l.useCallback(function(e){return wz()(function(){return i(e)},500)()},[i]);return l.createElement(ig,null,l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12,md:8},l.createElement(wZ,{onSubmit:t,onTOMLChange:a})),l.createElement(d.Z,{item:!0,xs:12,md:4},l.createElement(w3,{toml:r}))))};function _t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _n(e){if(Array.isArray(e))return e}function _r(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function _i(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){_r(a,r,i,o,s,"next",e)}function s(e){_r(a,r,i,o,s,"throw",e)}o(void 0)})}}function _a(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _o(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function _s(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _u(e,t){return _n(e)||_o(e,t)||_l(e,t)||_s()}function _c(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function _l(e,t){if(e){if("string"==typeof e)return _t(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _t(e,t)}}var _f=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};function _d(){var e=_c(["\n mutation CreateJob($input: CreateJobInput!) {\n createJob(input: $input) {\n ... on CreateJobSuccess {\n job {\n id\n }\n }\n ... on InputErrors {\n errors {\n path\n message\n code\n }\n }\n }\n }\n"]);return _d=function(){return e},e}var _h=n0(_d()),_p=function(e){var t=e.id;return l.createElement(l.Fragment,null,"Successfully created job"," ",l.createElement(tz,{id:"created-job",href:"/jobs/".concat(t)},t))},_b=function(){var e,t=(0,A.I0)(),n=oq().handleMutationError,r=_u(oo(_h),1)[0],i=_u(wj(wN,{variables:{offset:0,limit:1e3},fetchPolicy:"network-only"}),1)[0],a=(e=_i(function(e,a){var o,s,u,c,l,f,d,h,p,b,m,g,v,y,w;return _f(this,function(_){switch(_.label){case 0:return o=a.setErrors,[4,i()];case 1:s=_.sent(),_.label=2;case 2:return _.trys.push([2,4,,6]),[4,r(((l={}).variables={input:{TOML:e.toml}},l))];case 3:switch(f=null===(u=(c=_.sent()).data)||void 0===u?void 0:u.createJob,d={},null==f?void 0:f.__typename){case"CreateJobSuccess":t((0,ty.t5)(_p,(d.id=f.job.id,d)));break;case"InputErrors":t((0,ty.LO)("Invalid Input")),o(wH(f))}return[3,6];case 4:return h=_.sent(),[4,i()];case 5:return v=_.sent(),y=null===(p=s.data)||void 0===p?void 0:null===(b=p.jobs)||void 0===b?void 0:b.results,w=null===(m=v.data)||void 0===m?void 0:null===(g=m.jobs)||void 0===g?void 0:g.results,y&&w&&y.length<w.length&&_a(h,rs.cA)?t((0,ty.LO)("Job successfully created but could not start service: "+h.message)):n(h),[3,6];case 6:return[2]}})}),function(t,n){return e.apply(this,arguments)});return l.createElement(_e,{onSubmit:a})},_m=function(){var e=(0,h.$B)().path;return l.createElement(h.rs,null,l.createElement(h.AW,{path:"".concat(e,"/new")},l.createElement(_b,null)),l.createElement(h.AW,{path:"".concat(e,"/:id")},l.createElement(wg,null)),l.createElement(h.AW,{exact:!0,path:e},l.createElement(wP,null)))},_g=n(83173);function _v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _y(e){if(Array.isArray(e))return e}function _w(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function __(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _E(e,t){return _y(e)||_w(e,t)||_S(e,t)||__()}function _S(e,t){if(e){if("string"==typeof e)return _v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _v(e,t)}}var _k=function(e){return(0,b.createStyles)({button:{width:27,height:27,minHeight:27,marginLeft:e.spacing.unit,marginRight:e.spacing.unit},icon:{fontSize:18}})},_x=(0,b.withStyles)(_k)(function(e){var t=e.classes,n=e.data,r=_E(l.useState(!1),2),i=r[0],a=r[1];return l.createElement(yn.CopyToClipboard,{text:n,onCopy:function(){return a(!0)}},l.createElement(a_.Z,{title:"Copied!",open:i,onClose:function(){return a(!1)}},l.createElement(y.default,{className:t.button},l.createElement(_g.Z,{className:t.icon}))))});function _T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.start,r=void 0===n?6:n,i=t.end,a=void 0===i?4:i;return e.substring(0,r)+"..."+e.substring(e.length-a)}function _M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _O(e){if(Array.isArray(e))return e}function _A(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function _L(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){_A(a,r,i,o,s,"next",e)}function s(e){_A(a,r,i,o,s,"throw",e)}o(void 0)})}}function _C(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function _I(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _D(e,t){return _O(e)||_C(e,t)||_N(e,t)||_I()}function _N(e,t){if(e){if("string"==typeof e)return _M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _M(e,t)}}var _P=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},_R=function(e){return(0,b.createStyles)({container:{backgroundColor:e.palette.common.white,padding:5*e.spacing.unit,paddingBottom:0},chainId:{overflow:"hidden",textOverflow:"ellipsis"},badgePadding:{paddingLeft:2*e.spacing.unit,paddingRight:2*e.spacing.unit,marginLeft:-2*e.spacing.unit,marginRight:-2*e.spacing.unit,lineHeight:"1rem"},dialogPaper:{minHeight:"360px",maxHeight:"360px",minWidth:"670px",maxWidth:"670px",overflow:"hidden",borderRadius:3*e.spacing.unit},warningText:{fontWeight:500,marginLeft:3*e.spacing.unit,marginTop:3*e.spacing.unit,marginBottom:e.spacing.unit},closeButton:{marginRight:3*e.spacing.unit,marginTop:3*e.spacing.unit},infoText:{fontSize:2*e.spacing.unit,fontWeight:450,marginLeft:6*e.spacing.unit},modalContent:{width:"inherit"},deleteButton:{marginTop:4*e.spacing.unit},runJobButton:{marginBottom:3*e.spacing.unit},runJobModalContent:{overflow:"hidden"}})};function _j(e){var t,n=e.evmChainID,r=e.address,i={evmChainID:n,address:r,abandon:e.abandon,enabled:e.enabled};return iG.v2.evmKeys.chain(i)}var _F=function(){return l.createElement(l.Fragment,null,"Successfully updated EVM key")},_Y=function(e){var t=e.classes,n=e.ethKey,r=e.refetch,i=(0,A.I0)(),a=_D((0,l.useState)(!1),2),o=a[0],s=a[1],u=_D((0,l.useState)(!n.isDisabled),2),c=u[0],f=u[1],h=_D((0,l.useState)(!1),2),p=h[0],b=h[1],m=function(e){e.preventDefault(),w(p,c)},g=function(){f(!c)},v=function(){b(!p)},y=function(){s(!1),b(!1),f(!n.isDisabled)};function w(e,t){return _.apply(this,arguments)}function _(){return(_=_L(function(e,t){var a;return _P(this,function(o){return _j(((a={}).evmChainID=n.chain.id,a.address=n.address,a.abandon=e,a.enabled=t,a)).then(function(e){var t=e.data;r&&r(),y(),i((0,ty.t5)(_F,t))}).catch(function(e){r&&r(),y(),i((0,ty.cB)(aN,e))}),[2]})})).apply(this,arguments)}return l.createElement(l.Fragment,null,l.createElement(aD.Z,{open:o,classes:{paper:t.dialogPaper},onClose:y,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description"},l.createElement("form",{onSubmit:m},l.createElement(d.Z,{container:!0,spacing:0},l.createElement(d.Z,{item:!0,className:t.modalContent},l.createElement(d.Z,{container:!0,alignItems:"baseline",justify:"space-between"},l.createElement(d.Z,{item:!0},l.createElement(x.default,{variant:"h5",color:"secondary",className:t.warningText},"Key Admin Override"),l.createElement(x.default,{variant:"h6",color:"secondary",className:t.warningText},"Modifying key ",n.address," for chain ",n.chain.id)),l.createElement(d.Z,{item:!0},l.createElement(aI,{className:t.closeButton,onClick:y}))),l.createElement(d.Z,{container:!0,direction:"column"},l.createElement(b9.default,null,l.createElement(hz.Z,{className:t.infoText,color:"secondary",control:l.createElement(h$.Z,{name:"enabledCheckbox",checked:c,onChange:g}),label:"Enabled"})),l.createElement(b9.default,null,l.createElement(hz.Z,{className:t.infoText,color:"secondary",control:l.createElement(h$.Z,{name:"abandonCheckbox",checked:p,onChange:v}),label:"Abandon all current transactions (use with caution!)"})),l.createElement(d.Z,{container:!0,spacing:0,alignItems:"center",justify:"center"},l.createElement(d.Z,{item:!0,className:t.deleteButton},l.createElement(aA.Z,{variant:"danger",type:"submit"},"Update")))))))),l.createElement(ir.Z,{hover:!0},l.createElement(r7.default,null,l.createElement(x.default,{variant:"body1"},_T(n.address,{start:6,end:6})," ",l.createElement(_x,{data:n.address}))),l.createElement(r7.default,null,l.createElement(x.default,{variant:"body1"},n.chain.id)),l.createElement(r7.default,null,l.createElement(x.default,{variant:"body1"},n.isDisabled?"Disabled":"Enabled")),l.createElement(r7.default,null,l.createElement(x.default,{variant:"body1"},n.linkBalance&&gL(n.linkBalance))),l.createElement(r7.default,null,l.createElement(x.default,{variant:"body1"},n.ethBalance)),l.createElement(r7.default,null,l.createElement(x.default,{variant:"body1"},l.createElement(aO,{tooltip:!0},n.createdAt))),l.createElement(r7.default,null,l.createElement(x.default,{variant:"body1"},l.createElement(aA.Z,{onClick:function(){return s(!0)}},"Admin")))))},_B=(0,b.withStyles)(_R)(_Y),_U=function(e){var t,n,r=e.data,i=e.errorMsg,a=e.loading,o=e.refetch;return l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"EVM Chain Accounts"}),l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,"Address"),l.createElement(r7.default,null,"Chain ID"),l.createElement(r7.default,null,"Enabled"),l.createElement(r7.default,null,"LINK Balance"),l.createElement(r7.default,null,"Native Token Balance"),l.createElement(r7.default,null,"Created"),l.createElement(r7.default,null,"Actions"))),l.createElement(r9.Z,null,l.createElement(g$,{visible:a}),l.createElement(gz,{visible:(null===(t=null==r?void 0:r.ethKeys.results)||void 0===t?void 0:t.length)===0}),l.createElement(gU,{msg:i}),null===(n=null==r?void 0:r.ethKeys.results)||void 0===n?void 0:n.map(function(e,t){return l.createElement(_B,{ethKey:e,key:t,refetch:o})}))))};function _H(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function _$(){var e=_H(["\n fragment ETHKeysPayload_ResultsFields on EthKey {\n address\n chain {\n id\n }\n createdAt\n ethBalance\n isDisabled\n linkBalance\n }\n"]);return _$=function(){return e},e}function _z(){var e=_H(["\n ","\n query FetchETHKeys {\n ethKeys {\n results {\n ...ETHKeysPayload_ResultsFields\n }\n }\n }\n"]);return _z=function(){return e},e}var _G=n0(_$()),_W=n0(_z(),_G),_K=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return rv(_W,e)},_V=function(){var e=_K({fetchPolicy:"cache-and-network"}),t=e.data,n=e.loading,r=e.error,i=e.refetch;return l.createElement(_U,{loading:n,data:t,errorMsg:null==r?void 0:r.message,refetch:i})},_q=function(e){var t=e.csaKey;return l.createElement(ir.Z,{hover:!0},l.createElement(r7.default,null,l.createElement(x.default,{variant:"body1"},t.publicKey," ",l.createElement(_x,{data:t.publicKey}))))};function _Z(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function _X(){var e=_Z(["\n fragment CSAKeysPayload_ResultsFields on CSAKey {\n id\n publicKey\n }\n"]);return _X=function(){return e},e}var _J=n0(_X()),_Q=function(e){var t,n,r,i=e.data,a=e.errorMsg,o=e.loading,s=e.onCreate;return l.createElement(r5.Z,null,l.createElement(sl.Z,{action:(null===(t=null==i?void 0:i.csaKeys.results)||void 0===t?void 0:t.length)===0&&l.createElement(ok.default,{variant:"outlined",color:"primary",onClick:s},"New CSA Key"),title:"CSA Key",subheader:"Manage your CSA Key"}),l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,"Public Key"))),l.createElement(r9.Z,null,l.createElement(g$,{visible:o}),l.createElement(gz,{visible:(null===(n=null==i?void 0:i.csaKeys.results)||void 0===n?void 0:n.length)===0}),l.createElement(gU,{msg:a}),null===(r=null==i?void 0:i.csaKeys.results)||void 0===r?void 0:r.map(function(e,t){return l.createElement(_q,{csaKey:e,key:t})}))))};function _1(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _0(e){if(Array.isArray(e))return e}function _2(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function _3(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){_2(a,r,i,o,s,"next",e)}function s(e){_2(a,r,i,o,s,"throw",e)}o(void 0)})}}function _4(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function _6(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _5(e,t){return _0(e)||_4(e,t)||_9(e,t)||_6()}function _8(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function _9(e,t){if(e){if("string"==typeof e)return _1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _1(e,t)}}var _7=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};function Ee(){var e=_8(["\n ","\n query FetchCSAKeys {\n csaKeys {\n results {\n ...CSAKeysPayload_ResultsFields\n }\n }\n }\n"]);return Ee=function(){return e},e}function Et(){var e=_8(["\n mutation CreateCSAKey {\n createCSAKey {\n ... on CreateCSAKeySuccess {\n csaKey {\n id\n }\n }\n ... on CSAKeyExistsError {\n message\n }\n }\n }\n"]);return Et=function(){return e},e}var En=n0(Ee(),_J),Er=n0(Et()),Ei=function(){var e,t=(0,A.I0)(),n=oq().handleMutationError,r=rv(En,{fetchPolicy:"network-only"}),i=r.data,a=r.loading,o=r.error,s=r.refetch,u=_5(oo(Er),1)[0],c=(e=_3(function(){var e,r,i,a;return _7(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,u()];case 1:return(null==(i=null===(e=(r=o.sent()).data)||void 0===e?void 0:e.createCSAKey)?void 0:i.__typename)==="CreateCSAKeySuccess"&&(t((0,ty.qt)("CSA Key created")),s()),[3,3];case 2:return n(a=o.sent()),[3,3];case 3:return[2]}})}),function(){return e.apply(this,arguments)});return l.createElement(_Q,{loading:a,data:i,errorMsg:null==o?void 0:o.message,onCreate:c})},Ea=function(e){var t=e.keyType,n=e.keyValue;return(0,ty.qt)("Successfully created ".concat(t,": ").concat(n))},Eo=function(e){var t=e.keyType;return(0,ty.qt)("Successfully deleted ".concat(t," Key"))},Es=n(10632),Eu=n(90338),Ec=n(34064),El=function(e){return(0,b.createStyles)({listItemPrimary:{marginBottom:e.spacing.unit},listItemSecondary:{color:e.palette.grey[600]},avatar:{backgroundColor:e.palette.primary.main}})},Ef=(0,b.withStyles)(El)(function(e){var t=e.classes,n=e.primary,r=e.secondary;return l.createElement(w.default,{dense:!0},l.createElement(_.default,null,l.createElement(oc.Z,null,l.createElement(Eu.Z,{className:t.avatar},l.createElement(Ec.Z,null))),l.createElement(E.Z,{primary:l.createElement(x.default,{className:t.listItemPrimary,variant:"body1",component:"span"},n),secondary:r.map(function(e,n){return l.createElement(x.default,{key:n,className:t.listItemSecondary,variant:"subtitle2",component:"span"},e)})})))}),Ed=function(e){var t=e.bundle,n=e.onDelete;return l.createElement(ir.Z,{hover:!0},l.createElement(r7.default,null,l.createElement(Ef,{primary:l.createElement("b",null,"Key ID: ",t.id," ",l.createElement(_x,{data:t.id})),secondary:[l.createElement(l.Fragment,null,"Config Public Key: ",t.configPublicKey),l.createElement(l.Fragment,null,"Signing Address: ",t.onChainSigningAddress),l.createElement(l.Fragment,null,"Off-Chain Public Key: ",t.offChainPublicKey),]})),l.createElement(r7.default,{align:"right"},l.createElement(aA.Z,{onClick:n,variant:"danger",size:"medium"},"Delete")))};function Eh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ep(e){if(Array.isArray(e))return e}function Eb(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function Em(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){Eb(a,r,i,o,s,"next",e)}function s(e){Eb(a,r,i,o,s,"throw",e)}o(void 0)})}}function Eg(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function Ev(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ey(e,t){return Ep(e)||Eg(e,t)||Ew(e,t)||Ev()}function Ew(e,t){if(e){if("string"==typeof e)return Eh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Eh(e,t)}}var E_=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},EE=function(e){var t,n,r=e.data,i=e.errorMsg,a=e.loading,o=e.onCreate,s=e.onDelete,u=Ey(l.useState(null),2),c=u[0],f=u[1];return l.createElement(l.Fragment,null,l.createElement(r5.Z,null,l.createElement(sl.Z,{action:l.createElement(ok.default,{variant:"outlined",color:"primary",onClick:o},"New OCR Key"),title:"Off-Chain Reporting Keys",subheader:"Manage your Off-Chain Reporting Key Bundles"}),l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,"Key Bundle"),l.createElement(r7.default,{align:"right"}))),l.createElement(r9.Z,null,l.createElement(g$,{visible:a}),l.createElement(gz,{visible:(null===(t=null==r?void 0:r.ocrKeyBundles.results)||void 0===t?void 0:t.length)===0}),l.createElement(gU,{msg:i}),null===(n=null==r?void 0:r.ocrKeyBundles.results)||void 0===n?void 0:n.map(function(e,t){return l.createElement(Ed,{bundle:e,key:t,onDelete:function(){return f(e.id)}})})))),l.createElement(oC,{open:!!c,maxWidth:!1,title:"Delete OCR Key Bundle",body:l.createElement(Es.Z,{label:c}),confirmButtonText:"Confirm",onConfirm:Em(function(){return E_(this,function(e){switch(e.label){case 0:if(!c)return[3,2];return[4,s(c)];case 1:e.sent(),f(null),e.label=2;case 2:return[2]}})}),cancelButtonText:"Cancel",onCancel:function(){return f(null)}}))};function ES(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Ek(){var e=ES(["\n fragment OCRKeyBundlesPayload_ResultsFields on OCRKeyBundle {\n id\n configPublicKey\n offChainPublicKey\n onChainSigningAddress\n }\n"]);return Ek=function(){return e},e}function Ex(){var e=ES(["\n ","\n query FetchOCRKeyBundles {\n ocrKeyBundles {\n results {\n ...OCRKeyBundlesPayload_ResultsFields\n }\n }\n }\n"]);return Ex=function(){return e},e}var ET=n0(Ek()),EM=n0(Ex(),ET),EO=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return rv(EM,e)};function EA(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function EL(e){if(Array.isArray(e))return e}function EC(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function EI(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){EC(a,r,i,o,s,"next",e)}function s(e){EC(a,r,i,o,s,"throw",e)}o(void 0)})}}function ED(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function EN(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function EP(e,t){return EL(e)||ED(e,t)||Ej(e,t)||EN()}function ER(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Ej(e,t){if(e){if("string"==typeof e)return EA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return EA(e,t)}}var EF=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};function EY(){var e=ER(["\n mutation CreateOCRKeyBundle {\n createOCRKeyBundle {\n ... on CreateOCRKeyBundleSuccess {\n bundle {\n id\n }\n }\n }\n }\n"]);return EY=function(){return e},e}function EB(){var e=ER(["\n mutation DeleteOCRKeyBundle($id: ID!) {\n deleteOCRKeyBundle(id: $id) {\n ... on DeleteOCRKeyBundleSuccess {\n bundle {\n id\n }\n }\n }\n }\n"]);return EB=function(){return e},e}var EU=n0(EY()),EH=n0(EB()),E$=function(){var e,t,n=(0,A.I0)(),r=oq().handleMutationError,i=EO({fetchPolicy:"network-only"}),a=i.data,o=i.loading,s=i.error,u=i.refetch,c=EP(oo(EU),1)[0],f=EP(oo(EH),1)[0],d=(e=EI(function(){var e,t,i,a,o;return EF(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,c()];case 1:return i=null===(e=(t=s.sent()).data)||void 0===e?void 0:e.createOCRKeyBundle,a={},(null==i?void 0:i.__typename)==="CreateOCRKeyBundleSuccess"&&(n(Ea((a.keyType="Off-ChainReporting Key Bundle",a.keyValue=i.bundle.id,a))),u()),[3,3];case 2:return r(o=s.sent()),[3,3];case 3:return[2]}})}),function(){return e.apply(this,arguments)}),h=(t=EI(function(e){var t,i,a,o,s,c;return EF(this,function(l){switch(l.label){case 0:return l.trys.push([0,2,,3]),[4,f(((a={}).variables={id:e},a))];case 1:return o=null===(t=(i=l.sent()).data)||void 0===t?void 0:t.deleteOCRKeyBundle,s={},(null==o?void 0:o.__typename)==="DeleteOCRKeyBundleSuccess"&&(n(Eo((s.keyType="Off-ChainReporting Key Bundle",s))),u()),[3,3];case 2:return r(c=l.sent()),[3,3];case 3:return[2]}})}),function(e){return t.apply(this,arguments)});return l.createElement(EE,{loading:o,data:a,errorMsg:null==s?void 0:s.message,onCreate:d,onDelete:h})},Ez=function(e){var t=e.bundle,n=e.onDelete;return l.createElement(ir.Z,{hover:!0},l.createElement(r7.default,null,l.createElement(Ef,{primary:l.createElement("b",null,"Key ID: ",t.id," ",l.createElement(_x,{data:t.id})),secondary:[l.createElement(l.Fragment,null,"Chain Type: ",t.chainType),l.createElement(l.Fragment,null,"Config Public Key: ",t.configPublicKey),l.createElement(l.Fragment,null,"On-Chain Public Key: ",t.onChainPublicKey),l.createElement(l.Fragment,null,"Off-Chain Public Key: ",t.offChainPublicKey),]})),l.createElement(r7.default,{align:"right"},l.createElement(aA.Z,{onClick:n,variant:"danger",size:"medium"},"Delete")))};function EG(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function EW(){var e=EG(["\n fragment OCR2KeyBundlesPayload_ResultsFields on OCR2KeyBundle {\n id\n chainType\n configPublicKey\n onChainPublicKey\n offChainPublicKey\n }\n"]);return EW=function(){return e},e}function EK(){var e=EG(["\n ","\n query FetchOCR2KeyBundles {\n ocr2KeyBundles {\n results {\n ...OCR2KeyBundlesPayload_ResultsFields\n }\n }\n }\n"]);return EK=function(){return e},e}function EV(){var e=EG(["\n mutation DeleteOCR2KeyBundle($id: ID!) {\n deleteOCR2KeyBundle(id: $id) {\n ... on DeleteOCR2KeyBundleSuccess {\n bundle {\n id\n }\n }\n }\n }\n"]);return EV=function(){return e},e}function Eq(){var e=EG(["\n mutation createOCR2KeyBundle($chainType: OCR2ChainType!) {\n createOCR2KeyBundle(chainType: $chainType) {\n ... on CreateOCR2KeyBundleSuccess {\n bundle {\n chainType\n configPublicKey\n id\n offChainPublicKey\n onChainPublicKey\n }\n }\n }\n }\n"]);return Eq=function(){return e},e}function EZ(){var e=EG(['\n query GetChainFamily {\n __type(name: "OCR2ChainType") {\n enumValues {\n name\n }\n }\n }\n']);return EZ=function(){return e},e}var EX=n0(EW()),EJ=n0(EK(),EX),EQ=n0(EV()),E1=n0(Eq()),E0=n0(EZ()),E2=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return rv(EJ,e)},E3=function(){return oo(EQ)},E4=function(){return oo(E1)},E6=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return rv(E0,e)};function E5(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function E8(e){if(Array.isArray(e))return e}function E9(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function E7(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Se(e,t){return E8(e)||E9(e,t)||St(e,t)||E7()}function St(e,t){if(e){if("string"==typeof e)return E5(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return E5(e,t)}}var Sn=function(e){var t=e.showCreateKeyDialog,n=e.setToggleCreateKeyDialog,r=e.onCreate,i=Se(l.useState(void 0),2),a=i[0],o=i[1],s=E6(),u=s.loading,c=s.error,f=s.data;if(u||c)return l.createElement("div",null);var d=function(e){o(e.target.value)},h=function(){n(!1),void 0!=a&&r(a)},p=null==f?void 0:f.__type.enumValues.map(function(e){return e.name});return a||o(p[0]),l.createElement(oC,{open:t,maxWidth:!1,title:"Create OCR2 Key Bundle",body:l.createElement(iw.Z,{id:"ocr2-create-key",name:"ocr2 create key",fullWidth:!0,select:!0,label:"Chain type",value:a,onChange:d,helperText:"Create OCR2 Key bundle"},null==p?void 0:p.map(function(e){return l.createElement(tE.default,{key:e,value:e,name:e},e)})),confirmButtonText:"Create",confirmButtonEnabled:!a,onConfirm:h,cancelButtonText:"Cancel",onCancel:function(){return n(!1)}})};function Sr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Si(e){if(Array.isArray(e))return e}function Sa(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function So(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){Sa(a,r,i,o,s,"next",e)}function s(e){Sa(a,r,i,o,s,"throw",e)}o(void 0)})}}function Ss(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function Su(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Sc(e,t){return Si(e)||Ss(e,t)||Sl(e,t)||Su()}function Sl(e,t){if(e){if("string"==typeof e)return Sr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Sr(e,t)}}var Sf=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Sd=function(e){var t,n,r=e.data,i=e.loading,a=e.onDelete,o=e.onCreate,s=Sc(l.useState(null),2),u=s[0],c=s[1],f=Sc(l.useState(!1),2),d=f[0],h=f[1];return l.createElement(l.Fragment,null,l.createElement(r5.Z,null,l.createElement(sl.Z,{action:l.createElement(ok.default,{variant:"outlined",color:"primary",onClick:function(){return h(!0)}},"New OCR2 Key"),title:"Off-Chain Reporting 2 Keys",subheader:"Manage your Off-Chain Reporting 2 Key Bundles"}),l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,"Key Bundle"),l.createElement(r7.default,{align:"right"}))),l.createElement(r9.Z,null,l.createElement(g$,{visible:i}),l.createElement(gz,{visible:(null===(t=null==r?void 0:r.ocr2KeyBundles.results)||void 0===t?void 0:t.length)===0}),null===(n=null==r?void 0:r.ocr2KeyBundles.results)||void 0===n?void 0:n.map(function(e,t){return l.createElement(Ez,{bundle:e,key:t,onDelete:function(){return c(e.id)}})})))),l.createElement(oC,{open:!!u,maxWidth:!1,title:"Delete OCR2 Key Bundle",body:l.createElement(Es.Z,{label:u}),confirmButtonText:"Confirm",onConfirm:So(function(){return Sf(this,function(e){switch(e.label){case 0:if(!u)return[3,2];return[4,a(u)];case 1:e.sent(),c(null),e.label=2;case 2:return[2]}})}),cancelButtonText:"Cancel",onCancel:function(){return c(null)}}),l.createElement(Sn,{onCreate:o,showCreateKeyDialog:d,setToggleCreateKeyDialog:h}))};function Sh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Sp(e){if(Array.isArray(e))return e}function Sb(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Sm(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function Sg(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Sv(e,t){return Sp(e)||Sm(e,t)||Sy(e,t)||Sg()}function Sy(e,t){if(e){if("string"==typeof e)return Sh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Sh(e,t)}}var Sw=function(){var e=Sv(l.useState(),2),t=e[0],n=e[1],r=(0,h.k6)(),i=(0,A.I0)();return l.useEffect(function(){if(t){if(Sb(t,rs.cA)){var e=!0,n=!1,a=void 0;try{for(var o,s=t.graphQLErrors[Symbol.iterator]();!(e=(o=s.next()).done);e=!0){var u,c=o.value;if((null===(u=c.extensions)||void 0===u?void 0:u.code)=="UNAUTHORIZED"){i((0,ty.LO)("Unauthorized, please log in with proper credentials")),i((0,ty.Jc)()),r.push("/signin");return}}}catch(l){n=!0,a=l}finally{try{e||null==s.return||s.return()}finally{if(n)throw a}}}i((0,ty.LO)(t.message||"An error occurred"))}},[i,t,r]),{handleQueryError:n}};function S_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function SE(e){if(Array.isArray(e))return e}function SS(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function Sk(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){SS(a,r,i,o,s,"next",e)}function s(e){SS(a,r,i,o,s,"throw",e)}o(void 0)})}}function Sx(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function ST(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function SM(e,t){return SE(e)||Sx(e,t)||SO(e,t)||ST()}function SO(e,t){if(e){if("string"==typeof e)return S_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S_(e,t)}}var SA=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},SL=function(){var e,t,n=(0,A.I0)(),r=Sw().handleQueryError,i=E2({fetchPolicy:"network-only",onError:r}),a=i.data,o=i.loading,s=i.refetch,u=SM(E3(),1)[0],c=SM(E4(),1)[0],f=(e=Sk(function(e){var t,i,a,o,c,l;return SA(this,function(f){switch(f.label){case 0:return f.trys.push([0,2,,3]),[4,u(((a={}).variables={id:e},a))];case 1:return o=null===(t=(i=f.sent()).data)||void 0===t?void 0:t.deleteOCR2KeyBundle,c={},(null==o?void 0:o.__typename)==="DeleteOCR2KeyBundleSuccess"&&(n(Eo((c.keyType="Off-ChainReporting Key Bundle",c))),s()),[3,3];case 2:return r(l=f.sent()),[3,3];case 3:return[2]}})}),function(t){return e.apply(this,arguments)}),d=(t=Sk(function(e){var t,i,a,o,u;return SA(this,function(l){switch(l.label){case 0:return l.trys.push([0,2,,3]),[4,c(((a={}).variables={chainType:e},a))];case 1:return(null==(o=null===(t=(i=l.sent()).data)||void 0===t?void 0:t.createOCR2KeyBundle)?void 0:o.__typename)==="CreateOCR2KeyBundleSuccess"&&(n((0,ty.qt)(e+" OCR2 key bundle created")),s()),[3,3];case 2:return r(u=l.sent()),[3,3];case 3:return[2]}})}),function(e){return t.apply(this,arguments)});return l.createElement(Sd,{loading:o,data:a,onDelete:f,onCreate:d})},SC=function(e){return(0,b.createStyles)({cardContent:{padding:0,"&:last-child":{padding:0}},avatar:{backgroundColor:e.palette.grey[800]}})},SI=(0,b.withStyles)(SC)(function(e){var t=e.classes,n=e.p2pKey,r=e.onDelete;return l.createElement(ir.Z,{hover:!0},l.createElement(r7.default,null,l.createElement(Ef,{classes:{avatar:t.avatar},primary:l.createElement("b",null,"Peer ID: ",n.peerID," ",l.createElement(_x,{data:n.peerID})),secondary:[l.createElement(l.Fragment,null,"Public Key: ",n.publicKey)]})),l.createElement(r7.default,{align:"right"},l.createElement(aA.Z,{onClick:r,variant:"danger",size:"medium"},"Delete")))});function SD(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function SN(e){if(Array.isArray(e))return e}function SP(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function SR(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){SP(a,r,i,o,s,"next",e)}function s(e){SP(a,r,i,o,s,"throw",e)}o(void 0)})}}function Sj(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function SF(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function SY(e,t){return SN(e)||Sj(e,t)||SB(e,t)||SF()}function SB(e,t){if(e){if("string"==typeof e)return SD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return SD(e,t)}}var SU=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},SH=function(e){var t,n,r=e.data,i=e.errorMsg,a=e.loading,o=e.onCreate,s=e.onDelete,u=SY(l.useState(null),2),c=u[0],f=u[1];return l.createElement(l.Fragment,null,l.createElement(r5.Z,null,l.createElement(sl.Z,{action:l.createElement(ok.default,{variant:"outlined",color:"primary",onClick:o},"New P2P Key"),title:"P2P Keys",subheader:"Manage your P2P Key Bundles"}),l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,"Key Bundle"),l.createElement(r7.default,{align:"right"}))),l.createElement(r9.Z,null,l.createElement(g$,{visible:a}),l.createElement(gz,{visible:(null===(t=null==r?void 0:r.p2pKeys.results)||void 0===t?void 0:t.length)===0}),l.createElement(gU,{msg:i}),null===(n=null==r?void 0:r.p2pKeys.results)||void 0===n?void 0:n.map(function(e,t){return l.createElement(SI,{p2pKey:e,key:t,onDelete:function(){return f(e.id)}})})))),l.createElement(oC,{open:!!c,maxWidth:!1,title:"Delete OCR Key Bundle",body:l.createElement(Es.Z,{label:c}),confirmButtonText:"Confirm",onConfirm:SR(function(){return SU(this,function(e){switch(e.label){case 0:if(!c)return[3,2];return[4,s(c)];case 1:e.sent(),f(null),e.label=2;case 2:return[2]}})}),cancelButtonText:"Cancel",onCancel:function(){return f(null)}}))};function S$(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Sz(){var e=S$(["\n fragment P2PKeysPayload_ResultsFields on P2PKey {\n id\n peerID\n publicKey\n }\n"]);return Sz=function(){return e},e}function SG(){var e=S$(["\n ","\n query FetchP2PKeys {\n p2pKeys {\n results {\n ...P2PKeysPayload_ResultsFields\n }\n }\n }\n"]);return SG=function(){return e},e}var SW=n0(Sz()),SK=n0(SG(),SW),SV=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return rv(SK,e)};function Sq(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function SZ(e){if(Array.isArray(e))return e}function SX(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function SJ(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){SX(a,r,i,o,s,"next",e)}function s(e){SX(a,r,i,o,s,"throw",e)}o(void 0)})}}function SQ(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function S1(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function S0(e,t){return SZ(e)||SQ(e,t)||S3(e,t)||S1()}function S2(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function S3(e,t){if(e){if("string"==typeof e)return Sq(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Sq(e,t)}}var S4=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};function S6(){var e=S2(["\n ","\n mutation CreateP2PKey {\n createP2PKey {\n ... on CreateP2PKeySuccess {\n p2pKey {\n ...P2PKeysPayload_ResultsFields\n }\n }\n }\n }\n"]);return S6=function(){return e},e}function S5(){var e=S2(["\n ","\n mutation DeleteP2PKey($id: ID!) {\n deleteP2PKey(id: $id) {\n ... on DeleteP2PKeySuccess {\n p2pKey {\n ...P2PKeysPayload_ResultsFields\n }\n }\n }\n }\n"]);return S5=function(){return e},e}var S8=n0(S6(),SW),S9=n0(S5(),SW),S7=function(){var e,t,n=(0,A.I0)(),r=oq().handleMutationError,i=SV(),a=i.data,o=i.loading,s=i.error,u=i.refetch,c=S0(oo(S8),1)[0],f=S0(oo(S9),1)[0],d=(e=SJ(function(){var e,t,i,a,o;return S4(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,c()];case 1:return i=null===(e=(t=s.sent()).data)||void 0===e?void 0:e.createP2PKey,a={},(null==i?void 0:i.__typename)==="CreateP2PKeySuccess"&&(n(Ea((a.keyType="P2P Key",a.keyValue=i.p2pKey.id,a))),u()),[3,3];case 2:return r(o=s.sent()),[3,3];case 3:return[2]}})}),function(){return e.apply(this,arguments)}),h=(t=SJ(function(e){var t,i,a,o,s,c;return S4(this,function(l){switch(l.label){case 0:return l.trys.push([0,2,,3]),[4,f(((a={}).variables={id:e},a))];case 1:return o=null===(t=(i=l.sent()).data)||void 0===t?void 0:t.deleteP2PKey,s={},(null==o?void 0:o.__typename)==="DeleteP2PKeySuccess"&&(n(Eo((s.keyType="P2P",s))),u()),[3,3];case 2:return r(c=l.sent()),[3,3];case 3:return[2]}})}),function(e){return t.apply(this,arguments)});return l.createElement(SH,{loading:o,data:a,errorMsg:null==s?void 0:s.message,onCreate:d,onDelete:h})},ke=function(e){var t=e.isCSAKeysFeatureEnabled;return l.createElement(ig,null,l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12},l.createElement(E$,null)),l.createElement(d.Z,{item:!0,xs:12},l.createElement(SL,null)),l.createElement(d.Z,{item:!0,xs:12},l.createElement(S7,null)),l.createElement(d.Z,{item:!0,xs:12},l.createElement(_V,null)),l.createElement(d.Z,{item:!0,xs:12},t&&l.createElement(Ei,null))))},kt=function(){var e=rL(i.CSA);return l.createElement(ke,{isCSAKeysFeatureEnabled:e})},kn=function(){return l.createElement(kt,null)},kr=function(e){var t=e.errors;return l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Errors"}),l.createElement("ul",null,t.map(function(e,t){return l.createElement("li",{key:e+t},l.createElement(x.default,{variant:"body1"},e))})))},ki=function(e){var t=e.run;return l.createElement(oh,null,l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12,sm:4,md:2},l.createElement(op,{title:"ID"}),l.createElement(ob,{value:t.id})),l.createElement(d.Z,{item:!0,xs:12,sm:4,md:6},l.createElement(op,{title:"Job"}),l.createElement(ih,{href:"/jobs/".concat(t.job.id),color:"primary"},t.job.name)),l.createElement(d.Z,{item:!0,xs:12,sm:6,md:2},l.createElement(op,{title:"Started"}),l.createElement(ob,null,l.createElement(aO,{tooltip:!0},t.createdAt))),l.createElement(d.Z,{item:!0,xs:12,sm:6,md:2},l.createElement(op,{title:"Finished"}),l.createElement(ob,null,t.finishedAt?l.createElement(aO,{tooltip:!0},t.finishedAt):"--"))))};function ka(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ko,ks=function(e){return(0,b.createStyles)({tabs:{marginTop:4*e.spacing.unit,marginBottom:2.5*e.spacing.unit,borderBottom:"1px solid ".concat(e.palette.grey["300"])},badge:{padding:"0 ".concat(2*e.spacing.unit,"px")}})};(ko=u||(u={}))[ko.Overview=0]="Overview",ko[ko.JSON=1]="JSON";var ku=(0,b.withStyles)(ks)(function(e){var t=e.classes,n=e.id,r=(0,h.TH)().pathname,i=l.useMemo(function(){var e;return ka(e={},u.Overview,"/runs/".concat(n)),ka(e,u.JSON,"/runs/".concat(n,"/json")),e},[n]);return l.createElement(vq.Z,{value:r,className:t.tabs,indicatorColor:"primary"},l.createElement(vJ,{label:"Overview",to:i[u.Overview],value:i[u.Overview]}),l.createElement(vJ,{label:"JSON",to:i[u.JSON],value:i[u.JSON]}))}),kc=1e3,kl=60,kf=3600;function kd(e,t){if(""===e&&""===t)return"";var n=kh(new Date(e),new Date(t));return kp(Math.floor(n/kf),Math.floor(n%kf/kl),Math.ceil(n%kf%kl))}function kh(e,t){return t.getTime()/kc-e.getTime()/kc}function kp(e,t,n){return"".concat(e?"".concat(e,"h"):"").concat(t?"".concat(t,"m"):"").concat(n,"s")}var kb=function(e){var t=e.start,n=e.end,r=e.className;return l.createElement(x.default,{variant:"h6",className:r},kd(t,n))};function km(e){return"string"!=typeof e?e:e.toLowerCase().replace(/_/g," ").replace(/(?:^|\s|-)\S/g,function(e){return e.toUpperCase()})}var kg,kv=function(e){return(0,b.createStyles)({cardContent:{display:"flex","&:last-child":{paddingBottom:2*e.spacing.unit}},completed:{backgroundColor:e.palette.success.light},errored:{backgroundColor:e.palette.error.light},running:{backgroundColor:e.palette.warning.light},body:{marginLeft:2*e.spacing.unit},statusText:{display:"inline-block",textTransform:"capitalize",color:e.palette.secondary.main},elapsedText:{color:e.typography.display1.color}})},ky=(0,b.withStyles)(kv)(function(e){var t=e.classes,n=e.status,r=e.startedAt,i=e.finishedAt,a=l.useMemo(function(){switch(n){case"COMPLETED":case"ERRORED":return i;case"RUNNING":return Date.now();default:return null}},[n,i]),o=t[n.toLowerCase()]||t.running;return l.createElement(r5.Z,null,l.createElement(aW.Z,{className:O()(t.cardContent,o)},l.createElement(g3,{width:64,status:n}),l.createElement("div",{className:t.body},l.createElement(x.default,{className:t.statusText,variant:"h5"},km(n)),a&&l.createElement(kb,{start:r,end:a,className:t.elapsedText}))))});(kg=c||(c={})).UNKNOWN="UNKNOWN",kg.PENDING="PENDING",kg.ERROR="ERROR",kg.COMPLETE="COMPLETE";var kw=function(e){var t=e.status,n=e.width,r=e.height;switch(t){case c.COMPLETE:return l.createElement(g2,{width:n,height:r,"data-testid":"complete-run-icon"});case c.ERROR:return l.createElement(gK,{width:n,height:r,"data-testid":"error-run-icon"});case c.PENDING:return l.createElement(gQ,{width:n,height:r,"data-testid":"pending-run-icon"});default:return l.createElement(gZ,{width:n,height:r,"data-testid":"default-run-icon"})}};function k_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function kE(e){if(Array.isArray(e))return e}function kS(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function kk(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function kx(e,t){return kE(e)||kS(e,t)||kT(e,t)||kk()}function kT(e,t){if(e){if("string"==typeof e)return k_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k_(e,t)}}var kM=function(e){return(0,b.createStyles)({root:{display:"flex",borderBottom:"1px solid rgba(0, 0, 0, 0.12);",padding:2*e.spacing.unit,"&:last-child":{borderBottom:"none"}},content:{flex:1,overflow:"auto",paddingLeft:2*e.spacing.unit},heading:{lineHeight:"".concat(5*e.spacing.unit,"px")},subheading:{color:e.palette.grey[500]},text:{marginBottom:e.spacing.unit,marginTop:e.spacing.unit},attributeKey:{fontWeight:e.typography.fontWeightLight}})},kO=(0,b.withStyles)(kM)(function(e){var t,n=e.attrs,r=e.classes,i=e.dotID,a=e.output,o=e.error,s=e.type;return t=o?c.ERROR:"null"==a?c.PENDING:c.COMPLETE,l.createElement("div",{className:r.root},l.createElement("div",null,l.createElement(kw,{status:t,width:40,height:40})),l.createElement("div",{className:r.content},l.createElement(x.default,{className:r.heading,variant:"h5"},i," ",l.createElement("small",{className:r.subheading},s)),[c.COMPLETE,c.ERROR].includes(t)&&l.createElement(x.default,{className:r.text,variant:"body1"},t===c.COMPLETE?a:o),n&&Object.entries(n).map(function(e){var t=kx(e,2),n=t[0],i=t[1];return"type"===n?null:l.createElement(x.default,{key:n,variant:"body1"},l.createElement("span",{className:r.attributeKey},n),": ",i)})))});function kA(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kL(){return(kL=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function kC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){kA(e,t,n[t])})}return e}function kI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kD(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):kI(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var kN=function(e){var t=e.taskRuns,n=e.observationSource,r=l.useMemo(function(){return yg("digraph {".concat(n,"}")).map(function(e){var n=t.find(function(t){return t.dotID===e.id});if(n)return kD(kC({},n),{attrs:e.attributes})})},[n,t]);return l.createElement(r5.Z,null,r.map(function(e,t){return e?l.createElement(kO,kL({},e,{key:t})):null}))},kP=n(63731),kR=n.n(kP),kj=n(93379),kF=n.n(kj),kY=n(97362),kB=n.n(kY),kU={};kU.insert="head",kU.singleton=!1,kF()(kB(),kU),kB().locals;var kH=function(e){var t=e.object;return l.createElement("div",{dangerouslySetInnerHTML:{__html:kR()(t)},"data-testid":"pretty-json"})};function k$(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kz(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){k$(e,t,n[t])})}return e}function kG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kW(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):kG(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function kK(e,t){if(null==e)return{};var n,r,i=kV(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function kV(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var kq=function(e){var t=e.run,n=l.useMemo(function(){var e=t.inputs,n=t.outputs,r=t.taskRuns,i=kK(t,["inputs","outputs","taskRuns"]),a={};try{a=JSON.parse(e)}catch(o){a={}}return kW(kz({},i),{inputs:a,outputs:n,taskRuns:r})},[t]);return l.createElement(r5.Z,null,l.createElement(aW.Z,null,l.createElement(kH,{object:n})))};function kZ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){kZ(e,t,n[t])})}return e}function kJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kQ(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):kJ(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function k1(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function k0(){var e=k1(["\n fragment JobRunPayload_TaskRunsFields on TaskRun {\n id\n createdAt\n dotID\n error\n finishedAt\n output\n type\n }\n"]);return k0=function(){return e},e}function k2(){var e=k1(["\n ","\n fragment JobRunPayload_Fields on JobRun {\n id\n allErrors\n createdAt\n fatalErrors\n finishedAt\n inputs\n job {\n id\n name\n observationSource\n }\n outputs\n status\n taskRuns {\n ...JobRunPayload_TaskRunsFields\n }\n }\n"]);return k2=function(){return e},e}var k3=n0(k0()),k4=n0(k2(),k3),k6=function(e){var t=e.run,n=(0,h.$B)().path,r=t.taskRuns.reduce(function(e,t){var n;return n=t.error?c.ERROR:"null"==t.output?c.PENDING:c.COMPLETE,kQ(kX({},e),kZ({},t.dotID,{status:n}))},{});return 0==t.allErrors.length&&yg("digraph {".concat(t.job.observationSource,"}")).forEach(function(e){var t;r[e.id]=kQ(kX({},e.attributes),{status:(null===(t=r[e.id])||void 0===t?void 0:t.status)||c.COMPLETE})}),l.createElement(ig,null,l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:12},l.createElement(iy,null,"Job Run #",t.id))),l.createElement(ki,{run:t}),l.createElement(ku,{id:t.id}),l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:4},l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12},l.createElement(ky,{status:t.status,startedAt:t.createdAt,finishedAt:t.finishedAt})),l.createElement(d.Z,{item:!0,xs:12},l.createElement(yF,{observationSource:t.job.observationSource,attributes:r})))),l.createElement(d.Z,{item:!0,xs:8},l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12},t.allErrors.length>0&&l.createElement(kr,{errors:t.allErrors})),l.createElement(d.Z,{item:!0,xs:12},l.createElement(h.rs,null,l.createElement(h.AW,{path:"".concat(n,"/json")},l.createElement(kq,{run:t})),l.createElement(h.AW,{path:n},t.taskRuns.length>0&&l.createElement(kN,{taskRuns:t.taskRuns,observationSource:t.job.observationSource}))))))))};function k5(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function k8(){var e=k5(["\n ","\n query FetchJobRun($id: ID!) {\n jobRun(id: $id) {\n __typename\n ... on JobRun {\n ...JobRunPayload_Fields\n }\n ... on NotFoundError {\n message\n }\n }\n }\n"]);return k8=function(){return e},e}var k9=n0(k8(),k4),k7=function(){var e=rv(k9,{variables:{id:(0,h.UO)().id}}),t=e.data,n=e.loading,r=e.error;if(n)return l.createElement(iR,null);if(r)return l.createElement(iD,{error:r});var i=null==t?void 0:t.jobRun;switch(null==i?void 0:i.__typename){case"JobRun":return l.createElement(k6,{run:i});case"NotFoundError":return l.createElement(oa,null);default:return null}};function xe(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function xt(){var e=xe(["\n fragment JobRunsPayload_ResultsFields on JobRun {\n id\n allErrors\n createdAt\n finishedAt\n status\n job {\n id\n }\n }\n"]);return xt=function(){return e},e}var xn=n0(xt()),xr=function(e){var t=e.loading,n=e.data,r=e.page,i=e.pageSize,a=(0,h.k6)(),o=l.useMemo(function(){return null==n?void 0:n.jobRuns.results.map(function(e){var t,n=e.allErrors,r=e.id,i=e.createdAt;return{id:r,createdAt:i,errors:n,finishedAt:e.finishedAt,status:e.status}})},[n]);return l.createElement(ig,null,l.createElement(d.Z,{container:!0,spacing:32},l.createElement(d.Z,{item:!0,xs:12},l.createElement(iy,null,"Job Runs")),t&&l.createElement(iR,null),n&&o&&l.createElement(d.Z,{item:!0,xs:12},l.createElement(r5.Z,null,l.createElement(yp,{runs:o}),l.createElement(it.Z,{component:"div",count:n.jobRuns.metadata.total,rowsPerPage:i,rowsPerPageOptions:[i],page:r-1,onChangePage:function(e,t){a.push("/runs?page=".concat(t+1,"&per=").concat(i))},onChangeRowsPerPage:function(){},backIconButtonProps:{"aria-label":"prev-page"},nextIconButtonProps:{"aria-label":"next-page"}})))))};function xi(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function xa(){var e=xi(["\n ","\n query FetchJobRuns($offset: Int, $limit: Int) {\n jobRuns(offset: $offset, limit: $limit) {\n results {\n ...JobRunsPayload_ResultsFields\n }\n metadata {\n total\n }\n }\n }\n"]);return xa=function(){return e},e}var xo=n0(xa(),xn),xs=function(){var e=ij(),t=parseInt(e.get("page")||"1",10),n=parseInt(e.get("per")||"25",10),r=rv(xo,{variables:{offset:(t-1)*n,limit:n},fetchPolicy:"cache-and-network"}),i=r.data,a=r.loading,o=r.error;return o?l.createElement(iD,{error:o}):l.createElement(xr,{loading:a,data:i,page:t,pageSize:n})},xu=function(){var e=(0,h.$B)().path;return l.createElement(h.rs,null,l.createElement(h.AW,{exact:!0,path:e},l.createElement(xs,null)),l.createElement(h.AW,{path:"".concat(e,"/:id")},l.createElement(k7,null)))};function xc(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function xl(){var e=xc(["\n fragment FetchFeedsManagersPayload_ResultsFields on FeedsManager {\n __typename\n id\n name\n uri\n publicKey\n isConnectionActive\n createdAt\n disabledAt\n }\n query FetchFeedsManagers {\n feedsManagers {\n results {\n ...FetchFeedsManagersPayload_ResultsFields\n }\n }\n }\n"]);return xl=function(){return e},e}var xf=n0(xl()),xd=function(e){return rv(xf,e)},xh=n(47559),xp=n(83165),xb=n(47298),xm=n(81395),xg=function(){return(0,b.createStyles)({root:{display:"flex"},activeIcon:{color:xh.default[500]},inactiveIcon:{color:xp.default[500]},text:{marginLeft:4}})},xv=(0,b.withStyles)(xg)(function(e){var t=e.isActive,n=e.activeText,r=e.inactiveText,i=e.classes;return l.createElement("div",{className:i.root},t?l.createElement(xm.Z,{fontSize:"small",className:i.activeIcon}):l.createElement(xb.Z,{fontSize:"small",className:i.inactiveIcon}),l.createElement(x.default,{variant:"body1",inline:!0,className:i.text},t?n:r))}),xy=(0,b.withStyles)(iu)(function(e){var t=e.jobDistributor,n=e.classes;return l.createElement(ir.Z,{className:n.row,hover:!0},l.createElement(r7.default,{className:n.cell,component:"th",scope:"row"},l.createElement(ih,{className:n.link,href:"/job_distributors/".concat(t.id)},t.name)),l.createElement(r7.default,null,l.createElement(xv,{isActive:t.isConnectionActive,activeText:"Connected",inactiveText:"Disconnected"})),l.createElement(r7.default,null,l.createElement(xv,{isActive:!t.disabledAt,activeText:"Enabled",inactiveText:"Disabled"})),l.createElement(r7.default,null,_T(t.publicKey,{start:6,end:6}),l.createElement(_x,{data:t.publicKey})),l.createElement(r7.default,null,t.uri))}),xw=function(e){var t=e.jobDistributors;return l.createElement(ig,null,l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:9},l.createElement(iy,null,"Job Distributors")),l.createElement(d.Z,{item:!0,xs:3},l.createElement(d.Z,{container:!0,justify:"flex-end"},l.createElement(d.Z,{item:!0},l.createElement(aA.Z,{variant:"secondary",component:tz,href:"/job_distributors/new"},"New Job Distributor")))),l.createElement(d.Z,{item:!0,xs:12},l.createElement(r5.Z,null,l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,"Name"),l.createElement(r7.default,null,"Connection Status"),l.createElement(r7.default,null,"Status"),l.createElement(r7.default,null,"CSA Public Key"),l.createElement(r7.default,null,"RPC URL"))),l.createElement(r9.Z,null,0===t.length&&l.createElement(ir.Z,null,l.createElement(r7.default,{component:"th",scope:"row",colSpan:3},"Job Distributors have not been registered")),t.map(function(e){return l.createElement(xy,{key:e.id,jobDistributor:e})})))))))},x_=function(){var e,t=xd({fetchPolicy:"cache-and-network"}),n=t.data,r=t.loading,i=t.error;return r?l.createElement(iR,null):i?l.createElement(iD,{error:i}):l.createElement(xw,{jobDistributors:null!==(e=null==n?void 0:n.feedsManagers.results)&&void 0!==e?e:[]})},xE=bv().shape({name:p0().required("Required"),uri:p0().required("Required"),publicKey:p0().required("Required")}),xS=function(e){var t=e.initialValues,n=e.onSubmit;return l.createElement(hT,{initialValues:t,validationSchema:xE,onSubmit:n},function(e){var t=e.isSubmitting,n=e.submitForm;return l.createElement(hR,{"data-testid":"feeds-manager-form"},l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"name",name:"name",label:"Name",required:!0,fullWidth:!0,FormHelperTextProps:{"data-testid":"name-helper-text"}})),l.createElement(d.Z,{item:!0,xs:!1,md:6}),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"uri",name:"uri",label:"URI",required:!0,fullWidth:!0,helperText:"Provided by the Job Distributor operator",FormHelperTextProps:{"data-testid":"uri-helper-text"}})),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"publicKey",name:"publicKey",label:"Public Key",required:!0,fullWidth:!0,helperText:"Provided by the Job Distributor operator",FormHelperTextProps:{"data-testid":"publicKey-helper-text"}})),l.createElement(d.Z,{item:!0,xs:12},l.createElement(ok.default,{variant:"contained",color:"primary",disabled:t,onClick:n},"Submit"))))})},xk=function(e){var t=e.data,n=e.onSubmit,r={name:t.name,uri:t.uri,publicKey:t.publicKey};return l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12,md:11,lg:9},l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Edit Job Distributor"}),l.createElement(aW.Z,null,l.createElement(xS,{initialValues:r,onSubmit:n})))))};function xx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function xT(e){if(Array.isArray(e))return e}function xM(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function xO(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){xM(a,r,i,o,s,"next",e)}function s(e){xM(a,r,i,o,s,"throw",e)}o(void 0)})}}function xA(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xL(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function xC(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function xI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){xA(e,t,n[t])})}return e}function xD(e,t){return xT(e)||xL(e,t)||xP(e,t)||xC()}function xN(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function xP(e,t){if(e){if("string"==typeof e)return xx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xx(e,t)}}var xR=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};function xj(){var e=xN(["\n mutation UpdateFeedsManager($id: ID!, $input: UpdateFeedsManagerInput!) {\n updateFeedsManager(id: $id, input: $input) {\n ... on UpdateFeedsManagerSuccess {\n feedsManager {\n id\n name\n uri\n publicKey\n isConnectionActive\n createdAt\n }\n }\n ... on NotFoundError {\n message\n code\n }\n ... on InputErrors {\n errors {\n path\n message\n code\n }\n }\n }\n }\n"]);return xj=function(){return e},e}var xF=n0(xj()),xY=function(){var e=(0,h.UO)().id,t=(0,h.k6)(),n=(0,A.I0)(),r=oq().handleMutationError,i=xd(),a=i.data,o=i.loading,s=i.error,u=xD(oo(xF),1)[0];if(o)return l.createElement(iR,null);if(s)return l.createElement(iD,{error:s});var c=null==a?void 0:a.feedsManagers.results.filter(function(t){return t.id===e})[0];if(!c)return l.createElement(h.l_,{to:{pathname:"/job_distributors"}});var f,d=(f=xO(function(e,i){var a,o,s,l,f,d;return xR(this,function(h){switch(h.label){case 0:a=i.setErrors,h.label=1;case 1:return h.trys.push([1,3,,4]),[4,u(((l={}).variables={id:c.id,input:xI({},e)},l))];case 2:switch(null==(f=null===(o=(s=h.sent()).data)||void 0===o?void 0:o.updateFeedsManager)?void 0:f.__typename){case"UpdateFeedsManagerSuccess":t.push("/job_distributors"),n((0,ty.qt)("Job Distributor Updated"));break;case"NotFoundError":n((0,ty.LO)(f.message));break;case"InputErrors":n((0,ty.LO)("Invalid Input")),a(wH(f))}return[3,4];case 3:return r(d=h.sent()),[3,4];case 4:return[2]}})}),function(e,t){return f.apply(this,arguments)});return l.createElement(xk,{data:c,onSubmit:d})};function xB(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function xU(){var e=xB(["\n fragment FeedsManager_ChainConfigFields on FeedsManagerChainConfig {\n id\n chainID\n chainType\n accountAddr\n adminAddr\n accountAddrPubKey\n fluxMonitorJobConfig {\n enabled\n }\n ocr1JobConfig {\n enabled\n isBootstrap\n multiaddr\n p2pPeerID\n keyBundleID\n }\n ocr2JobConfig {\n enabled\n isBootstrap\n multiaddr\n forwarderAddress\n p2pPeerID\n keyBundleID\n plugins {\n commit\n execute\n median\n mercury\n rebalancer\n }\n }\n }\n"]);return xU=function(){return e},e}function xH(){var e=xB(["\n ","\n fragment FeedsManagerFields on FeedsManager {\n id\n name\n uri\n publicKey\n isConnectionActive\n disabledAt\n chainConfigs {\n ...FeedsManager_ChainConfigFields\n }\n }\n"]);return xH=function(){return e},e}function x$(){var e=xB(["\n fragment FeedsManager_JobProposalsFields on JobProposal {\n id\n name\n externalJobID\n remoteUUID\n status\n pendingUpdate\n latestSpec {\n createdAt\n version\n }\n }\n"]);return x$=function(){return e},e}function xz(){var e=xB(["\n ","\n ","\n fragment FeedsManagerPayload_ResultsFields on FeedsManager {\n ...FeedsManagerFields\n jobProposals {\n ...FeedsManager_JobProposalsFields\n }\n }\n"]);return xz=function(){return e},e}function xG(){var e=xB(["\n ","\n query FetchFeedManagerWithProposals($id: ID!) {\n feedsManager(id: $id) {\n ...FeedsManagerPayload_ResultsFields\n ... on NotFoundError {\n message\n code\n }\n }\n }\n"]);return xG=function(){return e},e}var xW=n0(xU()),xK=n0(xH(),xW),xV=n0(x$()),xq=n0(xz(),xK,xV),xZ=n0(xG(),xq),xX=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return rv(xZ,e)},xJ=function(){return(0,b.createStyles)({root:{fontSize:24}})},xQ=(0,b.withStyles)(xJ)(function(e){var t=e.children,n=e.classes;return l.createElement(x.default,{variant:"h2",className:n.root},t)}),x1=n(9290),x0=n(74923);function x2(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function x3(e){if(Array.isArray(e))return e}function x4(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function x6(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function x5(e,t){return x3(e)||x4(e,t)||x8(e,t)||x6()}function x8(e,t){if(e){if("string"==typeof e)return x2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return x2(e,t)}}var x9=function(e){var t=e.manager,n=e.onEnable,r=e.onDisable,i=x5(l.useState(null),2),a=i[0],o=i[1],s=function(e){o(e.currentTarget)},u=function(){o(null)},c=function(){t.disabledAt?n():r(),u()};return l.createElement(oh,{actions:l.createElement("div",null,l.createElement(y.default,{onClick:s,"aria-label":"open-menu"},l.createElement(ol.Z,null)),l.createElement(t_.Z,{anchorEl:a,open:Boolean(a),onClose:u},l.createElement(tN,{to:"/job_distributors/".concat(t.id,"/edit")},l.createElement(oc.Z,null,l.createElement(os.Z,null)),l.createElement(E.Z,null,"Edit")),l.createElement(tE.default,{onClick:c},l.createElement(oc.Z,null,t.disabledAt?l.createElement(x0.Z,{style:{color:"green"}}):l.createElement(x1.Z,{style:{color:"gray"}})),l.createElement(E.Z,null,t.disabledAt?"Enable":"Disable"))))},l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12,sm:6,md:3},l.createElement(op,{title:"Connection Status"}),l.createElement(xv,{isActive:t.isConnectionActive,activeText:"Connected",inactiveText:"Disconnected"})),l.createElement(d.Z,{item:!0,xs:12,sm:6,md:3},l.createElement(op,{title:"Status"}),l.createElement(xv,{isActive:!t.disabledAt,activeText:"Enabled",inactiveText:"Disabled"})),l.createElement(d.Z,{item:!0,xs:12,sm:6,md:3},l.createElement(op,{title:"Name"}),l.createElement(ob,{value:t.name})),l.createElement(d.Z,{item:!0,xs:12,sm:6,md:3},l.createElement(op,{title:"CSA Public Key"}),l.createElement(ob,null,_T(t.publicKey,{start:6,end:6}),l.createElement(_x,{data:t.publicKey}))),l.createElement(d.Z,{item:!0,xs:12,sm:6,md:3},l.createElement(op,{title:"RPC URL"}),l.createElement(ob,{value:t.uri}))))},x7=(0,b.withStyles)(iu)(function(e){var t=e.classes,n=e.proposals;return l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,"ID"),l.createElement(r7.default,null,"Name"),l.createElement(r7.default,null,"External Job ID"),l.createElement(r7.default,null,"Latest Version"),l.createElement(r7.default,null,"Last Proposed"),l.createElement(r7.default,null))),l.createElement(r9.Z,null,null==n?void 0:n.map(function(e){return l.createElement(ir.Z,{key:e.id,className:t.row,hover:!0},l.createElement(r7.default,{className:t.cell,component:"th",scope:"row"},l.createElement(ih,{className:t.link,href:"/job_proposals/".concat(e.id)},e.id)),l.createElement(r7.default,null,e.name||"--"),l.createElement(r7.default,null,e.externalJobID||"--"),l.createElement(r7.default,null,e.latestSpec.version),l.createElement(r7.default,null,l.createElement(aO,{tooltip:!0},e.latestSpec.createdAt)),l.createElement(r7.default,{align:"right"},e.pendingUpdate&&l.createElement(Es.Z,{color:"primary"},"Update Available")))})))}),Te=(0,b.withStyles)(iu)(function(e){var t=e.classes,n=e.proposals;return l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,"ID"),l.createElement(r7.default,null,"Name"),l.createElement(r7.default,null,"Latest Version"),l.createElement(r7.default,null,"Last Proposed"),l.createElement(r7.default,null))),l.createElement(r9.Z,null,null==n?void 0:n.map(function(e){return l.createElement(ir.Z,{key:e.id,className:t.row,hover:!0},l.createElement(r7.default,{className:t.cell,component:"th",scope:"row"},l.createElement(ih,{className:t.link,href:"/job_proposals/".concat(e.id)},e.id)),l.createElement(r7.default,null,e.name||"--"),l.createElement(r7.default,null,e.latestSpec.version),l.createElement(r7.default,null,l.createElement(aO,{tooltip:!0},e.latestSpec.createdAt)),l.createElement(r7.default,{align:"right"},e.pendingUpdate&&l.createElement(Es.Z,{label:"Update Available",color:"primary"})))})))}),Tt=(0,b.withStyles)(iu)(function(e){var t=e.classes,n=e.proposals;return l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,"ID"),l.createElement(r7.default,null,"Name"),l.createElement(r7.default,null,"Last Proposed"))),l.createElement(r9.Z,null,null==n?void 0:n.map(function(e){return l.createElement(ir.Z,{key:e.id,className:t.row,hover:!0},l.createElement(r7.default,{className:t.cell,component:"th",scope:"row"},l.createElement(ih,{className:t.link,href:"/job_proposals/".concat(e.id)},e.id)),l.createElement(r7.default,null,e.name||"--"),l.createElement(r7.default,null,l.createElement(aO,{tooltip:!0},e.latestSpec.createdAt)))})))}),Tn=(0,b.withStyles)(iu)(function(e){var t=e.classes,n=e.proposals;return l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,"ID"),l.createElement(r7.default,null,"Name"),l.createElement(r7.default,null,"External Job ID"),l.createElement(r7.default,null,"Latest Version"),l.createElement(r7.default,null,"Last Proposed"))),l.createElement(r9.Z,null,null==n?void 0:n.map(function(e){return l.createElement(ir.Z,{key:e.id,className:t.row,hover:!0},l.createElement(r7.default,{className:t.cell,component:"th",scope:"row"},l.createElement(ih,{className:t.link,href:"/job_proposals/".concat(e.id)},e.id)),l.createElement(r7.default,null,e.name||"--"),l.createElement(r7.default,null,e.externalJobID||"--"),l.createElement(r7.default,null,e.latestSpec.version),l.createElement(r7.default,null,l.createElement(aO,{tooltip:!0},e.latestSpec.createdAt)))})))});function Tr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ti(e){if(Array.isArray(e))return e}function Ta(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function To(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ts(e,t){return Ti(e)||Ta(e,t)||Tu(e,t)||To()}function Tu(e,t){if(e){if("string"==typeof e)return Tr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Tr(e,t)}}var Tc={0:"PENDING",1:"UPDATES",2:"APPROVED",3:"REJECTED",4:"CANCELLED",5:"DELETED",6:"REVOKED"},Tl=function(e){return(0,b.createStyles)({tabsRoot:{borderBottom:"1px solid #e8e8e8"},badge:{padding:"0 ".concat(2*e.spacing.unit,"px")}})},Tf=function(e){var t=e.toLowerCase();return function(e){return e.toLowerCase().includes(t)}},Td=function(e){return function(t){return""===e||Th(t,e)}};function Th(e,t){var n,r=Tf(t),i=[e.id,e.remoteUUID,null!==(n=e.name)&&void 0!==n?n:"",];return e.externalJobID&&i.push(e.externalJobID),i.some(r)}var Tp=(0,b.withStyles)(Tl)(function(e){var t=e.classes,n=e.proposals,r=Ts(l.useState(0),2),i=r[0],a=r[1],o=Ts(l.useState(""),2),s=o[0],u=o[1],c=l.useMemo(function(){var e={PENDING:0,UPDATES:0,APPROVED:0,REJECTED:0,CANCELLED:0,DELETED:0,REVOKED:0};return n.forEach(function(t){if(t.pendingUpdate)switch(e.UPDATES++,t.status){case"APPROVED":e.APPROVED++;break;case"CANCELLED":e.CANCELLED++;break;case"REJECTED":e.REJECTED++;break;case"DELETED":e.DELETED++;break;case"REVOKED":e.REVOKED++}"PENDING"===t.status&&e.PENDING++}),e},[n]),f=l.useMemo(function(){return n?"UPDATES"===Tc[i]?n.filter(function(e){return e.pendingUpdate&&Td(s)(e)}).sort(function(e,t){return t.latestSpec.createdAt-e.latestSpec.createdAt}):n.filter(function(e){return e.status===Tc[i]&&Td(s)(e)}).sort(function(e,t){return t.latestSpec.createdAt-e.latestSpec.createdAt}):[]},[i,n,s]),d=function(e){switch(Tc[i]){case"PENDING":return l.createElement(Tt,{proposals:e});case"UPDATES":return l.createElement(Tn,{proposals:e});case"REJECTED":case"CANCELLED":case"DELETED":case"REVOKED":return l.createElement(Te,{proposals:e});case"APPROVED":return l.createElement(x7,{proposals:e});default:return null}};return l.createElement(l.Fragment,null,l.createElement(iE,{value:s,onChange:u,placeholder:"Search job proposals"}),l.createElement(r5.Z,null,l.createElement(vq.Z,{value:i,className:t.tabsRoot,indicatorColor:"primary",onChange:function(e,t){a(t)}},l.createElement(vZ.Z,{label:l.createElement(vV.Z,{color:"primary",badgeContent:c.PENDING,className:t.badge,"data-testid":"pending-badge"},"New")}),l.createElement(vZ.Z,{label:l.createElement(vV.Z,{color:"primary",badgeContent:c.UPDATES,className:t.badge,"data-testid":"updates-badge"},"Updates")}),l.createElement(vZ.Z,{label:l.createElement(vV.Z,{color:"primary",badgeContent:c.APPROVED,className:t.badge,"data-testid":"approved-badge"},"Approved")}),l.createElement(vZ.Z,{label:l.createElement(vV.Z,{color:"primary",badgeContent:c.REJECTED,className:t.badge,"data-testid":"rejected-badge"},"Rejected")}),l.createElement(vZ.Z,{label:l.createElement(vV.Z,{color:"primary",badgeContent:c.CANCELLED,className:t.badge,"data-testid":"cancelled-badge"},"Cancelled")}),l.createElement(vZ.Z,{label:l.createElement(vV.Z,{color:"primary",badgeContent:c.DELETED,className:t.badge,"data-testid":"deleted-badge"},"Deleted")}),l.createElement(vZ.Z,{label:l.createElement(vV.Z,{color:"primary",badgeContent:c.REVOKED,className:t.badge,"data-testid":"revoked-badge"},"Revoked")})),d(f)))}),Tb=n(57234),Tm={EVM:"EVM",APTOS:"APTOS",SOLANA:"SOLANA",STARKNET:"STARKNET",COSMOS:"COSMOS"};function Tg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Tv(e){if(Array.isArray(e))return e}function Ty(){return(Ty=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Tw(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function T_(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function TE(e,t){if(null==e)return{};var n,r,i=TS(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function TS(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function Tk(e,t){return Tv(e)||Tw(e,t)||Tx(e,t)||T_()}function Tx(e,t){if(e){if("string"==typeof e)return Tg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Tg(e,t)}}var TT=function(e){return"SN_MAIN"===e||"SN_SEPOLIA"===e},TM=bv().shape({chainID:p0().required("Required"),chainType:p0().required("Required"),accountAddr:p0().required("Required"),accountAddrPubKey:p0().nullable(),adminAddr:p0(),ocr1Multiaddr:p0().when(["ocr1Enabled","ocr1IsBootstrap"],{is:function(e,t){return e&&t},then:p0().required("Required").nullable()}).nullable(),ocr1P2PPeerID:p0().when(["ocr1Enabled","ocr1IsBootstrap"],{is:function(e,t){return e&&!t},then:p0().required("Required").nullable()}).nullable(),ocr1KeyBundleID:p0().when(["ocr1Enabled","ocr1IsBootstrap"],{is:function(e,t){return e&&!t},then:p0().required("Required").nullable()}).nullable(),ocr2Multiaddr:p0().when(["ocr2Enabled","ocr2IsBootstrap"],{is:function(e,t){return e&&t},then:p0().required("Required").nullable()}).nullable(),ocr2P2PPeerID:p0().when(["ocr2Enabled","ocr2IsBootstrap"],{is:function(e,t){return e&&!t},then:p0().required("Required").nullable()}).nullable(),ocr2KeyBundleID:p0().when(["ocr2Enabled","ocr2IsBootstrap"],{is:function(e,t){return e&&!t},then:p0().required("Required").nullable()}).nullable(),ocr2CommitPluginEnabled:pV().required("Required"),ocr2ExecutePluginEnabled:pV().required("Required"),ocr2MedianPluginEnabled:pV().required("Required"),ocr2MercuryPluginEnabled:pV().required("Required"),ocr2ForwarderAddress:p0().nullable()}),TO=function(e){return(0,b.createStyles)({supportedJobOptionsPaper:{padding:2*e.spacing.unit}})},TA=function(e){var t=e.addresses,n=TE(e,["addresses"]),r=h_(),i=r.values,a=i.chainID,o=i.accountAddr,s=r.setFieldValue,u=Tk(l.useState(!1),2),c=u[0],f=u[1],d=l.useRef();l.useEffect(function(){d.current=a},[a]),l.useEffect(function(){a!==d.current&&(s(n.name,""),f(!1))},[a,s,n.name]);var h=function(e){var t=e.target.value;"custom"===t?(f(!0),s(n.name,"")):(f(!1),s(n.name,t))};return l.createElement(l.Fragment,null,!TT(a)&&l.createElement(hP,Ty({},n,{select:!0,value:c?"custom":o,onChange:h}),t.map(function(e){return l.createElement(tE.default,{key:e,value:e},e)})),TT(a)&&l.createElement(hP,{component:hX,id:"accountAddr",name:"accountAddr",label:"Enter your account address",inputProps:{"data-testid":"customAccountAddr-input"},helperText:"The account address used for this chain",required:!0,fullWidth:!0}),TT(a)&&l.createElement("div",null,l.createElement(hP,{component:hX,id:"accountAddrPubKey",name:"accountAddrPubKey",label:"Account Address Public Key",required:!0,fullWidth:!0,helperText:"The public key for your account address",FormHelperTextProps:{"data-testid":"accountAddrPubKey-helper-text"}})))},TL=(0,b.withStyles)(TO)(function(e){var t=e.classes,n=e.editing,r=void 0!==n&&n,i=e.innerRef,a=e.initialValues,o=e.onSubmit,s=e.chains,u=void 0===s?[]:s,c=e.accountsEVM,f=void 0===c?[]:c,h=e.accountsNonEvm,p=e.p2pKeys,b=void 0===p?[]:p,m=e.ocrKeys,g=void 0===m?[]:m,v=e.ocr2Keys,y=void 0===v?[]:v,w=e.showSubmit,_=void 0!==w&&w;return l.createElement(hT,{innerRef:i,initialValues:a,validationSchema:TM,onSubmit:o},function(e){var n,i,a=e.values,o=[];switch(a.chainType){case Tm.EVM:o=f.filter(function(e){return e.chain.id==a.chainID&&!e.isDisabled}).map(function(e){return e.address});break;case Tm.APTOS:o=null!==(n=null==h?void 0:h.aptosKeys.results.map(function(e){return e.account}))&&void 0!==n?n:[];break;case Tm.SOLANA:o=null!==(i=null==h?void 0:h.solanaKeys.results.map(function(e){return e.id}))&&void 0!==i?i:[];break;default:o=[]}return l.createElement(hR,{"data-testid":"feeds-manager-form",id:"chain-configuration-form",noValidate:!0},l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"chainType",name:"chainType",label:"Chain Type",select:!0,required:!0,fullWidth:!0,disabled:r},l.createElement(tE.default,{key:Tm.EVM,value:Tm.EVM},"EVM"),l.createElement(tE.default,{key:Tm.APTOS,value:Tm.APTOS},"APTOS"),l.createElement(tE.default,{key:Tm.SOLANA,value:Tm.SOLANA},"SOLANA"))),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"chainID",name:"chainID",label:"Chain ID",required:!0,fullWidth:!0,select:!0,disabled:r,inputProps:{"data-testid":"chainID-input"},FormHelperTextProps:{"data-testid":"chainID-helper-text"}},u.filter(function(e){return e.network.toUpperCase()===a.chainType}).map(function(e){return l.createElement(tE.default,{key:e.id,value:e.id},e.id)}))),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(TA,{component:hX,id:"accountAddr",name:"accountAddr",label:"Account Address",inputProps:{"data-testid":"accountAddr-input"},required:!0,fullWidth:!0,select:!0,helperText:"The account address used for this chain",addresses:o,FormHelperTextProps:{"data-testid":"accountAddr-helper-text"}})),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"adminAddr",name:"adminAddr",label:"Admin Address",fullWidth:!0,helperText:"The address used for LINK payments",FormHelperTextProps:{"data-testid":"adminAddr-helper-text"}})),l.createElement(d.Z,{item:!0,xs:12},l.createElement(x.default,null,"Supported Job Types")),l.createElement(d.Z,{item:!0,xs:12},l.createElement(hP,{component:h2,name:"fluxMonitorEnabled",type:"checkbox",Label:{label:"Flux Monitor"}})),l.createElement(d.Z,{item:!0,xs:12},l.createElement(hP,{component:h2,name:"ocr1Enabled",type:"checkbox",Label:{label:"OCR"}}),a.ocr1Enabled&&l.createElement(ii.default,{className:t.supportedJobOptionsPaper},l.createElement(d.Z,{container:!0,spacing:8},l.createElement(l.Fragment,null,l.createElement(d.Z,{item:!0,xs:12},l.createElement(hP,{component:h2,name:"ocr1IsBootstrap",type:"checkbox",Label:{label:"Is this node running as a bootstrap peer?"}})),a.ocr1IsBootstrap?l.createElement(d.Z,{item:!0,xs:12},l.createElement(hP,{component:hX,id:"ocr1Multiaddr",name:"ocr1Multiaddr",label:"Multiaddr",required:!0,fullWidth:!0,helperText:"The OCR Multiaddr which oracles use to query for network information",FormHelperTextProps:{"data-testid":"ocr1Multiaddr-helper-text"}})):l.createElement(l.Fragment,null,l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"ocr1P2PPeerID",name:"ocr1P2PPeerID",label:"Peer ID",select:!0,required:!0,fullWidth:!0,helperText:"The Peer ID used for this chain",FormHelperTextProps:{"data-testid":"ocr1P2PPeerID-helper-text"}},b.map(function(e){return l.createElement(tE.default,{key:e.peerID,value:e.peerID},e.peerID)}))),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"ocr1KeyBundleID",name:"ocr1KeyBundleID",label:"Key Bundle ID",select:!0,required:!0,fullWidth:!0,helperText:"The OCR Key Bundle ID used for this chain",FormHelperTextProps:{"data-testid":"ocr1KeyBundleID-helper-text"}},g.map(function(e){return l.createElement(tE.default,{key:e.id,value:e.id},e.id)})))))))),l.createElement(d.Z,{item:!0,xs:12},l.createElement(hP,{component:h2,name:"ocr2Enabled",type:"checkbox",Label:{label:"OCR2"}}),a.ocr2Enabled&&l.createElement(ii.default,{className:t.supportedJobOptionsPaper},l.createElement(d.Z,{container:!0,spacing:8},l.createElement(l.Fragment,null,l.createElement(d.Z,{item:!0,xs:12},l.createElement(hP,{component:h2,name:"ocr2IsBootstrap",type:"checkbox",Label:{label:"Is this node running as a bootstrap peer?"}})),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"ocr2P2PPeerID",name:"ocr2P2PPeerID",label:"Peer ID",select:!0,required:!a.ocr2IsBootstrap,fullWidth:!0,helperText:"The Peer ID used for this chain",FormHelperTextProps:{"data-testid":"ocr2P2PPeerID-helper-text"}},b.map(function(e){return l.createElement(tE.default,{key:e.peerID,value:e.peerID},e.peerID)}))),a.ocr2IsBootstrap?l.createElement(d.Z,{item:!0,xs:12},l.createElement(hP,{component:hX,id:"ocr2Multiaddr",name:"ocr2Multiaddr",label:"Multiaddr",required:!0,fullWidth:!0,helperText:"The OCR2 Multiaddr which oracles use to query for network information",FormHelperTextProps:{"data-testid":"ocr2Multiaddr-helper-text"}})):l.createElement(l.Fragment,null,l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"ocr2KeyBundleID",name:"ocr2KeyBundleID",label:"Key Bundle ID",select:!0,required:!0,fullWidth:!0,helperText:"The OCR2 Key Bundle ID used for this chain",FormHelperTextProps:{"data-testid":"ocr2KeyBundleID-helper-text"}},y.map(function(e){return l.createElement(tE.default,{key:e.id,value:e.id},e.id)}))),l.createElement(d.Z,{item:!0,xs:12},l.createElement(x.default,null,"Supported Plugins")),l.createElement(d.Z,{item:!0,xs:6},l.createElement(hP,{component:h2,name:"ocr2CommitPluginEnabled",type:"checkbox",Label:{label:"Commit"}})),l.createElement(d.Z,{item:!0,xs:6},l.createElement(hP,{component:h2,name:"ocr2ExecutePluginEnabled",type:"checkbox",Label:{label:"Execute"}})),l.createElement(d.Z,{item:!0,xs:6},l.createElement(hP,{component:h2,name:"ocr2RebalancerPluginEnabled",type:"checkbox",Label:{label:"Rebalancer"}})),l.createElement(d.Z,{item:!0,xs:6},l.createElement(hP,{component:h2,name:"ocr2MedianPluginEnabled",type:"checkbox",Label:{label:"Median"}})),l.createElement(d.Z,{item:!0,xs:6},l.createElement(hP,{component:h2,name:"ocr2MercuryPluginEnabled",type:"checkbox",Label:{label:"Mercury"}})),l.createElement(d.Z,{item:!0,xs:12,md:12},l.createElement(hP,{component:hX,id:"ocr2ForwarderAddress",name:"ocr2ForwarderAddress",label:"Forwarder Address (optional)",fullWidth:!0,helperText:"The forwarder address from the Operator Forwarder Contract",FormHelperTextProps:{"data-testid":"ocr2ForwarderAddress-helper-text"}}))))))),_&&l.createElement(d.Z,{item:!0,xs:12,md:7},l.createElement(ok.default,{variant:"contained",color:"primary",type:"submit",size:"large"},"Submit"))))})});function TC(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function TI(){var e=TC(["\n fragment AptosKeysPayload_ResultsFields on AptosKey {\n account\n id\n }\n"]);return TI=function(){return e},e}function TD(){var e=TC(["\n fragment SolanaKeysPayload_ResultsFields on SolanaKey {\n id\n }\n"]);return TD=function(){return e},e}function TN(){var e=TC(["\n ","\n ","\n query FetchNonEvmKeys {\n aptosKeys {\n results {\n ...AptosKeysPayload_ResultsFields\n }\n }\n solanaKeys {\n results {\n ...SolanaKeysPayload_ResultsFields\n }\n }\n }\n"]);return TN=function(){return e},e}var TP=n0(TI()),TR=n0(TD()),Tj=n0(TN(),TP,TR),TF=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return rv(Tj,e)},TY=function(e){var t=e.onClose,n=e.open,r=e.onSubmit,i=l.useRef(),a=i$({fetchPolicy:"network-only"}).data,o=_K({fetchPolicy:"cache-and-network"}).data,s=TF({fetchPolicy:"cache-and-network"}).data,u=SV({fetchPolicy:"cache-and-network"}).data,c=EO({fetchPolicy:"cache-and-network"}).data,f=E2({fetchPolicy:"cache-and-network"}).data,d={chainID:"",chainType:Tm.EVM,accountAddr:"",adminAddr:"",accountAddrPubKey:"",fluxMonitorEnabled:!1,ocr1Enabled:!1,ocr1IsBootstrap:!1,ocr1Multiaddr:"",ocr1P2PPeerID:"",ocr1KeyBundleID:"",ocr2Enabled:!1,ocr2IsBootstrap:!1,ocr2Multiaddr:"",ocr2P2PPeerID:"",ocr2KeyBundleID:"",ocr2CommitPluginEnabled:!1,ocr2ExecutePluginEnabled:!1,ocr2MedianPluginEnabled:!1,ocr2MercuryPluginEnabled:!1,ocr2RebalancerPluginEnabled:!1,ocr2ForwarderAddress:""},h=a?a.chains.results:[],p=o?o.ethKeys.results:[],b=u?u.p2pKeys.results:[],m=c?c.ocrKeyBundles.results:[],g=f?f.ocr2KeyBundles.results:[];return l.createElement(aD.Z,{onClose:t,open:n,disableBackdropClick:!0},l.createElement(oO.Z,{disableTypography:!0},l.createElement(x.default,{variant:"body2"},"New Supported Chain")),l.createElement(oT.Z,null,l.createElement(TL,{innerRef:i,initialValues:d,onSubmit:r,chains:h,accountsEVM:p,accountsNonEvm:s,p2pKeys:b,ocrKeys:m,ocr2Keys:g})),l.createElement(ox.Z,null,l.createElement(ok.default,{onClick:t},"Cancel"),l.createElement(ok.default,{color:"primary",type:"submit",form:"chain-configuration-form",variant:"contained"},"Submit")))},TB=function(e){var t=e.cfg,n=e.onClose,r=e.open,i=e.onSubmit,a=l.useRef(),o=i$({fetchPolicy:"network-only"}).data,s=_K({fetchPolicy:"cache-and-network"}).data,u=TF({fetchPolicy:"cache-and-network"}).data,c=SV({fetchPolicy:"cache-and-network"}).data,f=EO({fetchPolicy:"cache-and-network"}).data,d=E2({fetchPolicy:"cache-and-network"}).data;if(!t)return null;var h={chainID:t.chainID,chainType:Tm.EVM,accountAddr:t.accountAddr,adminAddr:t.adminAddr,accountAddrPubKey:t.accountAddrPubKey,fluxMonitorEnabled:t.fluxMonitorJobConfig.enabled,ocr1Enabled:t.ocr1JobConfig.enabled,ocr1IsBootstrap:t.ocr1JobConfig.isBootstrap,ocr1Multiaddr:t.ocr1JobConfig.multiaddr,ocr1P2PPeerID:t.ocr1JobConfig.p2pPeerID,ocr1KeyBundleID:t.ocr1JobConfig.keyBundleID,ocr2Enabled:t.ocr2JobConfig.enabled,ocr2IsBootstrap:t.ocr2JobConfig.isBootstrap,ocr2Multiaddr:t.ocr2JobConfig.multiaddr,ocr2P2PPeerID:t.ocr2JobConfig.p2pPeerID,ocr2KeyBundleID:t.ocr2JobConfig.keyBundleID,ocr2CommitPluginEnabled:t.ocr2JobConfig.plugins.commit,ocr2ExecutePluginEnabled:t.ocr2JobConfig.plugins.execute,ocr2MedianPluginEnabled:t.ocr2JobConfig.plugins.median,ocr2MercuryPluginEnabled:t.ocr2JobConfig.plugins.mercury,ocr2RebalancerPluginEnabled:t.ocr2JobConfig.plugins.rebalancer,ocr2ForwarderAddress:t.ocr2JobConfig.forwarderAddress},p=o?o.chains.results:[],b=s?s.ethKeys.results:[],m=c?c.p2pKeys.results:[],g=f?f.ocrKeyBundles.results:[],v=d?d.ocr2KeyBundles.results:[];return l.createElement(aD.Z,{onClose:n,open:r,disableBackdropClick:!0},l.createElement(oO.Z,{disableTypography:!0},l.createElement(x.default,{variant:"body2"},"Edit Supported Chain")),l.createElement(oT.Z,null,l.createElement(TL,{innerRef:a,initialValues:h,onSubmit:i,chains:p,accountsEVM:b,accountsNonEvm:u,p2pKeys:m,ocrKeys:g,ocr2Keys:v,editing:!0})),l.createElement(ox.Z,null,l.createElement(ok.default,{onClick:n},"Cancel"),l.createElement(ok.default,{color:"primary",type:"submit",form:"chain-configuration-form",variant:"contained"},"Submit")))};function TU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function TH(e){if(Array.isArray(e))return e}function T$(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function Tz(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){T$(a,r,i,o,s,"next",e)}function s(e){T$(a,r,i,o,s,"throw",e)}o(void 0)})}}function TG(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function TW(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function TK(e,t){return TH(e)||TG(e,t)||Tq(e,t)||TW()}function TV(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Tq(e,t){if(e){if("string"==typeof e)return TU(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return TU(e,t)}}var TZ=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};function TX(){var e=TV(["\n mutation CreateFeedsManagerChainConfig(\n $input: CreateFeedsManagerChainConfigInput!\n ) {\n createFeedsManagerChainConfig(input: $input) {\n ... on CreateFeedsManagerChainConfigSuccess {\n chainConfig {\n id\n }\n }\n ... on NotFoundError {\n message\n code\n }\n ... on InputErrors {\n errors {\n path\n message\n code\n }\n }\n }\n }\n"]);return TX=function(){return e},e}function TJ(){var e=TV(["\n mutation DeleteFeedsManagerChainConfig($id: ID!) {\n deleteFeedsManagerChainConfig(id: $id) {\n ... on DeleteFeedsManagerChainConfigSuccess {\n chainConfig {\n id\n }\n }\n ... on NotFoundError {\n message\n code\n }\n }\n }\n"]);return TJ=function(){return e},e}function TQ(){var e=TV(["\n mutation UpdateFeedsManagerChainConfig(\n $id: ID!\n $input: UpdateFeedsManagerChainConfigInput!\n ) {\n updateFeedsManagerChainConfig(id: $id, input: $input) {\n __typename\n ... on UpdateFeedsManagerChainConfigSuccess {\n chainConfig {\n id\n }\n }\n ... on NotFoundError {\n message\n code\n }\n ... on InputErrors {\n errors {\n path\n message\n code\n }\n }\n }\n }\n"]);return TQ=function(){return e},e}var T1=n0(TX()),T0=n0(TJ()),T2=n0(TQ()),T3=function(e){return(0,b.createStyles)({card:{marginBottom:2*e.spacing.unit},panel:{borderBottom:"1px solid ".concat(e.palette.divider)},panelExpanded:{margin:0},chip:{marginRight:2*e.spacing.unit},title:{fontSize:e.typography.body2.fontSize,fontWeight:e.typography.body2.fontWeight,color:e.typography.body2.color},panelDetails:{display:"block"},jobTypeContainer:{borderLeft:"2px solid ".concat(e.palette.primary.main),marginLeft:-8,paddingLeft:8},panelDetailsActions:{display:"flex",justifyContent:"flex-end",gap:"".concat(2*e.spacing.unit,"px")}})},T4=function(e){return l.createElement(l.Fragment,null,l.createElement(d.Z,{item:!0,xs:12,md:5},l.createElement(op,{title:"Multiaddr"}),l.createElement(ob,{value:e.multiaddr})),"OCR2JobConfig"===e.__typename&&l.createElement(d.Z,{item:!0,xs:12,md:5},l.createElement(op,{title:"P2P Peer ID"}),l.createElement(ob,{value:e.p2pPeerID})))},T6=function(e){return l.createElement(l.Fragment,null,l.createElement(d.Z,{item:!0,xs:12,md:5},l.createElement(op,{title:"P2P Peer ID"}),l.createElement(ob,{value:e.p2pPeerID})),l.createElement(d.Z,{item:!0,xs:12,md:5},l.createElement(op,{title:"OCR Key ID"}),l.createElement(ob,{value:e.keyBundleID})))},T5=(0,b.withStyles)(T3)(function(e){var t=e.cfg,n=e.classes;return t.enabled?l.createElement(d.Z,{item:!0,xs:12,md:12},l.createElement("div",{className:n.jobTypeContainer},l.createElement(op,{title:"Job Type"}),l.createElement(ob,{value:"Flux Monitor"}))):null}),T8=(0,b.withStyles)(T3)(function(e){var t=e.cfg,n=e.classes;return t.enabled?l.createElement(l.Fragment,null,l.createElement(d.Z,{item:!0,xs:12,md:2},l.createElement("div",{className:n.jobTypeContainer},l.createElement(op,{title:"Job Type"}),l.createElement(ob,{value:"OCR ".concat(t.isBootstrap?"(Bootstrap)":"")}))),t.isBootstrap?T4(t):T6(t)):null}),T9=(0,b.withStyles)(T3)(function(e){var t=e.cfg,n=e.classes;return t.enabled?l.createElement(l.Fragment,null,l.createElement(d.Z,{item:!0,xs:12,md:2},l.createElement("div",{className:n.jobTypeContainer},l.createElement(op,{title:"Job Type"}),l.createElement(ob,{value:"OCR2 ".concat(t.isBootstrap?"(Bootstrap)":"")}))),t.isBootstrap?T4(t):T6(t)):null}),T7=(0,b.withStyles)(T3)(function(e){var t,n,r,i=e.classes,a=e.cfgs,o=e.mgrID,s=(0,A.I0)(),u=oq().handleMutationError,c=TK(l.useState(!1),2),f=c[0],h=c[1],p=TK(l.useState(null),2),b=p[0],m=p[1],g=TK(l.useState(null),2),v=g[0],w=g[1],_=function(e){w(e.currentTarget)},S=function(){w(null)},k=function(e){m(e)},T=function(){m(null)},M=function(){return null!==b},O=TK(oo(T1,{refetchQueries:[xZ]}),1)[0],L=TK(oo(T0,{refetchQueries:[xZ]}),1)[0],C=TK(oo(T2,{refetchQueries:[xZ]}),1)[0],I=(t=Tz(function(e){var t,n,r,i,a;return TZ(this,function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),[4,O(((r={}).variables={input:{feedsManagerID:o,chainID:e.chainID,chainType:e.chainType,accountAddr:e.accountAddr,adminAddr:e.adminAddr,accountAddrPubKey:e.accountAddrPubKey,fluxMonitorEnabled:e.fluxMonitorEnabled,ocr1Enabled:e.ocr1Enabled,ocr1IsBootstrap:e.ocr1IsBootstrap,ocr1Multiaddr:""!==e.ocr1Multiaddr?e.ocr1Multiaddr:null,ocr1P2PPeerID:""!==e.ocr1P2PPeerID?e.ocr1P2PPeerID:null,ocr1KeyBundleID:""!=e.ocr1KeyBundleID?e.ocr1KeyBundleID:null,ocr2Enabled:e.ocr2Enabled,ocr2IsBootstrap:e.ocr2IsBootstrap,ocr2Multiaddr:""!==e.ocr2Multiaddr?e.ocr2Multiaddr:null,ocr2P2PPeerID:""!==e.ocr2P2PPeerID?e.ocr2P2PPeerID:null,ocr2KeyBundleID:""!=e.ocr2KeyBundleID?e.ocr2KeyBundleID:null,ocr2Plugins:'{"commit":'.concat(e.ocr2CommitPluginEnabled,',"execute":').concat(e.ocr2ExecutePluginEnabled,',"median":').concat(e.ocr2MedianPluginEnabled,',"mercury":').concat(e.ocr2MercuryPluginEnabled,',"rebalancer":').concat(e.ocr2RebalancerPluginEnabled,"}"),ocr2ForwarderAddress:""!==e.ocr2ForwarderAddress?e.ocr2ForwarderAddress:null}},r))];case 1:switch(null==(i=null===(t=(n=c.sent()).data)||void 0===t?void 0:t.createFeedsManagerChainConfig)?void 0:i.__typename){case"CreateFeedsManagerChainConfigSuccess":s((0,ty.qt)("Added new supported chain"));break;case"NotFoundError":s((0,ty.LO)(i.message))}return[3,3];case 2:return u(a=c.sent()),[3,3];case 3:return[2]}})}),function(e){return t.apply(this,arguments)}),D=(n=Tz(function(e){var t,n,r,i,a;return TZ(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,L(((r={}).variables={id:e},r))];case 1:switch(null==(i=null===(t=(n=o.sent()).data)||void 0===t?void 0:t.deleteFeedsManagerChainConfig)?void 0:i.__typename){case"DeleteFeedsManagerChainConfigSuccess":s((0,ty.qt)("Deleted supported chain"));break;case"NotFoundError":s((0,ty.LO)(i.message))}return[3,3];case 2:return u(a=o.sent()),[3,3];case 3:return[2]}})}),function(e){return n.apply(this,arguments)}),N=(r=Tz(function(e){var t,n,r,i,a;return TZ(this,function(o){switch(o.label){case 0:if(!b)return[2];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,C(((r={}).variables={id:b.id,input:{accountAddr:e.accountAddr,adminAddr:e.adminAddr,accountAddrPubKey:e.accountAddrPubKey,fluxMonitorEnabled:e.fluxMonitorEnabled,ocr1Enabled:e.ocr1Enabled,ocr1IsBootstrap:e.ocr1IsBootstrap,ocr1Multiaddr:""!==e.ocr1Multiaddr?e.ocr1Multiaddr:null,ocr1P2PPeerID:""!==e.ocr1P2PPeerID?e.ocr1P2PPeerID:null,ocr1KeyBundleID:""!=e.ocr1KeyBundleID?e.ocr1KeyBundleID:null,ocr2Enabled:e.ocr2Enabled,ocr2IsBootstrap:e.ocr2IsBootstrap,ocr2Multiaddr:""!==e.ocr2Multiaddr?e.ocr2Multiaddr:null,ocr2P2PPeerID:""!==e.ocr2P2PPeerID?e.ocr2P2PPeerID:null,ocr2KeyBundleID:""!=e.ocr2KeyBundleID?e.ocr2KeyBundleID:null,ocr2Plugins:'{"commit":'.concat(e.ocr2CommitPluginEnabled,',"execute":').concat(e.ocr2ExecutePluginEnabled,',"median":').concat(e.ocr2MedianPluginEnabled,',"mercury":').concat(e.ocr2MercuryPluginEnabled,',"rebalancer":').concat(e.ocr2RebalancerPluginEnabled,"}"),ocr2ForwarderAddress:""!==e.ocr2ForwarderAddress?e.ocr2ForwarderAddress:null}},r))];case 2:switch(null==(i=null===(t=(n=o.sent()).data)||void 0===t?void 0:t.updateFeedsManagerChainConfig)?void 0:i.__typename){case"UpdateFeedsManagerChainConfigSuccess":S(),s((0,ty.qt)("Updated supported chain"));break;case"NotFoundError":s((0,ty.LO)(i.message))}return[3,4];case 3:return u(a=o.sent()),[3,4];case 4:return[2]}})}),function(e){return r.apply(this,arguments)});return l.createElement(r5.Z,{className:i.card},l.createElement(sl.Z,{title:"Supported Chains",classes:{title:i.title},action:l.createElement(l.Fragment,null,l.createElement(y.default,{onClick:_,"aria-label":"open-menu"},l.createElement(ol.Z,null)),l.createElement(t_.Z,{anchorEl:v,open:Boolean(v),onClose:S},l.createElement(tE.default,{onClick:function(){h(!0),S()}},l.createElement(oc.Z,null,l.createElement(Tb.Z,null)),l.createElement(E.Z,null,"New"))))}),a.map(function(e){return l.createElement(mP.Z,{key:e.id,defaultExpanded:!1,classes:{root:i.panel,expanded:i.panelExpanded}},l.createElement(mR.Z,{expandIcon:l.createElement(gh.Z,null)},l.createElement(Es.Z,{label:e.chainType,color:"primary",className:i.chip}),l.createElement(x.default,{style:{lineHeight:"30px"}},"Chain ID: ",e.chainID)),l.createElement(mj.Z,{className:i.panelDetails},l.createElement(d.Z,{container:!0,spacing:40},l.createElement(d.Z,{item:!0,xs:12},l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12,sm:6},l.createElement(op,{title:"Account Address"}),l.createElement(ob,{value:e.accountAddr})),("SN_MAIN"===e.chainID||"SN_SEPOLIA"===e.chainID)&&l.createElement(d.Z,{item:!0,xs:12,sm:6},l.createElement(op,{title:"Account Address Public Key"}),l.createElement(ob,{value:e.accountAddrPubKey})),l.createElement(d.Z,{item:!0,xs:12,sm:6},l.createElement(op,{title:"Admin Address"}),l.createElement(ob,{value:e.adminAddr})),l.createElement(T5,{cfg:e.fluxMonitorJobConfig}),l.createElement(T8,{cfg:e.ocr1JobConfig}),l.createElement(T9,{cfg:e.ocr2JobConfig}))),l.createElement(d.Z,{item:!0,xs:12},l.createElement("div",{className:i.panelDetailsActions},l.createElement(aA.Z,{onClick:function(){return k(e)}},"Edit"),l.createElement(aA.Z,{onClick:function(){return D(e.id)},variant:"danger"},"Delete"))))))}),f&&l.createElement(TY,{open:f,onClose:function(){return h(!1)},onSubmit:I}),M()&&l.createElement(TB,{cfg:b,open:M(),onClose:T,onSubmit:N}))}),Me=function(e){var t=e.manager,n=e.onDisable,r=e.onEnable;return l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:12},l.createElement(iy,null,"Job Distributors")),l.createElement(d.Z,{item:!0,xs:12},l.createElement(x9,{manager:t,onDisable:n,onEnable:r})),l.createElement(d.Z,{item:!0,xs:12},l.createElement(T7,{cfgs:t.chainConfigs,mgrID:t.id})),l.createElement(d.Z,{item:!0,xs:12},l.createElement(xQ,null,"Job Proposals")),l.createElement(d.Z,{item:!0,xs:12},l.createElement(Tp,{proposals:t.jobProposals})))};function Mt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Mn(e){if(Array.isArray(e))return e}function Mr(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function Mi(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){Mr(a,r,i,o,s,"next",e)}function s(e){Mr(a,r,i,o,s,"throw",e)}o(void 0)})}}function Ma(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function Mo(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ms(e,t){return Mn(e)||Ma(e,t)||Mc(e,t)||Mo()}function Mu(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Mc(e,t){if(e){if("string"==typeof e)return Mt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mt(e,t)}}var Ml=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};function Mf(){var e=Mu(["\n mutation EnableFeedsManager($id: ID!) {\n enableFeedsManager(id: $id) {\n ... on EnableFeedsManagerSuccess {\n feedsManager {\n id\n name\n uri\n publicKey\n isConnectionActive\n createdAt\n disabledAt\n }\n }\n ... on NotFoundError {\n message\n code\n }\n }\n }\n"]);return Mf=function(){return e},e}function Md(){var e=Mu(["\n mutation DisableFeedsManager($id: ID!) {\n disableFeedsManager(id: $id) {\n ... on DisableFeedsManagerSuccess {\n feedsManager {\n id\n name\n uri\n publicKey\n isConnectionActive\n createdAt\n disabledAt\n }\n }\n ... on NotFoundError {\n message\n code\n }\n }\n }\n"]);return Md=function(){return e},e}var Mh=n0(Mf()),Mp=n0(Md()),Mb=function(){var e=(0,h.UO)().id,t=oq().handleMutationError,n=(0,A.I0)(),r=xX({variables:{id:e},fetchPolicy:"cache-and-network"}),i=r.data,a=r.loading,o=r.error,s=Ms(oo(Mh),2),u=s[0],c=s[1].loading,f=Ms(oo(Mp),2),d=f[0],p=f[1].loading;if(a||c||p)return l.createElement(iR,null);if(o)return l.createElement(iD,{error:o});var b,m,g=(b=Mi(function(){var r,i,a,o,s;return Ml(this,function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),[4,u(((a={}).variables={id:e},a))];case 1:switch(null==(o=null===(r=(i=c.sent()).data)||void 0===r?void 0:r.enableFeedsManager)?void 0:o.__typename){case"EnableFeedsManagerSuccess":n((0,ty.qt)("Job Distributor Enabled"));break;case"NotFoundError":n((0,ty.LO)(o.message))}return[3,3];case 2:return t(s=c.sent()),[3,3];case 3:return[2]}})}),function(){return b.apply(this,arguments)}),v=(m=Mi(function(){var r,i,a,o,s;return Ml(this,function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),[4,d(((a={}).variables={id:e},a))];case 1:switch(null==(o=null===(r=(i=u.sent()).data)||void 0===r?void 0:r.disableFeedsManager)?void 0:o.__typename){case"DisableFeedsManagerSuccess":n((0,ty.qt)("Job Distributor Disabled"));break;case"NotFoundError":n((0,ty.LO)(o.message))}return[3,3];case 2:return t(s=u.sent()),[3,3];case 3:return[2]}})}),function(){return m.apply(this,arguments)}),y=null==i?void 0:i.feedsManager;switch(null==y?void 0:y.__typename){case"NotFoundError":return l.createElement(oa,null);case"FeedsManager":return l.createElement(Me,{manager:y,onEnable:g,onDisable:v});default:return l.createElement(h.l_,{to:{pathname:"/job_distributors"}})}},Mm={name:"",uri:"",publicKey:""},Mg=function(e){var t=e.onSubmit;return l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12,md:11,lg:9},l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Register Job Distributor"}),l.createElement(aW.Z,null,l.createElement(xS,{initialValues:Mm,onSubmit:t})))))};function Mv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function My(e){if(Array.isArray(e))return e}function Mw(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function M_(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){Mw(a,r,i,o,s,"next",e)}function s(e){Mw(a,r,i,o,s,"throw",e)}o(void 0)})}}function ME(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MS(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function Mk(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Mx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){ME(e,t,n[t])})}return e}function MT(e,t){return My(e)||MS(e,t)||MO(e,t)||Mk()}function MM(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function MO(e,t){if(e){if("string"==typeof e)return Mv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mv(e,t)}}var MA=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};function ML(){var e=MM(["\n mutation CreateFeedsManager($input: CreateFeedsManagerInput!) {\n createFeedsManager(input: $input) {\n ... on CreateFeedsManagerSuccess {\n feedsManager {\n id\n name\n uri\n publicKey\n isConnectionActive\n createdAt\n }\n }\n ... on SingleFeedsManagerError {\n message\n code\n }\n ... on DuplicateFeedsManagerError {\n message\n code\n }\n ... on NotFoundError {\n message\n code\n }\n ... on InputErrors {\n errors {\n path\n message\n code\n }\n }\n }\n }\n"]);return ML=function(){return e},e}var MC=n0(ML()),MI=function(){var e,t=(0,h.k6)(),n=(0,A.I0)(),r=oq().handleMutationError,i=MT(oo(MC,{refetchQueries:[{query:xf}]}),1)[0],a=(e=M_(function(e,a){var o,s,u,c,l,f;return MA(this,function(d){switch(d.label){case 0:o=a.setErrors,d.label=1;case 1:return d.trys.push([1,3,,4]),[4,i(((c={}).variables={input:Mx({},e)},c))];case 2:switch(null==(l=null===(s=(u=d.sent()).data)||void 0===s?void 0:s.createFeedsManager)?void 0:l.__typename){case"CreateFeedsManagerSuccess":t.push("/job_distributors"),n((0,ty.qt)("Job Distributor Created"));break;case"SingleFeedsManagerError":case"DuplicateFeedsManagerError":case"NotFoundError":n((0,ty.LO)(l.message));break;case"InputErrors":n((0,ty.LO)("Invalid Input")),o(wH(l))}return[3,4];case 3:return r(f=d.sent()),[3,4];case 4:return[2]}})}),function(t,n){return e.apply(this,arguments)});return l.createElement(Mg,{onSubmit:a})},MD=function(){var e=(0,h.$B)().path;return l.createElement(ig,null,l.createElement(h.rs,null,l.createElement(h.AW,{exact:!0,path:e},l.createElement(x_,null)),l.createElement(h.AW,{exact:!0,path:"".concat(e,"/new")},l.createElement(MI,null)),l.createElement(h.AW,{exact:!0,path:"".concat(e,"/:id")},l.createElement(Mb,null)),l.createElement(h.AW,{exact:!0,path:"".concat(e,"/:id/edit")},l.createElement(xY,null))))},MN=function(e){var t=e.proposal,n=t.specs.find(function(e){return"APPROVED"===e.status});return l.createElement(oh,null,l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12,sm:4,md:2},l.createElement(op,{title:"Status"}),l.createElement(ob,{value:km(t.status)})),l.createElement(d.Z,{item:!0,xs:12,sm:4,md:4},l.createElement(op,{title:"FMS UUID"}),l.createElement(ob,{value:t.remoteUUID})),l.createElement(d.Z,{item:!0,xs:12,sm:4,md:4},l.createElement(op,{title:"External Job ID"}),t.jobID&&t.externalJobID?l.createElement(ob,null,l.createElement(ih,{color:"primary",href:"/jobs/".concat(t.jobID)},t.externalJobID)):l.createElement(ob,{value:t.externalJobID||"--"})),l.createElement(d.Z,{item:!0,xs:12,sm:4,md:2},l.createElement(op,{title:"Approved Version"}),l.createElement(ob,{value:n?n.version:"--"}))))};function MP(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function MR(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){MP(a,r,i,o,s,"next",e)}function s(e){MP(a,r,i,o,s,"throw",e)}o(void 0)})}}var Mj=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},MF=function(){return(0,b.createStyles)({paperRoot:{width:700}})},MY=bv().shape({definition:p0().required("Required")}),MB=(0,b.withStyles)(MF)(function(e){var t,n=e.classes,r=e.initialValues,i=e.onClose,a=e.onSubmit,o=e.open;return l.createElement(hT,{initialValues:r,validationSchema:MY,onSubmit:(t=MR(function(e,t){return Mj(this,function(n){switch(n.label){case 0:return[4,a(e,t)];case 1:return n.sent(),i(),[2]}})}),function(e,n){return t.apply(this,arguments)})},function(e){var t=e.isSubmitting,r=e.submitForm;return l.createElement(hR,null,l.createElement(aD.Z,{open:o,onClose:i,classes:{paper:n.paperRoot}},l.createElement(oO.Z,{disableTypography:!0},l.createElement(x.default,{variant:"h5"},"Edit Job Spec")),l.createElement(oT.Z,null,l.createElement(hP,{component:hX,id:"definition",name:"definition",label:"Job Spec",variant:"outlined",multiline:!0,rows:10,rowsMax:25,required:!0,autoComplete:"off",margin:"normal",fullWidth:!0,spellCheck:"false"})),l.createElement(ox.Z,null,l.createElement(ok.default,{onClick:i,variant:"text"},"Cancel"),l.createElement(ok.default,{variant:"contained",color:"primary",disabled:t,onClick:r},"Submit"))))})});function MU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function MH(e){if(Array.isArray(e))return e}function M$(e){if(Array.isArray(e))return MU(e)}function Mz(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function MG(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function MW(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function MK(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function MV(e,t){return MH(e)||MG(e,t)||MX(e,t)||MW()}function Mq(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function MZ(e){return M$(e)||Mz(e)||MX(e)||MK()}function MX(e,t){if(e){if("string"==typeof e)return MU(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return MU(e,t)}}function MJ(){var e=Mq(["\n fragment JobProposal_SpecsFields on JobProposalSpec {\n id\n definition\n status\n version\n createdAt\n }\n"]);return MJ=function(){return e},e}var MQ=n0(MJ()),M1=function(e){return(0,b.createStyles)({versionText:{marginRight:2*e.spacing.unit},proposedAtContainer:{flex:1,textAlign:"right"},expansionPanelDetails:{display:"block"},actions:{display:"flex",marginBottom:2*e.spacing.unit},editContainer:{flex:1},actionsContainer:{flex:1,textAlign:"right"}})},M0={approve:{title:"Approve Job Proposal",body:"Approving this job proposal will start running a new job. WARNING: If a job using the same contract address already exists, it will be deleted before running the new one."},cancel:{title:"Cancel Job Proposal",body:"Cancelling this job proposal will delete the running job. Are you sure you want to cancel this job proposal?"},reject:{title:"Reject Job Proposal",body:"Are you sure you want to reject this job proposal?"}},M2=(0,b.withStyles)(M1)(function(e){var t=e.classes,n=e.onApprove,r=e.onCancel,i=e.onReject,a=e.onUpdateSpec,o=e.specs,s=e.proposal,u=MV(l.useState(null),2),c=u[0],f=u[1],d=MV(l.useState(!1),2),h=d[0],p=d[1],b=function(e,t){f({action:e,id:t})},m=l.useMemo(function(){return o.reduce(function(e,t){return e.version>t.version?e:t})},[o]),g=l.useMemo(function(){return MZ(o).sort(function(e,t){return t.version-e.version})},[o]),v=function(e,t,n){switch(e){case"PENDING":return l.createElement(l.Fragment,null,l.createElement(ok.default,{variant:"text",color:"secondary",onClick:function(){return b("reject",t)}},"Reject"),m.id===t&&"DELETED"!==n.status&&"REVOKED"!==n.status&&l.createElement(ok.default,{variant:"contained",color:"primary",onClick:function(){return b("approve",t)}},"Approve"),m.id===t&&"DELETED"===n.status&&n.pendingUpdate&&l.createElement(l.Fragment,null,l.createElement(ok.default,{variant:"contained",color:"primary",onClick:function(){return b("cancel",t)}},"Cancel"),l.createElement(x.default,{color:"error"},"This proposal was deleted. Cancel the spec to delete any running jobs")));case"APPROVED":return l.createElement(l.Fragment,null,l.createElement(ok.default,{variant:"contained",onClick:function(){return b("cancel",t)}},"Cancel"),"DELETED"===n.status&&n.pendingUpdate&&l.createElement(x.default,{color:"error"},"This proposal was deleted. Cancel the spec to delete any running jobs"));case"CANCELLED":if(m.id===t&&"DELETED"!==n.status&&"REVOKED"!==n.status)return l.createElement(ok.default,{variant:"contained",color:"primary",onClick:function(){return b("approve",t)}},"Approve");return null;default:return null}};return l.createElement("div",null,g.map(function(e,n){return l.createElement(mP.Z,{defaultExpanded:0===n,key:n},l.createElement(mR.Z,{expandIcon:l.createElement(gh.Z,null)},l.createElement(x.default,{className:t.versionText},"Version ",e.version),l.createElement(Es.Z,{label:e.status,color:"APPROVED"===e.status?"primary":"default",variant:"REJECTED"===e.status||"CANCELLED"===e.status?"outlined":"default"}),l.createElement("div",{className:t.proposedAtContainer},l.createElement(x.default,null,"Proposed ",l.createElement(aO,{tooltip:!0},e.createdAt)))),l.createElement(mj.Z,{className:t.expansionPanelDetails},l.createElement("div",{className:t.actions},l.createElement("div",{className:t.editContainer},0===n&&("PENDING"===e.status||"CANCELLED"===e.status)&&"DELETED"!==s.status&&"REVOKED"!==s.status&&l.createElement(ok.default,{variant:"contained",onClick:function(){return p(!0)}},"Edit")),l.createElement("div",{className:t.actionsContainer},v(e.status,e.id,s))),l.createElement(gd,{language:"toml",style:gs,"data-testid":"codeblock"},e.definition)))}),l.createElement(oC,{open:null!=c,title:c?M0[c.action].title:"",body:c?M0[c.action].body:"",onConfirm:function(){if(c){switch(c.action){case"approve":n(c.id);break;case"cancel":r(c.id);break;case"reject":i(c.id)}f(null)}},cancelButtonText:"Cancel",onCancel:function(){return f(null)}}),l.createElement(MB,{open:h,onClose:function(){return p(!1)},initialValues:{definition:m.definition,id:m.id},onSubmit:a}))});function M3(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function M4(){var e=M3(["\n ","\n fragment JobProposalPayloadFields on JobProposal {\n id\n externalJobID\n remoteUUID\n jobID\n specs {\n ...JobProposal_SpecsFields\n }\n status\n pendingUpdate\n }\n"]);return M4=function(){return e},e}var M6=n0(M4(),MQ),M5=function(e){var t=e.onApprove,n=e.onCancel,r=e.onReject,i=e.onUpdateSpec,a=e.proposal;return l.createElement(ig,null,l.createElement(d.Z,{container:!0,spacing:32},l.createElement(d.Z,{item:!0,xs:9},l.createElement(iy,null,"Job Proposal #",a.id))),l.createElement(MN,{proposal:a}),l.createElement(d.Z,{container:!0,spacing:32},l.createElement(d.Z,{item:!0,xs:9},l.createElement(xQ,null,"Specs"))),l.createElement(d.Z,{container:!0,spacing:32},l.createElement(d.Z,{item:!0,xs:12},l.createElement(M2,{proposal:a,specs:a.specs,onReject:r,onApprove:t,onCancel:n,onUpdateSpec:i}))))};function M8(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function M9(e){if(Array.isArray(e))return e}function M7(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function Oe(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){M7(a,r,i,o,s,"next",e)}function s(e){M7(a,r,i,o,s,"throw",e)}o(void 0)})}}function Ot(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function On(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Or(e,t){return M9(e)||Ot(e,t)||Oa(e,t)||On()}function Oi(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Oa(e,t){if(e){if("string"==typeof e)return M8(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return M8(e,t)}}var Oo=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};function Os(){var e=Oi(["\n ","\n query FetchJobProposal($id: ID!) {\n jobProposal(id: $id) {\n __typename\n ... on JobProposal {\n ...JobProposalPayloadFields\n }\n ... on NotFoundError {\n message\n }\n }\n }\n"]);return Os=function(){return e},e}function Ou(){var e=Oi(["\n mutation UpdateJobProposalSpecDefinition(\n $id: ID!\n $input: UpdateJobProposalSpecDefinitionInput!\n ) {\n updateJobProposalSpecDefinition(id: $id, input: $input) {\n ... on UpdateJobProposalSpecDefinitionSuccess {\n __typename\n }\n ... on NotFoundError {\n message\n }\n }\n }\n"]);return Ou=function(){return e},e}function Oc(){var e=Oi(["\n mutation RejectJobProposalSpec($id: ID!) {\n rejectJobProposalSpec(id: $id) {\n ... on RejectJobProposalSpecSuccess {\n spec {\n id\n }\n }\n ... on NotFoundError {\n message\n }\n }\n }\n"]);return Oc=function(){return e},e}function Ol(){var e=Oi(["\n mutation ApproveJobProposalSpec($id: ID!, $force: Boolean) {\n approveJobProposalSpec(id: $id, force: $force) {\n ... on ApproveJobProposalSpecSuccess {\n spec {\n id\n }\n }\n ... on NotFoundError {\n message\n }\n }\n }\n"]);return Ol=function(){return e},e}function Of(){var e=Oi(["\n mutation CancelJobProposalSpec($id: ID!) {\n cancelJobProposalSpec(id: $id) {\n ... on CancelJobProposalSpecSuccess {\n spec {\n id\n }\n }\n ... on NotFoundError {\n message\n }\n }\n }\n"]);return Of=function(){return e},e}var Od=n0(Os(),M6),Oh=n0(Ou()),Op=n0(Oc()),Ob=n0(Ol()),Om=n0(Of()),Og=function(){var e=(0,h.UO)().id,t=(0,A.I0)(),n=(0,h.k6)(),r=oq().handleMutationError,i=rv(Od,{variables:{id:e}}),a=i.data,o=i.loading,s=i.error,u=Or(oo(Oh,{refetchQueries:[Od]}),1)[0],c=Or(oo(Op,{refetchQueries:[Od]}),1)[0],f=Or(oo(Ob,{refetchQueries:[Od]}),1)[0],d=Or(oo(Om,{refetchQueries:[Od]}),1)[0];if(o)return l.createElement(iR,null);if(s)return l.createElement(iD,{error:s});var p,b,m,g,v=(p=Oe(function(e){var n,i,a,o,s;return Oo(this,function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),[4,u(((a={}).variables={id:e.id,input:{definition:e.definition}},a))];case 1:switch(null==(o=null===(n=(i=c.sent()).data)||void 0===n?void 0:n.updateJobProposalSpecDefinition)?void 0:o.__typename){case"UpdateJobProposalSpecDefinitionSuccess":t((0,ty.qt)("Spec updated"));break;case"NotFoundError":t((0,ty.LO)(o.message))}return[3,3];case 2:return r(s=c.sent()),[3,3];case 3:return[2]}})}),function(e){return p.apply(this,arguments)}),y=(b=Oe(function(e){var n,i,a,o,s;return Oo(this,function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),[4,c(((a={}).variables={id:e},a))];case 1:switch(null==(o=null===(n=(i=u.sent()).data)||void 0===n?void 0:n.rejectJobProposalSpec)?void 0:o.__typename){case"RejectJobProposalSpecSuccess":t((0,ty.qt)("Spec rejected"));break;case"NotFoundError":t((0,ty.LO)(o.message))}return[3,3];case 2:return r(s=u.sent()),[3,3];case 3:return[2]}})}),function(e){return b.apply(this,arguments)}),w=(m=Oe(function(e){var n,i,a,o,s;return Oo(this,function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),[4,d(((a={}).variables={id:e},a))];case 1:switch(null==(o=null===(n=(i=u.sent()).data)||void 0===n?void 0:n.cancelJobProposalSpec)?void 0:o.__typename){case"CancelJobProposalSpecSuccess":t((0,ty.qt)("Spec cancelled"));break;case"NotFoundError":t((0,ty.LO)(o.message))}return[3,3];case 2:return r(s=u.sent()),[3,3];case 3:return[2]}})}),function(e){return m.apply(this,arguments)}),_=(g=Oe(function(e){var i,a,o,s,u;return Oo(this,function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),[4,f(((o={}).variables={id:e,force:!0},o))];case 1:switch(null==(s=null===(i=(a=c.sent()).data)||void 0===i?void 0:i.approveJobProposalSpec)?void 0:s.__typename){case"ApproveJobProposalSpecSuccess":n.push("/job_distributors"),setTimeout(function(){return t((0,ty.qt)("Spec approved"))},200);break;case"NotFoundError":t((0,ty.LO)(s.message))}return[3,3];case 2:return r(u=c.sent()),[3,3];case 3:return[2]}})}),function(e){return g.apply(this,arguments)}),E=null==a?void 0:a.jobProposal;switch(null==E?void 0:E.__typename){case"JobProposal":return l.createElement(M5,{proposal:E,onApprove:_,onCancel:w,onReject:y,onUpdateSpec:v});case"NotFoundError":return l.createElement(oa,null);default:return null}},Ov=function(){var e=(0,h.$B)().path;return l.createElement(l.Fragment,null,l.createElement(h.AW,{exact:!0,path:"".concat(e,"/:id")},l.createElement(Og,null)))},Oy=function(e){var t=e.node;return l.createElement(oh,null,l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12,sm:4,md:3},l.createElement(op,{title:"EVM Chain ID"}),l.createElement(ob,{value:t.chain.id})),l.createElement(d.Z,{item:!0,xs:!1,sm:!1,md:4}),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(op,{title:"HTTP URL"}),l.createElement(ob,{value:""!==t.httpURL?t.httpURL:"--"})),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(op,{title:"WS URL"}),l.createElement(ob,{value:""!==t.wsURL?t.wsURL:"--"}))))};function Ow(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function O_(){var e=Ow(["\n fragment NodePayload_Fields on Node {\n id\n name\n chain {\n id\n }\n httpURL\n wsURL\n state\n sendOnly\n order\n }\n"]);return O_=function(){return e},e}var OE=n0(O_()),OS=function(e){var t=e.node;return l.createElement(l.Fragment,null,l.createElement(ig,null,l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:12},l.createElement(iy,null,t.name)),l.createElement(d.Z,{item:!0,xs:12},l.createElement(Oy,{node:t})))))};function Ok(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Ox(){var e=Ok(["\n ","\n query FetchNode($id: ID!) {\n node(id: $id) {\n __typename\n ... on Node {\n ...NodePayload_Fields\n }\n ... on NotFoundError {\n message\n }\n }\n }\n"]);return Ox=function(){return e},e}var OT=n0(Ox(),OE),OM=function(){var e=rv(OT,{variables:{id:(0,h.UO)().id}}),t=e.data,n=e.loading,r=e.error;if(n)return l.createElement(iR,null);if(r)return l.createElement(iD,{error:r});var i=null==t?void 0:t.node;switch(null==i?void 0:i.__typename){case"Node":return l.createElement(OS,{node:i});case"NotFoundError":return l.createElement(oa,null);default:return null}},OO=(0,b.withStyles)(iu)(function(e){var t=e.node,n=e.classes;return l.createElement(ir.Z,{className:n.row,hover:!0},l.createElement(r7.default,{className:n.cell,component:"th",scope:"row"},l.createElement(ih,{className:n.link,href:"/nodes/".concat(t.name)},t.name)),l.createElement(r7.default,null,t.chain.id),l.createElement(r7.default,null,t.state),l.createElement(r7.default,null,t.sendOnly?"SendOnly":"Primary"),l.createElement(r7.default,null,t.order?t.order:"NA"))});function OA(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function OL(e){if(Array.isArray(e))return e}function OC(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function OI(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function OD(e,t){return OL(e)||OC(e,t)||OP(e,t)||OI()}function ON(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function OP(e,t){if(e){if("string"==typeof e)return OA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return OA(e,t)}}function OR(){var e=ON(["\n fragment NodesPayload_ResultsFields on Node {\n id\n chain {\n id\n }\n name\n state\n sendOnly\n order\n }\n"]);return OR=function(){return e},e}var Oj=n0(OR()),OF=function(e){var t=e.toLowerCase();return function(e){return e.toLowerCase().includes(t)}},OY=function(e){return function(t){return""===e||OB(t,e)}};function OB(e,t){var n;return[e.id,e.name,e.chain.id].some(OF(t))}var OU=function(e){var t=e.nodes,n=e.page,r=e.pageSize,i=e.total,a=(0,h.k6)(),o=OD(l.useState(""),2),s=o[0],u=o[1],c=l.useMemo(function(){return t.filter(OY(s.trim()))},[s,t]);return l.createElement(ig,null,l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:9},l.createElement(iy,null,"Nodes")),l.createElement(d.Z,{item:!0,xs:12},l.createElement(iE,{value:s,onChange:u,placeholder:"Search nodes"}),l.createElement(r5.Z,null,l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,"Name"),l.createElement(r7.default,null,"EVM Chain ID"),l.createElement(r7.default,null,"State"),l.createElement(r7.default,null,"Type"),l.createElement(r7.default,null,"Order"))),l.createElement(r9.Z,null,0===c.length&&l.createElement(ir.Z,null,l.createElement(r7.default,{component:"th",scope:"row",colSpan:4},"No nodes found")),c.map(function(e){return l.createElement(OO,{key:e.id,node:e})}))),l.createElement(it.Z,{component:"div",count:i,rowsPerPage:r,rowsPerPageOptions:[r],page:n-1,onChangePage:function(e,t){a.push("/nodes?page=".concat(t+1,"&per=").concat(r))},onChangeRowsPerPage:function(){},backIconButtonProps:{"aria-label":"prev-page"},nextIconButtonProps:{"aria-label":"next-page"}})))))};function OH(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function O$(){var e=OH(["\n ","\n query FetchNodes($offset: Int, $limit: Int) {\n nodes(offset: $offset, limit: $limit) {\n results {\n ...NodesPayload_ResultsFields\n }\n metadata {\n total\n }\n }\n }\n"]);return O$=function(){return e},e}var Oz=n0(O$(),Oj),OG=function(){var e=ij(),t=parseInt(e.get("page")||"1",10),n=parseInt(e.get("per")||"100",10),r=rv(Oz,{variables:{offset:(t-1)*n,limit:n},fetchPolicy:"network-only"}),i=r.data,a=r.loading,o=r.error;return a?l.createElement(iR,null):o?l.createElement(iD,{error:o}):i?l.createElement(OU,{nodes:i.nodes.results,page:t,pageSize:n,total:i.nodes.metadata.total}):null},OW=function(){var e=(0,h.$B)().path;return l.createElement(h.rs,null,l.createElement(h.AW,{path:"".concat(e,"/:id")},l.createElement(OM,null)),l.createElement(h.AW,{exact:!0,path:e},l.createElement(OG,null)))},OK=function(e){var t=e.tx;return l.createElement(oh,null,l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12},l.createElement(op,{title:"Txn Hash"}),l.createElement(ob,{value:t.hash})),l.createElement(d.Z,{item:!0,xs:12,md:3},l.createElement(op,{title:"Chain ID"}),l.createElement(ob,{value:t.chain.id})),l.createElement(d.Z,{item:!0,xs:12,md:3},l.createElement(op,{title:"Status"}),l.createElement(ob,{value:km(t.state)})),l.createElement(d.Z,{item:!0,xs:12,md:3},l.createElement(op,{title:"Nonce"}),l.createElement(ob,{value:t.nonce})),l.createElement(d.Z,{item:!0,xs:12,md:3},l.createElement(op,{title:"Sent At (Block)"}),l.createElement(ob,{value:t.sentAt})),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(op,{title:"From"}),l.createElement(ob,{value:t.from})),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(op,{title:"To"}),l.createElement(ob,{value:t.to})),l.createElement(d.Z,{item:!0,xs:12,md:3},l.createElement(op,{title:"Value"}),l.createElement(ob,{value:t.value})),l.createElement(d.Z,{item:!0,xs:!1,md:3}),l.createElement(d.Z,{item:!0,xs:12,md:3},l.createElement(op,{title:"Gas Price"}),l.createElement(ob,{value:t.gasPrice})),l.createElement(d.Z,{item:!0,xs:12,md:3},l.createElement(op,{title:"Gas Limit"}),l.createElement(ob,{value:t.gasLimit})),l.createElement(d.Z,{item:!0,xs:12},l.createElement(op,{title:"Raw Hex"}),l.createElement(om,null,t.hex)),l.createElement(d.Z,{item:!0,xs:12},l.createElement(op,{title:"Data"}),l.createElement(om,null,t.data))))};function OV(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Oq(){var e=OV(["\n fragment EthTransactionPayloadFields on EthTransaction {\n chain {\n id\n }\n data\n from\n gasLimit\n gasPrice\n hash\n hex\n nonce\n sentAt\n state\n to\n value\n }\n"]);return Oq=function(){return e},e}var OZ=n0(Oq()),OX=function(e){var t=e.tx;return l.createElement(ig,null,l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:12},l.createElement(iy,null,"Transaction Details")),l.createElement(d.Z,{item:!0,xs:12},l.createElement(OK,{tx:t}))))};function OJ(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function OQ(){var e=OJ(["\n ","\n query FetchEthTransaction($hash: ID!) {\n ethTransaction(hash: $hash) {\n __typename\n ... on EthTransaction {\n ...EthTransactionPayloadFields\n }\n ... on NotFoundError {\n message\n }\n }\n }\n"]);return OQ=function(){return e},e}var O1=n0(OQ(),OZ),O0=function(){var e=rv(O1,{variables:{hash:(0,h.UO)().id}}),t=e.data,n=e.loading,r=e.error;if(n)return l.createElement(iR,null);if(r)return l.createElement(iD,{error:r});var i=null==t?void 0:t.ethTransaction;switch(null==i?void 0:i.__typename){case"EthTransaction":return l.createElement(OX,{tx:i});case"NotFoundError":return l.createElement(oa,null);default:return null}},O2=(0,b.withStyles)(iu)(function(e){var t=e.tx,n=e.classes;return l.createElement(ir.Z,{className:n.row,hover:!0},l.createElement(r7.default,{className:n.cell,component:"th",scope:"row"},l.createElement(ih,{className:n.link,href:"/transactions/".concat(t.hash)},_T(t.hash,{start:8,end:8}))),l.createElement(r7.default,null,t.chain.id),l.createElement(r7.default,null,_T(t.from,{start:8,end:8})),l.createElement(r7.default,null,_T(t.to,{start:8,end:8})),l.createElement(r7.default,null,t.nonce),l.createElement(r7.default,null,t.sentAt||"--"))});function O3(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function O4(){var e=O3(["\n fragment EthTransactionsPayload_ResultsFields on EthTransaction {\n chain {\n id\n }\n from\n hash\n to\n nonce\n sentAt\n }\n"]);return O4=function(){return e},e}var O6=n0(O4()),O5=function(e){var t=e.data,n=e.loading,r=e.page,i=e.pageSize,a=(0,h.k6)();return l.createElement(ig,null,l.createElement(d.Z,{container:!0,spacing:32},l.createElement(d.Z,{item:!0,xs:12},l.createElement(iy,null,"Transactions")),n&&l.createElement(iR,null),t&&l.createElement(d.Z,{item:!0,xs:12},l.createElement(r5.Z,null,l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,"Txn Hash"),l.createElement(r7.default,null,"Chain ID"),l.createElement(r7.default,null,"From"),l.createElement(r7.default,null,"To"),l.createElement(r7.default,null,"Nonce"),l.createElement(r7.default,null,"Block"))),l.createElement(r9.Z,null,(null==t?void 0:t.ethTransactions.results.length)===0&&l.createElement(ir.Z,null,l.createElement(r7.default,{component:"th",scope:"row",colSpan:6},"You haven’t created any transactions yet")),null==t?void 0:t.ethTransactions.results.map(function(e,t){return l.createElement(O2,{tx:e,key:t})}))),l.createElement(it.Z,{component:"div",count:t.ethTransactions.metadata.total,rowsPerPage:i,rowsPerPageOptions:[10,25,50,100],page:r-1,onChangePage:function(e,t){a.push("/transactions?page=".concat(t+1,"&per=").concat(i))},onChangeRowsPerPage:function(e){a.push("/transactions?page=".concat(r,"&per=").concat(parseInt(e.target.value,10)))},backIconButtonProps:{"aria-label":"prev-page"},nextIconButtonProps:{"aria-label":"next-page"}})))))};function O8(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function O9(){var e=O8(["\n ","\n query FetchEthTransactions($offset: Int, $limit: Int) {\n ethTransactions(offset: $offset, limit: $limit) {\n results {\n ...EthTransactionsPayload_ResultsFields\n }\n metadata {\n total\n }\n }\n }\n"]);return O9=function(){return e},e}var O7=n0(O9(),O6),Ae=function(){var e=ij(),t=parseInt(e.get("page")||"1",10),n=parseInt(e.get("per")||"25",10),r=rv(O7,{variables:{offset:(t-1)*n,limit:n},fetchPolicy:"cache-and-network"}),i=r.data,a=r.loading,o=r.error;return o?l.createElement(iD,{error:o}):l.createElement(O5,{data:i,loading:a,page:t,pageSize:n})},At=function(){var e=(0,h.$B)().path;return l.createElement(h.rs,null,l.createElement(h.AW,{path:"".concat(e,"/:id")},l.createElement(O0,null)),l.createElement(h.AW,{exact:!0,path:e},l.createElement(Ae,null)))};function An(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ar(e){if(Array.isArray(e))return e}function Ai(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function Aa(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ao(e,t){return Ar(e)||Ai(e,t)||As(e,t)||Aa()}function As(e,t){if(e){if("string"==typeof e)return An(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return An(e,t)}}e=n.hmd(e);var Au=function(e){return{content:{marginTop:0,marginBottom:5*e.spacing.unit}}},Ac=function(e){var t=e.classes,n=Ao(l.useState(0),2),r=n[0],i=n[1],a=null;return l.createElement(d.Z,{container:!0,spacing:0},l.createElement(d.Z,{item:!0,xs:12},l.createElement(rQ,{onResize:function(e,t){return i(t)},drawerContainer:a}),l.createElement("main",{ref:function(e){a=e},style:{paddingTop:r}},l.createElement(r1.ZP,null),l.createElement("div",{className:t.content},l.createElement(h.rs,null,l.createElement(r6,{exact:!0,path:"/"},l.createElement(vE,null)),l.createElement(r6,{exact:!0,path:"/chains"},l.createElement(iz,null)),l.createElement(r6,{path:"/chains/:chainId"},l.createElement(a7,null)),l.createElement(r6,{path:"/bridges"},l.createElement(b6,null)),l.createElement(r6,{path:"/config"},l.createElement(gM,null)),l.createElement(r6,{path:"/job_distributors"},l.createElement(MD,null)),l.createElement(r6,{path:"/job_proposals"},l.createElement(Ov,null)),l.createElement(r6,{path:"/jobs"},l.createElement(_m,null)),l.createElement(r6,{path:"/runs"},l.createElement(xu,null)),l.createElement(r6,{path:"/keys"},l.createElement(kn,null)),l.createElement(r6,{path:"/nodes"},l.createElement(OW,null)),l.createElement(r6,{path:"/transactions"},l.createElement(At,null)),l.createElement(r6,{component:oa}))))))};let Al=(0,p.wU)(e)((0,b.withStyles)(Au)(Ac))},26842(e,t,n){"use strict";n.d(t,{iw:()=>U,tA:()=>$,KL:()=>H,Iw:()=>V,DQ:()=>W,cB:()=>T,LO:()=>M,t5:()=>k,qt:()=>x,Jc:()=>C,L7:()=>Y,EO:()=>B});var r,i,a=n(66289),o=n(41800),s=n.n(o),u=n(67932);(i=r||(r={})).IN_PROGRESS="in_progress",i.PENDING_INCOMING_CONFIRMATIONS="pending_incoming_confirmations",i.PENDING_CONNECTION="pending_connection",i.PENDING_BRIDGE="pending_bridge",i.PENDING_SLEEP="pending_sleep",i.ERRORED="errored",i.COMPLETED="completed";var c=n(87013),l=n(19084),f=n(34823);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function h(e){if(Array.isArray(e))return d(e)}function p(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function b(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){p(a,r,i,o,s,"next",e)}function s(e){p(a,r,i,o,s,"throw",e)}o(void 0)})}}function m(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function g(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function v(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function y(e){return h(e)||g(e)||w(e)||v()}function w(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}}var _=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},E=function(e,t){return{type:t,error:e.stack,errors:[]}},S=function(e,t){return function(n){m(n,a._7)?I(e):e(E(n,t))}},k=function(e,t){return{type:l.Ih.NOTIFY_SUCCESS,component:e,props:t}},x=function(e){return{type:l.Ih.NOTIFY_SUCCESS_MSG,msg:e}},T=function(e,t){return{type:l.Ih.NOTIFY_ERROR,component:e,error:t}},M=function(e){return{type:l.Ih.NOTIFY_ERROR_MSG,msg:e}},O=function(e){return{type:l.Mk.RECEIVE_SIGNIN_SUCCESS,authenticated:e.data.attributes.authenticated}},A=function(){return{type:l.Mk.RECEIVE_SIGNIN_FAIL}};function L(e){return function(t){return t({type:l.Mk.REQUEST_SIGNIN}),u.i.createSession(e).then(function(e){return t(O(e))}).catch(function(n){if(m(n,a._7))try{if(0==n.errors.length||null===n.errors[0].detail){t(A());return}n.errors[0].detail.json().then(function(n){if(!n){t(A());return}try{var r=JSON.parse(n.errors[0].detail);if(r.publicKey.challenge=D(r.publicKey.challenge),r.publicKey.allowCredentials.forEach(function(e){e.id=D(e.id)}),void 0===navigator.credentials){alert("Could not access credential subsystem in the browser. Must be using HTTPS or localhost."),t(A());return}navigator.credentials.get({publicKey:r.publicKey}).then(function(n){if(null===n){t(A());return}var r=n,i=r.response,a=i.authenticatorData,o=i.clientDataJSON,s=r.rawId,c=i.signature,l=i.userHandle,f=JSON.stringify({id:n.id,rawId:N(s),type:n.type,response:{authenticatorData:N(a),clientDataJSON:N(o),signature:N(c),userHandle:N(l)}});return e.webauthndata=f,u.i.createSession(e).then(function(e){return t(O(e))}).catch(function(e){t(A())})})}catch(i){t(A())}}).catch(function(e){t(A())})}catch(r){t(A())}else t(E(n,l.Mk.RECEIVE_SIGNIN_ERROR))})}}var C=function(){return{type:l.Mk.RECEIVE_SIGNOUT_SUCCESS,authenticated:!1}};function I(e){return u.i.destroySession().then(function(){return e(C())}).catch(function(t){if(m(t,a._7)){e(C());return}e(E(t,l.Mk.RECEIVE_SIGNIN_ERROR))})}function D(e){return Uint8Array.from(atob(e),function(e){return e.charCodeAt(0)})}function N(e){if(null===e)return"";var t=new Uint8Array(e),n=String.fromCharCode.apply(null,Array.from(t));return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function P(e){var t=e.data.attributes.settings;return t.publicKey.challenge=D(t.publicKey.challenge),t.publicKey.user.id=D(t.publicKey.user.id),t.publicKey.excludeCredentials&&t.publicKey.excludeCredentials.forEach(function(e){e.id=D(e.id)}),navigator.credentials.create({publicKey:t.publicKey})}function R(){if(void 0===navigator.credentials){alert("Could not access credential subsystem in the browser. Must be using HTTPS or localhost.");return}return u.v2.webauthn.beginKeyRegistration({}).then(function(e){return P(e).then(function(e){if(null===e){alert("Error, could not generate credential. User declined to enroll?");return}var t=e,n=t.response,r={id:e.id,rawId:N(t.rawId),type:e.type,response:{attestationObject:N(n.attestationObject),clientDataJSON:N(n.clientDataJSON)}};return u.v2.webauthn.finishKeyRegistration(r)})}).catch(function(e){alert("Key registration error, ensure MFA_RPID and MFA_RPORIGIN environment variables are set.\n"+e)})}var j={type:l.jp.RECEIVE_CREATE_SUCCESS},F=function(e){return{type:l.jp.RECEIVE_DELETE_SUCCESS,id:e}},Y=function(e){return L(e)},B=function(){return I},U=function(){return R()},H=function(e,t,n){return function(r){return r({type:l.jp.REQUEST_DELETE}),u.v2.chains.destroyChain(e).then(function(n){r(F(e)),r(k(t,n))}).catch(function(e){S(r,l.jp.RECEIVE_DELETE_ERROR)(e),r(T(n,e))})}},$=function(e,t,n,r){return function(i){return i({type:l.jp.REQUEST_CREATE}),u.v2.jobs.createJobRunV2(e,t).then(function(e){i(j),i(k(n,e))}).catch(function(e){S(i,l.jp.RECEIVE_CREATE_ERROR)(e),i(T(r,e))})}},z=function(e){return function(t){m(t,a._7)?e(C()):e(T(function(e){return e.msg},t))}};function G(e,t,n,r){var i="UPSERT"===t?"REQUEST_".concat(e):"REQUEST_".concat(t,"_").concat(e),a="UPSERT"===t?"RESPONSE_".concat(e):"RESPONSE_".concat(t,"_").concat(e),o="".concat(t,"_").concat(e);return function(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return function(e){return e({type:i}),n.apply(void 0,y(t)).then(function(t){e({type:o,data:r(t)})}).catch(z(e)).finally(function(){return e({type:a})})}}}function W(){var e;return e=b(function(e,t){var n,r,i,a,o,s,d,h,p,b,m;return _(this,function(g){switch(g.label){case 0:if(e(n=((r={}).type=l.Y0.FETCH_BUILD_INFO_REQUESTED,r)),i=(0,f.N)(t()),o={},i.commitSHA!==c.Y.commitSHA&&i.version!==c.Y.version)return e(a=(o.type=l.Y0.FETCH_BUILD_INFO_SUCCEEDED,o.buildInfo=i,o)),[2];g.label=1;case 1:return g.trys.push([1,3,,4]),[4,u.v2.buildInfo.show()];case 2:return s=g.sent(),e(d=((h={}).type=l.Y0.FETCH_BUILD_INFO_SUCCEEDED,h.buildInfo=s,h)),[3,4];case 3:return p=g.sent(),e(b=((m={}).type=l.Y0.FETCH_BUILD_INFO_FAILED,m.error=p,m)),z(e)(p),[3,4];case 4:return[2]}})}),function(t,n){return e.apply(this,arguments)}}function K(e,t,n){return G(e,"DELETE",t,n)}var V=function(e){return K("ERRORED_JOB_RUNS",u.v2.bulkDeleteRuns.bulkDeleteJobRuns,s())({status:[r.ERRORED],updatedBefore:e})}},67932(e,t,n){"use strict";n.d(t,{i:()=>j,v2:()=>F});var r=n(66289);function i(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var a="/sessions",o="/sessions",s=function e(t){var n=this;i(this,e),this.api=t,this.createSession=function(e){return n.create(e)},this.destroySession=function(){return n.destroy()},this.create=this.api.createResource(a),this.destroy=this.api.deleteResource(o)};function u(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var c="/v2/bulk_delete_runs",l=function e(t){var n=this;u(this,e),this.api=t,this.bulkDeleteJobRuns=function(e){return n.destroy(e)},this.destroy=this.api.deleteResource(c)};function f(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var d="/v2/chains/evm",h="".concat(d,"/:id"),p=function e(t){var n=this;f(this,e),this.api=t,this.getChains=function(){return n.index()},this.createChain=function(e){return n.create(e)},this.destroyChain=function(e){return n.destroy(void 0,{id:e})},this.updateChain=function(e,t){return n.update(t,{id:e})},this.index=this.api.fetchResource(d),this.create=this.api.createResource(d),this.destroy=this.api.deleteResource(h),this.update=this.api.updateResource(h)};function b(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var m="/v2/keys/evm/chain",g=function e(t){var n=this;b(this,e),this.api=t,this.chain=function(e){var t=new URLSearchParams;t.append("address",e.address),t.append("evmChainID",e.evmChainID),null!==e.abandon&&t.append("abandon",String(e.abandon)),null!==e.enabled&&t.append("enabled",String(e.enabled));var r=m+"?"+t.toString();return n.api.createResource(r)()}};function v(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var y="/v2/jobs",w="".concat(y,"/:specId/runs"),_=function e(t){var n=this;v(this,e),this.api=t,this.createJobRunV2=function(e,t){return n.post(t,{specId:e})},this.post=this.api.createResource(w,!0)};function E(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var S="/v2/log",k=function e(t){var n=this;E(this,e),this.api=t,this.getLogConfig=function(){return n.show()},this.updateLogConfig=function(e){return n.update(e)},this.show=this.api.fetchResource(S),this.update=this.api.updateResource(S)};function x(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var T="/v2/nodes",M=function e(t){var n=this;x(this,e),this.api=t,this.getNodes=function(){return n.index()},this.createNode=function(e){return n.create(e)},this.index=this.api.fetchResource(T),this.create=this.api.createResource(T)};function O(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var A="/v2/enroll_webauthn",L=function e(t){var n=this;O(this,e),this.api=t,this.beginKeyRegistration=function(e){return n.create(e)},this.finishKeyRegistration=function(e){return n.put(e)},this.create=this.api.fetchResource(A),this.put=this.api.createResource(A)};function C(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var I="/v2/build_info",D=function e(t){var n=this;C(this,e),this.api=t,this.show=function(){return n.api.GET(I)()}};function N(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var P=function e(t){N(this,e),this.api=t,this.buildInfo=new D(this.api),this.bulkDeleteRuns=new l(this.api),this.chains=new p(this.api),this.logConfig=new k(this.api),this.nodes=new M(this.api),this.jobs=new _(this.api),this.webauthn=new L(this.api),this.evmKeys=new g(this.api)},R=new r.V0({base:void 0}),j=new s(R),F=new P(R)},1398(e,t,n){"use strict";n.d(t,{Z:()=>d});var r=n(67294),i=n(32316),a=n(83638),o=n(94184),s=n.n(o);function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var c=function(e){var t=e.palette;return(0,i.createStyles)({default:{borderColor:"#BECAD6","&:hover":{backgroundColor:t.common.white,borderColor:"#BECAD6",boxShadow:"0 2px 4px 0 rgba(0,123,255,0.06), 0 2px 2px 0 rgba(0,0,0,0.06)"}},primary:{boxShadow:"0 0",backgroundColor:t.primary.main,color:t.common.white,"&:hover":{backgroundColor:t.primary.main,boxShadow:"0 2px 4px 0 rgba(0,123,255,0.19), 0 2px 2px 0 rgba(0,0,0,0.15)"}},secondary:{"&:hover":{backgroundColor:t.common.white}},danger:{borderColor:t.error.main,color:t.error.main,"&:hover":{backgroundColor:t.common.white,borderColor:t.error.main,boxShadow:"0 2px 4px 0 rgba(0,123,255,0.06), 0 2px 2px 0 rgba(0,0,0,0.06)"}},defaultRipple:{color:t.text.secondary}})},l=function(e,t){switch(e){case"primary":return{variant:"contained"};case"secondary":case"danger":return{variant:"outlined",color:"primary"};default:return{variant:"outlined",color:"secondary",TouchRippleProps:{classes:{root:t.defaultRipple}}}}},f=function(e){var t=e.variant,n=void 0===t?"default":t,i=e.disabled,o=e.type,c=e.component,f=e.href,d=e.classes,h=e.className,p=e.children,b=e.onClick,m=e.onMouseLeave,g=Object.assign({component:c,disabled:i,href:f,onClick:b,type:o,size:e.size,onMouseLeave:m},l(n,d)),v=s()(d[n],h);return r.createElement(a.default,u({},g,{className:v}),p)};let d=(0,i.withStyles)(c)(f)},5536(e,t,n){"use strict";n.d(t,{T:()=>c});var r=n(67294),i=n(32316);function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var o=(0,i.createStyles)({animate:{animation:"spin 4s linear infinite"},"@keyframes spin":{"100%":{transform:"rotate(360deg)"}}}),s=function(e){var t=e.src,n=e.width,i=e.height,a=e.alt,o=e.classes,s=e.spin,u=void 0!==s&&s;return r.createElement("img",{src:t,className:u?o.animate:"",alt:a,width:n,height:i})},u=(0,i.withStyles)(o)(s),c=function(e){return r.createElement(u,a({},e))}},3950(e,t,n){"use strict";n.d(t,{ZP:()=>x,jK:()=>v});var r=n(67294),i=n(37703),a=n(45697),o=n.n(a),s=n(82204),u=n(71426),c=n(94184),l=n.n(c),f=n(32316),d=function(e){var t=e.palette.success||{},n=e.palette.warning||{};return{base:{paddingLeft:5*e.spacing.unit,paddingRight:5*e.spacing.unit},success:{backgroundColor:t.main,color:t.contrastText},error:{backgroundColor:e.palette.error.dark,color:e.palette.error.contrastText},warning:{backgroundColor:n.contrastText,color:n.main}}},h=function(e){var t,n=e.success,r=e.error,i=e.warning,a=e.classes,o=e.className;return n?t=a.success:r?t=a.error:i&&(t=a.warning),l()(a.base,o,t)},p=function(e){return r.createElement(s.Z,{className:h(e),square:!0},r.createElement(u.default,{variant:"body2",color:"inherit",component:"div"},e.children))};p.defaultProps={success:!1,error:!1,warning:!1},p.propTypes={success:o().bool,error:o().bool,warning:o().bool};let b=(0,f.withStyles)(d)(p);var m=function(){return r.createElement(r.Fragment,null,"Unhandled error. Please help us by opening a"," ",r.createElement("a",{href:"https://github.com/smartcontractkit/chainlink/issues/new"},"bug report"))};let g=m;function v(e){return"string"==typeof e?e:e.component?e.component(e.props):r.createElement(g,null)}function y(e,t){var n;return n="string"==typeof e?e:e.component?e.component(e.props):r.createElement(g,null),r.createElement("p",{key:t},n)}var w=function(e){var t=e.notifications;return r.createElement(b,{error:!0},t.map(y))},_=function(e){var t=e.notifications;return r.createElement(b,{success:!0},t.map(y))},E=function(e){var t=e.errors,n=e.successes;return r.createElement("div",null,(null==t?void 0:t.length)>0&&r.createElement(w,{notifications:t}),n.length>0&&r.createElement(_,{notifications:n}))},S=function(e){return{errors:e.notifications.errors,successes:e.notifications.successes}},k=(0,i.$j)(S)(E);let x=k},9409(e,t,n){"use strict";n.d(t,{ZP:()=>j});var r=n(67294),i=n(37703),a=n(5977),o=n(32316),s=n(1398),u=n(82204),c=n(30060),l=n(71426),f=n(60520),d=n(39814),h=n(57209),p=n(26842),b=n(3950),m=n(5536),g=n(45697),v=n.n(g);let y=n.p+"9f6d832ef97e8493764e.svg";function w(){return(w=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var _=function(e){return r.createElement(m.T,w({src:y,alt:"Chainlink Operator"},e))};_.propTypes={width:v().number,height:v().number};let E=_;var S=n(97779),k=function(e){return function(t){return(0,S.DE)(e,t)}};let x=k;var T=n(9541);function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function O(e){if(Array.isArray(e))return e}function A(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function L(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function C(e,t){return O(e)||A(e,t)||I(e,t)||L()}function I(e,t){if(e){if("string"==typeof e)return M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return M(e,t)}}e=n.hmd(e);var D=function(e){return{container:{height:"100%"},cardContent:{paddingTop:6*e.spacing.unit,paddingLeft:4*e.spacing.unit,paddingRight:4*e.spacing.unit,"&:last-child":{paddingBottom:6*e.spacing.unit}},headerRow:{textAlign:"center"},error:{backgroundColor:e.palette.error.light,marginTop:2*e.spacing.unit},errorText:{color:e.palette.error.main}}},N=function(e){var t=C((0,r.useState)(""),2),n=t[0],i=t[1],o=C((0,r.useState)(""),2),h=o[0],p=o[1],m=function(e){return function(t){"email"===e&&i(t.target.value),"password"===e&&p(t.target.value)}},g=function(t){t.preventDefault(),e.submitSignIn({email:n,password:h})},v=e.classes,y=e.fetching,w=e.authenticated,_=e.errors;return w?r.createElement(a.l_,{to:(0,T.Tp)()||"/"}):r.createElement(d.Z,{container:!0,justify:"center",alignItems:"center",className:v.container,spacing:0},r.createElement(d.Z,{item:!0,xs:10,sm:6,md:4,lg:3,xl:2},r.createElement(u.Z,null,r.createElement(c.Z,{className:v.cardContent},r.createElement("form",{noValidate:!0,onSubmit:g},r.createElement(d.Z,{container:!0,spacing:8},r.createElement(d.Z,{item:!0,xs:12},r.createElement(d.Z,{container:!0,spacing:0},r.createElement(d.Z,{item:!0,xs:12,className:v.headerRow},r.createElement(E,{width:50})),r.createElement(d.Z,{item:!0,xs:12,className:v.headerRow},r.createElement(l.default,{variant:"h5"},"Operator")))),_.length>0&&_.map(function(e,t){return r.createElement(d.Z,{item:!0,xs:12,key:t},r.createElement(u.Z,{raised:!1,className:v.error},r.createElement(c.Z,null,r.createElement(l.default,{variant:"body1",className:v.errorText},(0,b.jK)(e)))))}),r.createElement(d.Z,{item:!0,xs:12},r.createElement(f.Z,{id:"email",label:"Email",margin:"normal",value:n,onChange:m("email"),error:_.length>0,variant:"outlined",fullWidth:!0})),r.createElement(d.Z,{item:!0,xs:12},r.createElement(f.Z,{id:"password",label:"Password",type:"password",autoComplete:"password",margin:"normal",value:h,onChange:m("password"),error:_.length>0,variant:"outlined",fullWidth:!0})),r.createElement(d.Z,{item:!0,xs:12},r.createElement(d.Z,{container:!0,spacing:0,justify:"center"},r.createElement(d.Z,{item:!0},r.createElement(s.Z,{type:"submit",variant:"primary"},"Access Account")))),y&&r.createElement(l.default,{variant:"body1",color:"textSecondary"},"Signing in...")))))))},P=function(e){return{fetching:e.authentication.fetching,authenticated:e.authentication.allowed,errors:e.notifications.errors}},R=(0,i.$j)(P,x({submitSignIn:p.L7}))(N);let j=(0,h.wU)(e)((0,o.withStyles)(D)(R))},16353(e,t,n){"use strict";n.d(t,{ZP:()=>H,rH:()=>U});var r,i=n(37703),a=n(97779),o=n(9541),s=n(19084);function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){u(e,t,n[t])})}return e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function f(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var d,h=c({},{allowed:!1,errors:[]},o.pm()),p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case s.Mk.RECEIVE_SIGNOUT_SUCCESS:case s.Mk.RECEIVE_SIGNIN_SUCCESS:var n={allowed:t.authenticated};return o.Ks(n),f(c({},e,n),{errors:[]});case s.Mk.RECEIVE_SIGNIN_FAIL:var r={allowed:!1};return o.Ks(r),f(c({},e,r),{errors:[]});case s.Mk.RECEIVE_SIGNIN_ERROR:case s.Mk.RECEIVE_SIGNOUT_ERROR:var i={allowed:!1};return o.Ks(i),f(c({},e,i),{errors:t.errors||[]});default:return e}};let b=p;function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){m(e,t,n[t])})}return e}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function y(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):v(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var w,_={count:0};(w=r||(r={})).REQUEST="REQUEST_",w.RECEIVE="RECEIVE_",w.RESPONSE="RESPONSE_";var E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_,t=arguments.length>1?arguments[1]:void 0;return t.type?t.type.startsWith(r.REQUEST)?y(g({},e),{count:e.count+1}):t.type.startsWith(r.RECEIVE)?y(g({},e),{count:Math.max(e.count-1,0)}):t.type.startsWith(r.RESPONSE)?y(g({},e),{count:Math.max(e.count-1,0)}):t.type===s.di.REDIRECT?y(g({},e),{count:0}):e:e};let S=E;function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){k(e,t,n[t])})}return e}function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function M(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):T(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var O={errors:[],successes:[],currentUrl:void 0},A=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case s.di.MATCH_ROUTE:return M(x({},O),{currentUrl:t.pathname});case s.Ih.NOTIFY_SUCCESS:var n={component:t.component,props:t.props};return M(x({},e),{successes:[n],errors:[]});case s.Ih.NOTIFY_SUCCESS_MSG:return M(x({},e),{successes:[t.msg],errors:[]});case s.Ih.NOTIFY_ERROR:var r=t.error.errors,i=null==r?void 0:r.map(function(e){return L(t,e)});return M(x({},e),{successes:[],errors:i});case s.Ih.NOTIFY_ERROR_MSG:return M(x({},e),{successes:[],errors:[t.msg]});case s.Mk.RECEIVE_SIGNIN_FAIL:return M(x({},e),{successes:[],errors:["Your email or password is incorrect. Please try again"]});default:return e}};function L(e,t){return{component:e.component,props:{msg:t.detail}}}let C=A;function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){I(e,t,n[t])})}return e}function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function P(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):N(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var R={to:void 0},j=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:R,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case s.di.REDIRECT:return P(D({},e),{to:t.to});case s.di.MATCH_ROUTE:return P(D({},e),{to:void 0});default:return e}};let F=j;var Y=n(87013),B=(0,a.UY)({authentication:b,fetching:S,notifications:C,redirect:F,buildInfo:Y.Z});B(void 0,{type:"INITIAL_STATE"});var U=i.v9;let H=B},19084(e,t,n){"use strict";var r,i,a,o,s,u,c,l,f,d;n.d(t,{Ih:()=>i,Mk:()=>a,Y0:()=>s,di:()=>r,jp:()=>o}),n(67294),(u=r||(r={})).REDIRECT="REDIRECT",u.MATCH_ROUTE="MATCH_ROUTE",(c=i||(i={})).NOTIFY_SUCCESS="NOTIFY_SUCCESS",c.NOTIFY_SUCCESS_MSG="NOTIFY_SUCCESS_MSG",c.NOTIFY_ERROR="NOTIFY_ERROR",c.NOTIFY_ERROR_MSG="NOTIFY_ERROR_MSG",(l=a||(a={})).REQUEST_SIGNIN="REQUEST_SIGNIN",l.RECEIVE_SIGNIN_SUCCESS="RECEIVE_SIGNIN_SUCCESS",l.RECEIVE_SIGNIN_FAIL="RECEIVE_SIGNIN_FAIL",l.RECEIVE_SIGNIN_ERROR="RECEIVE_SIGNIN_ERROR",l.RECEIVE_SIGNOUT_SUCCESS="RECEIVE_SIGNOUT_SUCCESS",l.RECEIVE_SIGNOUT_ERROR="RECEIVE_SIGNOUT_ERROR",(f=o||(o={})).RECEIVE_CREATE_ERROR="RECEIVE_CREATE_ERROR",f.RECEIVE_CREATE_SUCCESS="RECEIVE_CREATE_SUCCESS",f.RECEIVE_DELETE_ERROR="RECEIVE_DELETE_ERROR",f.RECEIVE_DELETE_SUCCESS="RECEIVE_DELETE_SUCCESS",f.RECEIVE_UPDATE_ERROR="RECEIVE_UPDATE_ERROR",f.RECEIVE_UPDATE_SUCCESS="RECEIVE_UPDATE_SUCCESS",f.REQUEST_CREATE="REQUEST_CREATE",f.REQUEST_DELETE="REQUEST_DELETE",f.REQUEST_UPDATE="REQUEST_UPDATE",f.UPSERT_CONFIGURATION="UPSERT_CONFIGURATION",f.UPSERT_JOB_RUN="UPSERT_JOB_RUN",f.UPSERT_JOB_RUNS="UPSERT_JOB_RUNS",f.UPSERT_TRANSACTION="UPSERT_TRANSACTION",f.UPSERT_TRANSACTIONS="UPSERT_TRANSACTIONS",f.UPSERT_BUILD_INFO="UPSERT_BUILD_INFO",(d=s||(s={})).FETCH_BUILD_INFO_REQUESTED="FETCH_BUILD_INFO_REQUESTED",d.FETCH_BUILD_INFO_SUCCEEDED="FETCH_BUILD_INFO_SUCCEEDED",d.FETCH_BUILD_INFO_FAILED="FETCH_BUILD_INFO_FAILED"},87013(e,t,n){"use strict";n.d(t,{Y:()=>o,Z:()=>u});var r=n(19084);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){i(e,t,n[t])})}return e}var o={commitSHA:"unknown",version:"unknown"},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o,t=arguments.length>1?arguments[1]:void 0;return t.type===r.Y0.FETCH_BUILD_INFO_SUCCEEDED?a({},t.buildInfo):e};let u=s},34823(e,t,n){"use strict";n.d(t,{N:()=>r});var r=function(e){return e.buildInfo}},73343(e,t,n){"use strict";n.d(t,{r:()=>u});var r=n(19350),i=n(32316),a=n(59114),o=n(5324),s={props:{MuiGrid:{spacing:3*o.default.unit},MuiCardHeader:{titleTypographyProps:{color:"secondary"}}},palette:{action:{hoverOpacity:.3},primary:{light:"#E5F1FF",main:"#3c40c6",contrastText:"#fff"},secondary:{main:"#3d5170"},success:{light:"#e8faf1",main:r.ek.A700,dark:r.ek[700],contrastText:r.y0.white},warning:{light:"#FFFBF1",main:"#fff6b6",contrastText:"#fad27a"},error:{light:"#ffdada",main:"#f44336",dark:"#d32f2f",contrastText:"#fff"},background:{default:"#f5f6f8",appBar:"#3c40c6"},text:{primary:(0,a.darken)(r.BA.A700,.7),secondary:"#818ea3"},listPendingStatus:{background:"#fef7e5",color:"#fecb4c"},listCompletedStatus:{background:"#e9faf2",color:"#4ed495"}},shape:{borderRadius:o.default.unit},overrides:{MuiButton:{root:{borderRadius:o.default.unit/2,textTransform:"none"},sizeLarge:{padding:void 0,fontSize:void 0,paddingTop:o.default.unit,paddingBottom:o.default.unit,paddingLeft:5*o.default.unit,paddingRight:5*o.default.unit}},MuiTableCell:{body:{fontSize:"1rem"},head:{fontSize:"1rem",fontWeight:400}},MuiCardHeader:{root:{borderBottom:"1px solid rgba(0, 0, 0, 0.12)"},action:{marginTop:-2,marginRight:0,"& >*":{marginLeft:2*o.default.unit}},subheader:{marginTop:.5*o.default.unit}}},typography:{useNextVariants:!0,fontFamily:"-apple-system,BlinkMacSystemFont,Roboto,Helvetica,Arial,sans-serif",button:{textTransform:"none",fontSize:"1.2em"},body1:{fontSize:"1.0rem",fontWeight:400,lineHeight:"1.46429em",color:"rgba(0, 0, 0, 0.87)",letterSpacing:-.4},body2:{fontSize:"1.0rem",fontWeight:500,lineHeight:"1.71429em",color:"rgba(0, 0, 0, 0.87)",letterSpacing:-.4},body1Next:{color:"rgb(29, 29, 29)",fontWeight:400,fontSize:"1rem",lineHeight:1.5,letterSpacing:-.4},body2Next:{color:"rgb(29, 29, 29)",fontWeight:400,fontSize:"0.875rem",lineHeight:1.5,letterSpacing:-.4},display1:{color:"#818ea3",fontSize:"2.125rem",fontWeight:400,lineHeight:"1.20588em",letterSpacing:-.4},display2:{color:"#818ea3",fontSize:"2.8125rem",fontWeight:400,lineHeight:"1.13333em",marginLeft:"-.02em",letterSpacing:-.4},display3:{color:"#818ea3",fontSize:"3.5rem",fontWeight:400,lineHeight:"1.30357em",marginLeft:"-.02em",letterSpacing:-.4},display4:{fontSize:14,fontWeightLight:300,fontWeightMedium:500,fontWeightRegular:400,letterSpacing:-.4},h1:{color:"rgb(29, 29, 29)",fontSize:"6rem",fontWeight:300,lineHeight:1},h2:{color:"rgb(29, 29, 29)",fontSize:"3.75rem",fontWeight:300,lineHeight:1},h3:{color:"rgb(29, 29, 29)",fontSize:"3rem",fontWeight:400,lineHeight:1.04},h4:{color:"rgb(29, 29, 29)",fontSize:"2.125rem",fontWeight:400,lineHeight:1.17},h5:{color:"rgb(29, 29, 29)",fontSize:"1.5rem",fontWeight:400,lineHeight:1.33,letterSpacing:-.4},h6:{fontSize:"0.8rem",fontWeight:450,lineHeight:"1.71429em",color:"rgba(0, 0, 0, 0.87)",letterSpacing:-.4},subheading:{color:"rgb(29, 29, 29)",fontSize:"1rem",fontWeight:400,lineHeight:"1.5em",letterSpacing:-.4},subtitle1:{color:"rgb(29, 29, 29)",fontSize:"1rem",fontWeight:400,lineHeight:1.75,letterSpacing:-.4},subtitle2:{color:"rgb(29, 29, 29)",fontSize:"0.875rem",fontWeight:500,lineHeight:1.57,letterSpacing:-.4}},shadows:["none","0px 1px 3px 0px rgba(0, 0, 0, 0.1),0px 1px 1px 0px rgba(0, 0, 0, 0.04),0px 2px 1px -1px rgba(0, 0, 0, 0.02)","0px 1px 5px 0px rgba(0, 0, 0, 0.1),0px 2px 2px 0px rgba(0, 0, 0, 0.04),0px 3px 1px -2px rgba(0, 0, 0, 0.02)","0px 1px 8px 0px rgba(0, 0, 0, 0.1),0px 3px 4px 0px rgba(0, 0, 0, 0.04),0px 3px 3px -2px rgba(0, 0, 0, 0.02)","0px 2px 4px -1px rgba(0, 0, 0, 0.1),0px 4px 5px 0px rgba(0, 0, 0, 0.04),0px 1px 10px 0px rgba(0, 0, 0, 0.02)","0px 3px 5px -1px rgba(0, 0, 0, 0.1),0px 5px 8px 0px rgba(0, 0, 0, 0.04),0px 1px 14px 0px rgba(0, 0, 0, 0.02)","0px 3px 5px -1px rgba(0, 0, 0, 0.1),0px 6px 10px 0px rgba(0, 0, 0, 0.04),0px 1px 18px 0px rgba(0, 0, 0, 0.02)","0px 4px 5px -2px rgba(0, 0, 0, 0.1),0px 7px 10px 1px rgba(0, 0, 0, 0.04),0px 2px 16px 1px rgba(0, 0, 0, 0.02)","0px 5px 5px -3px rgba(0, 0, 0, 0.1),0px 8px 10px 1px rgba(0, 0, 0, 0.04),0px 3px 14px 2px rgba(0, 0, 0, 0.02)","0px 5px 6px -3px rgba(0, 0, 0, 0.1),0px 9px 12px 1px rgba(0, 0, 0, 0.04),0px 3px 16px 2px rgba(0, 0, 0, 0.02)","0px 6px 6px -3px rgba(0, 0, 0, 0.1),0px 10px 14px 1px rgba(0, 0, 0, 0.04),0px 4px 18px 3px rgba(0, 0, 0, 0.02)","0px 6px 7px -4px rgba(0, 0, 0, 0.1),0px 11px 15px 1px rgba(0, 0, 0, 0.04),0px 4px 20px 3px rgba(0, 0, 0, 0.02)","0px 7px 8px -4px rgba(0, 0, 0, 0.1),0px 12px 17px 2px rgba(0, 0, 0, 0.04),0px 5px 22px 4px rgba(0, 0, 0, 0.02)","0px 7px 8px -4px rgba(0, 0, 0, 0.1),0px 13px 19px 2px rgba(0, 0, 0, 0.04),0px 5px 24px 4px rgba(0, 0, 0, 0.02)","0px 7px 9px -4px rgba(0, 0, 0, 0.1),0px 14px 21px 2px rgba(0, 0, 0, 0.04),0px 5px 26px 4px rgba(0, 0, 0, 0.02)","0px 8px 9px -5px rgba(0, 0, 0, 0.1),0px 15px 22px 2px rgba(0, 0, 0, 0.04),0px 6px 28px 5px rgba(0, 0, 0, 0.02)","0px 8px 10px -5px rgba(0, 0, 0, 0.1),0px 16px 24px 2px rgba(0, 0, 0, 0.04),0px 6px 30px 5px rgba(0, 0, 0, 0.02)","0px 8px 11px -5px rgba(0, 0, 0, 0.1),0px 17px 26px 2px rgba(0, 0, 0, 0.04),0px 6px 32px 5px rgba(0, 0, 0, 0.02)","0px 9px 11px -5px rgba(0, 0, 0, 0.1),0px 18px 28px 2px rgba(0, 0, 0, 0.04),0px 7px 34px 6px rgba(0, 0, 0, 0.02)","0px 9px 12px -6px rgba(0, 0, 0, 0.1),0px 19px 29px 2px rgba(0, 0, 0, 0.04),0px 7px 36px 6px rgba(0, 0, 0, 0.02)","0px 10px 13px -6px rgba(0, 0, 0, 0.1),0px 20px 31px 3px rgba(0, 0, 0, 0.04),0px 8px 38px 7px rgba(0, 0, 0, 0.02)","0px 10px 13px -6px rgba(0, 0, 0, 0.1),0px 21px 33px 3px rgba(0, 0, 0, 0.04),0px 8px 40px 7px rgba(0, 0, 0, 0.02)","0px 10px 14px -6px rgba(0, 0, 0, 0.1),0px 22px 35px 3px rgba(0, 0, 0, 0.04),0px 8px 42px 7px rgba(0, 0, 0, 0.02)","0px 11px 14px -7px rgba(0, 0, 0, 0.1),0px 23px 36px 3px rgba(0, 0, 0, 0.04),0px 9px 44px 8px rgba(0, 0, 0, 0.02)","0px 11px 15px -7px rgba(0, 0, 0, 0.1),0px 24px 38px 3px rgba(0, 0, 0, 0.04),0px 9px 46px 8px rgba(0, 0, 0, 0.02)",]},u=(0,i.createMuiTheme)(s)},66289(e,t,n){"use strict";function r(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function i(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function a(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function o(e,t,n){return(o=a()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&f(i,n.prototype),i}).apply(null,arguments)}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}function c(e){return -1!==Function.toString.call(e).indexOf("[native code]")}function l(e,t){return t&&("object"===p(t)||"function"==typeof t)?t:r(e)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,{V0:()=>B,_7:()=>v});var d,h,p=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function b(e){var t="function"==typeof Map?new Map:void 0;return(b=function(e){if(null===e||!c(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return o(e,arguments,s(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),f(n,e)})(e)}function m(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function g(e){var t=m();return function(){var n,r=s(e);if(t){var i=s(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return l(this,n)}}var v=function(e){u(n,e);var t=g(n);function n(e){var r;return i(this,n),(r=t.call(this,"AuthenticationError(".concat(e.statusText,")"))).errors=[{status:e.status,detail:e},],r}return n}(b(Error)),y=function(e){u(n,e);var t=g(n);function n(e){var r,a=e.errors;return i(this,n),(r=t.call(this,"BadRequestError")).errors=a,r}return n}(b(Error)),w=function(e){u(n,e);var t=g(n);function n(e){var r;return i(this,n),(r=t.call(this,"UnprocessableEntityError")).errors=e,r}return n}(b(Error)),_=function(e){u(n,e);var t=g(n);function n(e){var r;return i(this,n),(r=t.call(this,"ServerError")).errors=e,r}return n}(b(Error)),E=function(e){u(n,e);var t=g(n);function n(e){var r,a=e.errors;return i(this,n),(r=t.call(this,"ConflictError")).errors=a,r}return n}(b(Error)),S=function(e){u(n,e);var t=g(n);function n(e){var r;return i(this,n),(r=t.call(this,"UnknownResponseError(".concat(e.statusText,")"))).errors=[{status:e.status,detail:e.statusText},],r}return n}(b(Error));function k(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2e4;return Promise.race([fetch(e,t),new Promise(function(e,t){return setTimeout(function(){return t(Error("timeout"))},n)}),])}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function T(e){if(Array.isArray(e))return e}function M(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(u){s=!0,r=u}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}function O(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function A(e,t){return T(e)||M(e,t)||L(e,t)||O()}function L(e,t){if(e){if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return x(e,t)}}function C(e,t){return e===h.GET?function(){return{method:"GET",credentials:"include"}}:I(e,t)}function I(e,t){return function(n){return{method:e,body:t?n:JSON.stringify(n),credentials:"include",headers:{Accept:"application/json","Content-Type":"application/json"}}}}function D(e,t,n){var r;try{r=new URL(t,e)}catch(i){var a=i.message;throw Error("Error when creating url with path=".concat(t,", base=").concat(e,": ").concat(a))}return n&&Object.entries(n).forEach(function(e){var t=A(e,2),n=t[0],i=t[1];return"string"==typeof i?r.searchParams.append(n,i):void 0!=i?r.searchParams.append(n,i.toString()):void 0}),r}n(80204),(d=h||(h={})).GET="GET",d.POST="POST",d.PATCH="PATCH",d.DELETE="DELETE";var N=n(14779),P=n.n(N);function R(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){n(c);return}s.done?t(u):Promise.resolve(u).then(r,i)}function j(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){R(a,r,i,o,s,"next",e)}function s(e){R(a,r,i,o,s,"throw",e)}o(void 0)})}}function F(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var Y=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},B=function(){function e(t){F(this,e),this.options=t,this.fetchResource=this.methodFactory(h.GET),this.GET=this.methodFactory(h.GET),this.createResource=this.methodFactory(h.POST),this.POST=this.methodFactory(h.POST),this.updateResource=this.methodFactory(h.PATCH),this.PATCH=this.methodFactory(h.PATCH),this.deleteResource=this.methodFactory(h.DELETE),this.DELETE=this.methodFactory(h.DELETE)}return e.prototype.methodFactory=function(e){var t=this;return function(n,r){var i=P().compile(n);return function(a,o){var s,u=o?i(o):n,c=e===h.GET?a:{},l=D(null!==(s=t.options.base)&&void 0!==s?s:location.origin,u,c),f=C(e,r);return k(l.toString(),f(a)).then(function(e){return U(e)})}}},e}();function U(e){return H.apply(this,arguments)}function H(){return(H=j(function(e){var t,n,r;return Y(this,function(i){switch(i.label){case 0:if(204!==e.status)return[3,1];return[2,t={}];case 1:if(!(e.status>=200&&e.status<300))return[3,2];return[2,e.json()];case 2:if(400!==e.status)return[3,3];return[2,e.json().then(function(e){throw new y(e)})];case 3:if(401!==e.status)return[3,4];throw new v(e);case 4:if(422!==e.status)return[3,6];return[4,$(e)];case 5:throw n=i.sent(),new w(n);case 6:if(409!==e.status)return[3,7];return[2,e.json().then(function(e){throw new E(e)})];case 7:if(!(e.status>=500))return[3,9];return[4,$(e)];case 8:throw r=i.sent(),new _(r);case 9:throw new S(e);case 10:return[2]}})})).apply(this,arguments)}function $(e){return z.apply(this,arguments)}function z(){return(z=j(function(e){return Y(this,function(t){return[2,e.json().then(function(t){return t.errors?t.errors.map(function(t){return{status:e.status,detail:t.detail}}):G(e)}).catch(function(){return G(e)})]})})).apply(this,arguments)}function G(e){return[{status:e.status,detail:e.statusText},]}},50109(e,t,n){"use strict";n.d(t,{LK:()=>o,U2:()=>i,eT:()=>s,t8:()=>a});var r=n(12795);function i(e){return r.ZP.getItem("chainlink.".concat(e))}function a(e,t){r.ZP.setItem("chainlink.".concat(e),t)}function o(e){var t=i(e),n={};if(t)try{return JSON.parse(t)}catch(r){}return n}function s(e,t){a(e,JSON.stringify(t))}},9541(e,t,n){"use strict";n.d(t,{Ks:()=>u,Tp:()=>a,iR:()=>o,pm:()=>s});var r=n(50109),i="persistURL";function a(){return r.U2(i)||""}function o(e){r.t8(i,e)}function s(){return r.LK("authentication")}function u(e){r.eT("authentication",e)}},67121(e,t,n){"use strict";function r(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}n.r(t),n.d(t,{default:()=>o}),e=n.hmd(e),i="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:e;var i,a=r(i);let o=a},2177(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=!0,i="Invariant failed";function a(e,t){if(!e){if(r)throw Error(i);throw Error(i+": "+(t||""))}}let o=a},11742(e){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach(function(t){e.addRange(t)}),t&&t.focus()}}},94633(e){function t(e,t){var n=e.length,a=Array(n),o={},s=n,u=r(t),c=i(e);for(t.forEach(function(e){if(!c.has(e[0])||!c.has(e[1]))throw Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)o[s]||l(e[s],s,new Set);return a;function l(e,t,r){if(r.has(e)){var i;try{i=", node was:"+JSON.stringify(e)}catch(s){i=""}throw Error("Cyclic dependency"+i)}if(!c.has(e))throw Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(e));if(!o[t]){o[t]=!0;var f=u.get(e)||new Set;if(t=(f=Array.from(f)).length){r.add(e);do{var d=f[--t];l(d,c.get(d),r)}while(t)r.delete(e)}a[--n]=e}}}function n(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var i=e[n];t.add(i[0]),t.add(i[1])}return Array.from(t)}function r(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}function i(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}e.exports=function(e){return t(n(e),e)},e.exports.array=t},70655(e,t,n){"use strict";n.d(t,{Jh:()=>u,ZT:()=>i,_T:()=>o,ev:()=>c,mG:()=>s,pi:()=>a});var r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function o(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function s(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){e.done?n(e.value):i(e.value).then(o,s)}u((r=r.apply(e,t||[])).next())})}function u(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}function c(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}},25869(e,t,n){"use strict";function r(e,t){return t=t||{},new Promise(function(n,r){var i=new XMLHttpRequest,a=[],o=[],s={},u=function(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:u,headers:{keys:function(){return a},entries:function(){return o},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.toLowerCase() in s}}}};for(var c in i.open(t.method||"get",e,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(e,t,n){a.push(t=t.toLowerCase()),o.push([t,n]),s[t]=s[t]?s[t]+","+n:n}),n(u())},i.onerror=r,i.withCredentials="include"==t.credentials,t.headers)i.setRequestHeader(c,t.headers[c]);i.send(t.body||null)})}n.r(t),n.d(t,{default:()=>r})},94927(e,t,n){function r(e,t){if(i("noDeprecation"))return e;var n=!1;function r(){if(!n){if(i("throwDeprecation"))throw Error(t);i("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}return r}function i(e){try{if(!n.g.localStorage)return!1}catch(t){return!1}var r=n.g.localStorage[e];return null!=r&&"true"===String(r).toLowerCase()}e.exports=r},42473(e){"use strict";var t=function(){};e.exports=t},84763(e){e.exports=Worker},47529(e){e.exports=n;var t=Object.prototype.hasOwnProperty;function n(){for(var e={},n=0;n<arguments.length;n++){var r=arguments[n];for(var i in r)t.call(r,i)&&(e[i]=r[i])}return e}},52361(){},94616(){},73897(e){function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},63405(e,t,n){var r=n(73897);function i(e){if(Array.isArray(e))return r(e)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},66115(e){function t(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},56690(e){function t(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},89728(e){function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function n(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},38416(e){function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},10434(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(this,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},73808(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},61655(e,t,n){var r=n(6015);function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},7867(e,t,n){var r=n(6015);function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},64836(e){function t(e){return e&&e.__esModule?e:{default:e}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},75263(e,t,n){var r=n(18698).default;function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}function a(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var a={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var u=o?Object.getOwnPropertyDescriptor(e,s):null;u&&(u.get||u.set)?Object.defineProperty(a,s,u):a[s]=e[s]}return a.default=e,n&&n.set(e,a),a}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports},79498(e){function t(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},42281(e){function t(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},70215(e,t,n){var r=n(7071);function i(e,t){if(null==e)return{};var n,i,a=r(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},7071(e){function t(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},94993(e,t,n){var r=n(18698).default,i=n(66115);function a(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return i(e)}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports},6015(e){function t(n,r){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},861(e,t,n){var r=n(63405),i=n(79498),a=n(86116),o=n(42281);function s(e){return r(e)||i(e)||a(e)||o()}e.exports=s,e.exports.__esModule=!0,e.exports.default=e.exports},18698(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},86116(e,t,n){var r=n(73897);function i(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},1644(e,t,n){"use strict";var r,i;function a(e){return!!e&&e<7}n.d(t,{I:()=>r,O:()=>a}),(i=r||(r={}))[i.loading=1]="loading",i[i.setVariables=2]="setVariables",i[i.fetchMore=3]="fetchMore",i[i.refetch=4]="refetch",i[i.poll=6]="poll",i[i.ready=7]="ready",i[i.error=8]="error"},30990(e,t,n){"use strict";n.d(t,{MS:()=>s,YG:()=>a,cA:()=>c,ls:()=>o});var r=n(70655);n(83952);var i=n(13154),a=Symbol();function o(e){return!!e.extensions&&Array.isArray(e.extensions[a])}function s(e){return e.hasOwnProperty("graphQLErrors")}var u=function(e){var t=(0,r.ev)((0,r.ev)((0,r.ev)([],e.graphQLErrors,!0),e.clientErrors,!0),e.protocolErrors,!0);return e.networkError&&t.push(e.networkError),t.map(function(e){return(0,i.s)(e)&&e.message||"Error message not found."}).join("\n")},c=function(e){function t(n){var r=n.graphQLErrors,i=n.protocolErrors,a=n.clientErrors,o=n.networkError,s=n.errorMessage,c=n.extraInfo,l=e.call(this,s)||this;return l.name="ApolloError",l.graphQLErrors=r||[],l.protocolErrors=i||[],l.clientErrors=a||[],l.networkError=o||null,l.message=s||u(l),l.extraInfo=c,l.__proto__=t.prototype,l}return(0,r.ZT)(t,e),t}(Error)},85317(e,t,n){"use strict";n.d(t,{K:()=>a});var r=n(67294),i=n(30320).aS?Symbol.for("__APOLLO_CONTEXT__"):"__APOLLO_CONTEXT__";function a(){var e=r.createContext[i];return e||(Object.defineProperty(r.createContext,i,{value:e=r.createContext({}),enumerable:!1,writable:!1,configurable:!0}),e.displayName="ApolloContext"),e}},21436(e,t,n){"use strict";n.d(t,{O:()=>i,k:()=>r});var r=Array.isArray;function i(e){return Array.isArray(e)&&e.length>0}},30320(e,t,n){"use strict";n.d(t,{DN:()=>s,JC:()=>l,aS:()=>o,mr:()=>i,sy:()=>a});var r=n(83952),i="function"==typeof WeakMap&&"ReactNative"!==(0,r.wY)(function(){return navigator.product}),a="function"==typeof WeakSet,o="function"==typeof Symbol&&"function"==typeof Symbol.for,s=o&&Symbol.asyncIterator,u="function"==typeof(0,r.wY)(function(){return window.document.createElement}),c=(0,r.wY)(function(){return navigator.userAgent.indexOf("jsdom")>=0})||!1,l=u&&!c},53712(e,t,n){"use strict";function r(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Object.create(null);return e.forEach(function(e){e&&Object.keys(e).forEach(function(t){var r=e[t];void 0!==r&&(n[t]=r)})}),n}n.d(t,{o:()=>r})},10542(e,t,n){"use strict";n.d(t,{J:()=>o}),n(83952);var r=n(13154);function i(e){var t=new Set([e]);return t.forEach(function(e){(0,r.s)(e)&&a(e)===e&&Object.getOwnPropertyNames(e).forEach(function(n){(0,r.s)(e[n])&&t.add(e[n])})}),e}function a(e){if(__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(t){if(t instanceof TypeError)return null;throw t}return e}function o(e){return __DEV__&&i(e),e}},14012(e,t,n){"use strict";n.d(t,{J:()=>a});var r=n(70655),i=n(53712);function a(e,t){return(0,i.o)(e,t,t.variables&&{variables:(0,r.pi)((0,r.pi)({},e&&e.variables),t.variables)})}},13154(e,t,n){"use strict";function r(e){return null!==e&&"object"==typeof e}n.d(t,{s:()=>r})},83952(e,t,n){"use strict";n.d(t,{ej:()=>u,kG:()=>c,wY:()=>h});var r,i=n(70655),a="Invariant Violation",o=Object.setPrototypeOf,s=void 0===o?function(e,t){return e.__proto__=t,e}:o,u=function(e){function t(n){void 0===n&&(n=a);var r=e.call(this,"number"==typeof n?a+": "+n+" (see https://github.com/apollographql/invariant-packages)":n)||this;return r.framesToPop=1,r.name=a,s(r,t.prototype),r}return(0,i.ZT)(t,e),t}(Error);function c(e,t){if(!e)throw new u(t)}var l=["debug","log","warn","error","silent"],f=l.indexOf("log");function d(e){return function(){if(l.indexOf(e)>=f)return(console[e]||console.log).apply(console,arguments)}}function h(e){try{return e()}catch(t){}}(r=c||(c={})).debug=d("debug"),r.log=d("log"),r.warn=d("warn"),r.error=d("error");let p=h(function(){return globalThis})||h(function(){return window})||h(function(){return self})||h(function(){return global})||h(function(){return h.constructor("return this")()});var b="__",m=[b,b].join("DEV");function g(){try{return Boolean(__DEV__)}catch(e){return Object.defineProperty(p,m,{value:"production"!==h(function(){return"production"}),enumerable:!1,configurable:!0,writable:!0}),p[m]}}let v=g();function y(e){try{return e()}catch(t){}}var w=y(function(){return globalThis})||y(function(){return window})||y(function(){return self})||y(function(){return global})||y(function(){return y.constructor("return this")()}),_=!1;function E(){!w||y(function(){return"production"})||y(function(){return process})||(Object.defineProperty(w,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),_=!0)}function S(){_&&(delete w.process,_=!1)}E();var k=n(10143);function x(){return k.H,S()}function T(){__DEV__?c("boolean"==typeof v,v):c("boolean"==typeof v,39)}x(),T()},4942(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{Z:()=>r})},87462(e,t,n){"use strict";function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,{Z:()=>r})},51721(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,{Z:()=>i})},63366(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}n.d(t,{Z:()=>r})},25821(e,t,n){"use strict";n.d(t,{Z:()=>s});var r=n(45695);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a=10,o=2;function s(e){return u(e,[])}function u(e,t){switch(i(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":if(null===e)return"null";return c(e,t);default:return String(e)}}function c(e,t){if(-1!==t.indexOf(e))return"[Circular]";var n=[].concat(t,[e]),r=d(e);if(void 0!==r){var i=r.call(e);if(i!==e)return"string"==typeof i?i:u(i,n)}else if(Array.isArray(e))return f(e,n);return l(e,n)}function l(e,t){var n=Object.keys(e);return 0===n.length?"{}":t.length>o?"["+h(e)+"]":"{ "+n.map(function(n){var r=u(e[n],t);return n+": "+r}).join(", ")+" }"}function f(e,t){if(0===e.length)return"[]";if(t.length>o)return"[Array]";for(var n=Math.min(a,e.length),r=e.length-n,i=[],s=0;s<n;++s)i.push(u(e[s],t));return 1===r?i.push("... 1 more item"):r>1&&i.push("... ".concat(r," more items")),"["+i.join(", ")+"]"}function d(e){var t=e[String(r.Z)];return"function"==typeof t?t:"function"==typeof e.inspect?e.inspect:void 0}function h(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return t}},45695(e,t,n){"use strict";n.d(t,{Z:()=>i});var r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;let i=r},25217(e,t,n){"use strict";function r(e,t){if(!Boolean(e))throw Error(null!=t?t:"Unexpected invariant triggered.")}n.d(t,{Ye:()=>o,WU:()=>s,UG:()=>u});var i=n(45695);function a(e){var t=e.prototype.toJSON;"function"==typeof t||r(0),e.prototype.inspect=t,i.Z&&(e.prototype[i.Z]=t)}var o=function(){function e(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();a(o);var s=function(){function e(e,t,n,r,i,a,o){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=o,this.prev=a,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();function u(e){return null!=e&&"string"==typeof e.kind}a(s)},87392(e,t,n){"use strict";function r(e){var t=e.split(/\r\n|[\n\r]/g),n=a(e);if(0!==n)for(var r=1;r<t.length;r++)t[r]=t[r].slice(n);for(var o=0;o<t.length&&i(t[o]);)++o;for(var s=t.length;s>o&&i(t[s-1]);)--s;return t.slice(o,s).join("\n")}function i(e){for(var t=0;t<e.length;++t)if(" "!==e[t]&&" "!==e[t])return!1;return!0}function a(e){for(var t,n=!0,r=!0,i=0,a=null,o=0;o<e.length;++o)switch(e.charCodeAt(o)){case 13:10===e.charCodeAt(o+1)&&++o;case 10:n=!1,r=!0,i=0;break;case 9:case 32:++i;break;default:r&&!n&&(null===a||i<a)&&(a=i),r=!1}return null!==(t=a)&&void 0!==t?t:0}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===e.indexOf("\n"),i=" "===e[0]||" "===e[0],a='"'===e[e.length-1],o="\\"===e[e.length-1],s=!r||a||o||n,u="";return s&&!(r&&i)&&(u+="\n"+t),u+=t?e.replace(/\n/g,"\n"+t):e,s&&(u+="\n"),'"""'+u.replace(/"""/g,'\\"""')+'"""'}n.d(t,{LZ:()=>o,W7:()=>r})},97359(e,t,n){"use strict";n.d(t,{h:()=>r});var r=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"})},10143(e,t,n){"use strict";n.d(t,{H:()=>c,T:()=>l});var r=n(99763),i=n(25821);function a(e,t){if(!Boolean(e))throw Error(t)}let o=function(e,t){return e instanceof t};function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),e}var c=function(){function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof e||a(0,"Body must be a string. Received: ".concat((0,i.Z)(e),".")),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||a(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||a(0,"column in locationOffset is 1-indexed and must be positive.")}return u(e,[{key:r.YF,get:function(){return"Source"}}]),e}();function l(e){return o(e,c)}},99763(e,t,n){"use strict";n.d(t,{YF:()=>r});var r="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag"},37452(e){"use strict";e.exports=JSON.parse('{"AElig":"\xc6","AMP":"&","Aacute":"\xc1","Acirc":"\xc2","Agrave":"\xc0","Aring":"\xc5","Atilde":"\xc3","Auml":"\xc4","COPY":"\xa9","Ccedil":"\xc7","ETH":"\xd0","Eacute":"\xc9","Ecirc":"\xca","Egrave":"\xc8","Euml":"\xcb","GT":">","Iacute":"\xcd","Icirc":"\xce","Igrave":"\xcc","Iuml":"\xcf","LT":"<","Ntilde":"\xd1","Oacute":"\xd3","Ocirc":"\xd4","Ograve":"\xd2","Oslash":"\xd8","Otilde":"\xd5","Ouml":"\xd6","QUOT":"\\"","REG":"\xae","THORN":"\xde","Uacute":"\xda","Ucirc":"\xdb","Ugrave":"\xd9","Uuml":"\xdc","Yacute":"\xdd","aacute":"\xe1","acirc":"\xe2","acute":"\xb4","aelig":"\xe6","agrave":"\xe0","amp":"&","aring":"\xe5","atilde":"\xe3","auml":"\xe4","brvbar":"\xa6","ccedil":"\xe7","cedil":"\xb8","cent":"\xa2","copy":"\xa9","curren":"\xa4","deg":"\xb0","divide":"\xf7","eacute":"\xe9","ecirc":"\xea","egrave":"\xe8","eth":"\xf0","euml":"\xeb","frac12":"\xbd","frac14":"\xbc","frac34":"\xbe","gt":">","iacute":"\xed","icirc":"\xee","iexcl":"\xa1","igrave":"\xec","iquest":"\xbf","iuml":"\xef","laquo":"\xab","lt":"<","macr":"\xaf","micro":"\xb5","middot":"\xb7","nbsp":"\xa0","not":"\xac","ntilde":"\xf1","oacute":"\xf3","ocirc":"\xf4","ograve":"\xf2","ordf":"\xaa","ordm":"\xba","oslash":"\xf8","otilde":"\xf5","ouml":"\xf6","para":"\xb6","plusmn":"\xb1","pound":"\xa3","quot":"\\"","raquo":"\xbb","reg":"\xae","sect":"\xa7","shy":"\xad","sup1":"\xb9","sup2":"\xb2","sup3":"\xb3","szlig":"\xdf","thorn":"\xfe","times":"\xd7","uacute":"\xfa","ucirc":"\xfb","ugrave":"\xf9","uml":"\xa8","uuml":"\xfc","yacute":"\xfd","yen":"\xa5","yuml":"\xff"}')},93580(e){"use strict";e.exports=JSON.parse('{"0":"�","128":"€","130":"‚","131":"ƒ","132":"„","133":"…","134":"†","135":"‡","136":"ˆ","137":"‰","138":"Š","139":"‹","140":"Œ","142":"Ž","145":"‘","146":"’","147":"“","148":"”","149":"•","150":"–","151":"—","152":"˜","153":"™","154":"š","155":"›","156":"œ","158":"ž","159":"Ÿ"}')},67946(e){"use strict";e.exports=JSON.parse('{"locale":"en","long":{"year":{"previous":"last year","current":"this year","next":"next year","past":{"one":"{0} year ago","other":"{0} years ago"},"future":{"one":"in {0} year","other":"in {0} years"}},"quarter":{"previous":"last quarter","current":"this quarter","next":"next quarter","past":{"one":"{0} quarter ago","other":"{0} quarters ago"},"future":{"one":"in {0} quarter","other":"in {0} quarters"}},"month":{"previous":"last month","current":"this month","next":"next month","past":{"one":"{0} month ago","other":"{0} months ago"},"future":{"one":"in {0} month","other":"in {0} months"}},"week":{"previous":"last week","current":"this week","next":"next week","past":{"one":"{0} week ago","other":"{0} weeks ago"},"future":{"one":"in {0} week","other":"in {0} weeks"}},"day":{"previous":"yesterday","current":"today","next":"tomorrow","past":{"one":"{0} day ago","other":"{0} days ago"},"future":{"one":"in {0} day","other":"in {0} days"}},"hour":{"current":"this hour","past":{"one":"{0} hour ago","other":"{0} hours ago"},"future":{"one":"in {0} hour","other":"in {0} hours"}},"minute":{"current":"this minute","past":{"one":"{0} minute ago","other":"{0} minutes ago"},"future":{"one":"in {0} minute","other":"in {0} minutes"}},"second":{"current":"now","past":{"one":"{0} second ago","other":"{0} seconds ago"},"future":{"one":"in {0} second","other":"in {0} seconds"}}},"short":{"year":{"previous":"last yr.","current":"this yr.","next":"next yr.","past":"{0} yr. ago","future":"in {0} yr."},"quarter":{"previous":"last qtr.","current":"this qtr.","next":"next qtr.","past":{"one":"{0} qtr. ago","other":"{0} qtrs. ago"},"future":{"one":"in {0} qtr.","other":"in {0} qtrs."}},"month":{"previous":"last mo.","current":"this mo.","next":"next mo.","past":"{0} mo. ago","future":"in {0} mo."},"week":{"previous":"last wk.","current":"this wk.","next":"next wk.","past":"{0} wk. ago","future":"in {0} wk."},"day":{"previous":"yesterday","current":"today","next":"tomorrow","past":{"one":"{0} day ago","other":"{0} days ago"},"future":{"one":"in {0} day","other":"in {0} days"}},"hour":{"current":"this hour","past":"{0} hr. ago","future":"in {0} hr."},"minute":{"current":"this minute","past":"{0} min. ago","future":"in {0} min."},"second":{"current":"now","past":"{0} sec. ago","future":"in {0} sec."}},"narrow":{"year":{"previous":"last yr.","current":"this yr.","next":"next yr.","past":"{0} yr. ago","future":"in {0} yr."},"quarter":{"previous":"last qtr.","current":"this qtr.","next":"next qtr.","past":{"one":"{0} qtr. ago","other":"{0} qtrs. ago"},"future":{"one":"in {0} qtr.","other":"in {0} qtrs."}},"month":{"previous":"last mo.","current":"this mo.","next":"next mo.","past":"{0} mo. ago","future":"in {0} mo."},"week":{"previous":"last wk.","current":"this wk.","next":"next wk.","past":"{0} wk. ago","future":"in {0} wk."},"day":{"previous":"yesterday","current":"today","next":"tomorrow","past":{"one":"{0} day ago","other":"{0} days ago"},"future":{"one":"in {0} day","other":"in {0} days"}},"hour":{"current":"this hour","past":"{0} hr. ago","future":"in {0} hr."},"minute":{"current":"this minute","past":"{0} min. ago","future":"in {0} min."},"second":{"current":"now","past":"{0} sec. ago","future":"in {0} sec."}},"now":{"now":{"current":"now","future":"in a moment","past":"just now"}},"mini":{"year":"{0}yr","month":"{0}mo","week":"{0}wk","day":"{0}d","hour":"{0}h","minute":"{0}m","second":"{0}s","now":"now"},"short-time":{"year":"{0} yr.","month":"{0} mo.","week":"{0} wk.","day":{"one":"{0} day","other":"{0} days"},"hour":"{0} hr.","minute":"{0} min.","second":"{0} sec."},"long-time":{"year":{"one":"{0} year","other":"{0} years"},"month":{"one":"{0} month","other":"{0} months"},"week":{"one":"{0} week","other":"{0} weeks"},"day":{"one":"{0} day","other":"{0} days"},"hour":{"one":"{0} hour","other":"{0} hours"},"minute":{"one":"{0} minute","other":"{0} minutes"},"second":{"one":"{0} second","other":"{0} seconds"}}}')}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(n.exports,n,n.exports,__webpack_require__),n.loaded=!0,n.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;__webpack_require__.t=function(n,r){if(1&r&&(n=this(n)),8&r||"object"==typeof n&&n&&(4&r&&n.__esModule||16&r&&"function"==typeof n.then))return n;var i=Object.create(null);__webpack_require__.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var o=2&r&&n;"object"==typeof o&&!~e.indexOf(o);o=t(o))Object.getOwnPropertyNames(o).forEach(e=>a[e]=()=>n[e]);return a.default=()=>n,__webpack_require__.d(i,a),i}})(),__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set(){throw Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),__webpack_require__.p="/assets/",__webpack_require__.nc=void 0;var __webpack_exports__={};(()=>{"use strict";var e,t,n,r,i=__webpack_require__(32316),a=__webpack_require__(8126),o=__webpack_require__(5690),s=__webpack_require__(30381),u=__webpack_require__.n(s),c=__webpack_require__(67294),l=__webpack_require__(73935),f=__webpack_require__.n(l),d=__webpack_require__(57209),h=__webpack_require__(37703),p=__webpack_require__(97779),b=__webpack_require__(28500);function m(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(i){return"function"==typeof i?i(n,r,e):t(i)}}}}var g=m();g.withExtraArgument=m;let v=g;var y=__webpack_require__(76489);function w(e){return function(t){return function(n){return function(r){n(r);var i=e||document&&document.cookie||"",a=t.getState();if("MATCH_ROUTE"===r.type&&"/signin"!==a.notifications.currentUrl){var o=(0,y.Q)(i);if(o.explorer)try{var s=JSON.parse(o.explorer);if("error"===s.status){var u=_(s.url);n({type:"NOTIFY_ERROR_MSG",msg:u})}}catch(c){n({type:"NOTIFY_ERROR_MSG",msg:"Invalid explorer status"})}}}}}}function _(e){var t="Can't connect to explorer: ".concat(e);return e.match(/^wss?:.+/)?t:"".concat(t,". You must use a websocket.")}var E=__webpack_require__(16353);function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function k(e){if(Array.isArray(e))return S(e)}function x(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function T(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function M(e){return k(e)||x(e)||O(e)||T()}function O(e,t){if(e){if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S(e,t)}}var A=[v,w(),],L=(0,b.Uo)({});function C(e,t){return(0,p.MT)(e,L(p.md.apply(void 0,M(M(t)))))}var I=function(){return C(E.ZP,A)};let D=I;var N=__webpack_require__(93379),P=__webpack_require__.n(N),R=__webpack_require__(51424),j=__webpack_require__.n(R),F={};F.insert="head",F.singleton=!1;var Y=P()(j(),F);j().locals;var B=__webpack_require__(73727),U=__webpack_require__(5977),H=__webpack_require__(63099),$=__webpack_require__(78577),z=__webpack_require__(9409),G=function(){var e=(0,E.rH)(function(e){return e.redirect.to});return c.createElement(B.VK,null,c.createElement(H.Z,null),c.createElement(U.rs,null,c.createElement(U.AW,{exact:!0,path:"/signin"},c.createElement(z.ZP,null)),e&&c.createElement(U.l_,{to:e}),c.createElement(U.AW,{component:$.Z})))};let W=G;var K=__webpack_require__(9541),V="/signin",q=D();q.subscribe(function(){var e=q.getState().notifications.currentUrl;e&&e!==V&&(0,K.iR)(e)});var Z=function(){return c.createElement(h.zt,{store:q},c.createElement(W,null))};let X=Z;var J=__webpack_require__(73343),Q=__webpack_require__(83952),ee=__webpack_require__(85317),et=function(e){var t=e.client,n=e.children,r=(0,ee.K)();return c.createElement(r.Consumer,null,function(e){return void 0===e&&(e={}),t&&e.client!==t&&(e=Object.assign({},e,{client:t})),__DEV__?(0,Q.kG)(e.client,'ApolloProvider was not passed a client instance. Make sure you pass in your client via the "client" prop.'):(0,Q.kG)(e.client,29),c.createElement(r.Provider,{value:e},n)})},en=__webpack_require__(70655);function er(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=ei(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ei(e,t){if(e){if("string"==typeof e)return ea(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ea(e,t)}}function ea(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function eo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function es(e,t,n){return t&&eo(e.prototype,t),n&&eo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var eu=function(){return"function"==typeof Symbol},ec=function(e){return eu()&&Boolean(Symbol[e])},el=function(e){return ec(e)?Symbol[e]:"@@"+e};eu()&&!ec("observable")&&(Symbol.observable=Symbol("observable"));var ef=el("iterator"),ed=el("observable"),eh=el("species");function ep(e,t){var n=e[t];if(null!=n){if("function"!=typeof n)throw TypeError(n+" is not a function");return n}}function eb(e){var t=e.constructor;return void 0!==t&&null===(t=t[eh])&&(t=void 0),void 0!==t?t:eT}function em(e){return e instanceof eT}function eg(e){eg.log?eg.log(e):setTimeout(function(){throw e})}function ev(e){Promise.resolve().then(function(){try{e()}catch(t){eg(t)}})}function ey(e){var t=e._cleanup;if(void 0!==t){if(e._cleanup=void 0,!t)return;try{if("function"==typeof t)t();else{var n=ep(t,"unsubscribe");n&&n.call(t)}}catch(r){eg(r)}}}function ew(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function e_(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var n=0;n<t.length&&(eE(e,t[n].type,t[n].value),"closed"!==e._state);++n);}}function eE(e,t,n){e._state="running";var r=e._observer;try{var i=ep(r,t);switch(t){case"next":i&&i.call(r,n);break;case"error":if(ew(e),i)i.call(r,n);else throw n;break;case"complete":ew(e),i&&i.call(r)}}catch(a){eg(a)}"closed"===e._state?ey(e):"running"===e._state&&(e._state="ready")}function eS(e,t,n){if("closed"!==e._state){if("buffering"===e._state){e._queue.push({type:t,value:n});return}if("ready"!==e._state){e._state="buffering",e._queue=[{type:t,value:n}],ev(function(){return e_(e)});return}eE(e,t,n)}}var ek=function(){function e(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";var n=new ex(this);try{this._cleanup=t.call(void 0,n)}catch(r){n.error(r)}"initializing"===this._state&&(this._state="ready")}return e.prototype.unsubscribe=function(){"closed"!==this._state&&(ew(this),ey(this))},es(e,[{key:"closed",get:function(){return"closed"===this._state}}]),e}(),ex=function(){function e(e){this._subscription=e}var t=e.prototype;return t.next=function(e){eS(this._subscription,"next",e)},t.error=function(e){eS(this._subscription,"error",e)},t.complete=function(){eS(this._subscription,"complete")},es(e,[{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),eT=function(){function e(t){if(!(this instanceof e))throw TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw TypeError("Observable initializer must be a function");this._subscriber=t}var t=e.prototype;return t.subscribe=function(e){return("object"!=typeof e||null===e)&&(e={next:e,error:arguments[1],complete:arguments[2]}),new ek(e,this._subscriber)},t.forEach=function(e){var t=this;return new Promise(function(n,r){if("function"!=typeof e){r(TypeError(e+" is not a function"));return}function i(){a.unsubscribe(),n()}var a=t.subscribe({next:function(t){try{e(t,i)}catch(n){r(n),a.unsubscribe()}},error:r,complete:n})})},t.map=function(e){var t=this;if("function"!=typeof e)throw TypeError(e+" is not a function");return new(eb(this))(function(n){return t.subscribe({next:function(t){try{t=e(t)}catch(r){return n.error(r)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})})},t.filter=function(e){var t=this;if("function"!=typeof e)throw TypeError(e+" is not a function");return new(eb(this))(function(n){return t.subscribe({next:function(t){try{if(!e(t))return}catch(r){return n.error(r)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})})},t.reduce=function(e){var t=this;if("function"!=typeof e)throw TypeError(e+" is not a function");var n=eb(this),r=arguments.length>1,i=!1,a=arguments[1],o=a;return new n(function(n){return t.subscribe({next:function(t){var a=!i;if(i=!0,!a||r)try{o=e(o,t)}catch(s){return n.error(s)}else o=t},error:function(e){n.error(e)},complete:function(){if(!i&&!r)return n.error(TypeError("Cannot reduce an empty sequence"));n.next(o),n.complete()}})})},t.concat=function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=eb(this);return new i(function(t){var r,a=0;function o(e){r=e.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){a===n.length?(r=void 0,t.complete()):o(i.from(n[a++]))}})}return o(e),function(){r&&(r.unsubscribe(),r=void 0)}})},t.flatMap=function(e){var t=this;if("function"!=typeof e)throw TypeError(e+" is not a function");var n=eb(this);return new n(function(r){var i=[],a=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(a){return r.error(a)}var s=n.from(t).subscribe({next:function(e){r.next(e)},error:function(e){r.error(e)},complete:function(){var e=i.indexOf(s);e>=0&&i.splice(e,1),o()}});i.push(s)},error:function(e){r.error(e)},complete:function(){o()}});function o(){a.closed&&0===i.length&&r.complete()}return function(){i.forEach(function(e){return e.unsubscribe()}),a.unsubscribe()}})},t[ed]=function(){return this},e.from=function(t){var n="function"==typeof this?this:e;if(null==t)throw TypeError(t+" is not an object");var r=ep(t,ed);if(r){var i=r.call(t);if(Object(i)!==i)throw TypeError(i+" is not an object");return em(i)&&i.constructor===n?i:new n(function(e){return i.subscribe(e)})}if(ec("iterator")&&(r=ep(t,ef)))return new n(function(e){ev(function(){if(!e.closed){for(var n,i=er(r.call(t));!(n=i()).done;){var a=n.value;if(e.next(a),e.closed)return}e.complete()}})});if(Array.isArray(t))return new n(function(e){ev(function(){if(!e.closed){for(var n=0;n<t.length;++n)if(e.next(t[n]),e.closed)return;e.complete()}})});throw TypeError(t+" is not observable")},e.of=function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return new("function"==typeof this?this:e)(function(e){ev(function(){if(!e.closed){for(var t=0;t<n.length;++t)if(e.next(n[t]),e.closed)return;e.complete()}})})},es(e,null,[{key:eh,get:function(){return this}}]),e}();function eM(e,t){var n=(0,en.pi)({},e),r=function(){return(0,en.pi)({},n)};return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){n="function"==typeof e?(0,en.pi)((0,en.pi)({},n),e(n)):(0,en.pi)((0,en.pi)({},n),e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:r}),t}eu()&&Object.defineProperty(eT,Symbol("extensions"),{value:{symbol:ed,hostReportError:eg},configurable:!0});var eO=__webpack_require__(13154);function eA(e,t){var n=t,r=[];return e.definitions.forEach(function(e){if("OperationDefinition"===e.kind)throw __DEV__?new Q.ej("Found a ".concat(e.operation," operation").concat(e.name?" named '".concat(e.name.value,"'"):"",". ")+"No operations are allowed when using a fragment as a query. Only fragments are allowed."):new Q.ej(44);"FragmentDefinition"===e.kind&&r.push(e)}),void 0===n&&(__DEV__?(0,Q.kG)(1===r.length,"Found ".concat(r.length," fragments. `fragmentName` must be provided when there is not exactly 1 fragment.")):(0,Q.kG)(1===r.length,45),n=r[0].name.value),(0,en.pi)((0,en.pi)({},e),{definitions:(0,en.ev)([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:n}},]}}],e.definitions,!0)})}function eL(e){void 0===e&&(e=[]);var t={};return e.forEach(function(e){t[e.name.value]=e}),t}function eC(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":var n=e.name.value;if("function"==typeof t)return t(n);var r=t&&t[n];return __DEV__?(0,Q.kG)(r,"No fragment named ".concat(n)):(0,Q.kG)(r,46),r||null;default:return null}}function eI(e){return{__ref:String(e)}}function eD(e){return Boolean(e&&"object"==typeof e&&"string"==typeof e.__ref)}function eN(e){return(0,eO.s)(e)&&"Document"===e.kind&&Array.isArray(e.definitions)}function eP(e){return"StringValue"===e.kind}function eR(e){return"BooleanValue"===e.kind}function ej(e){return"IntValue"===e.kind}function eF(e){return"FloatValue"===e.kind}function eY(e){return"Variable"===e.kind}function eB(e){return"ObjectValue"===e.kind}function eU(e){return"ListValue"===e.kind}function eH(e){return"EnumValue"===e.kind}function e$(e){return"NullValue"===e.kind}function ez(e,t,n,r){if(ej(n)||eF(n))e[t.value]=Number(n.value);else if(eR(n)||eP(n))e[t.value]=n.value;else if(eB(n)){var i={};n.fields.map(function(e){return ez(i,e.name,e.value,r)}),e[t.value]=i}else if(eY(n)){var a=(r||{})[n.name.value];e[t.value]=a}else if(eU(n))e[t.value]=n.values.map(function(e){var n={};return ez(n,t,e,r),n[t.value]});else if(eH(n))e[t.value]=n.value;else if(e$(n))e[t.value]=null;else throw __DEV__?new Q.ej('The inline argument "'.concat(t.value,'" of kind "').concat(n.kind,'"')+"is not supported. Use variables instead of inline arguments to overcome this limitation."):new Q.ej(55)}function eG(e,t){var n=null;e.directives&&(n={},e.directives.forEach(function(e){n[e.name.value]={},e.arguments&&e.arguments.forEach(function(r){var i=r.name,a=r.value;return ez(n[e.name.value],i,a,t)})}));var r=null;return e.arguments&&e.arguments.length&&(r={},e.arguments.forEach(function(e){var n;return ez(r,e.name,e.value,t)})),eK(e.name.value,r,n)}var eW=["connection","include","skip","client","rest","export",],eK=Object.assign(function(e,t,n){if(t&&n&&n.connection&&n.connection.key){if(!n.connection.filter||!(n.connection.filter.length>0))return n.connection.key;var r=n.connection.filter?n.connection.filter:[];r.sort();var i={};return r.forEach(function(e){i[e]=t[e]}),"".concat(n.connection.key,"(").concat(eV(i),")")}var a=e;if(t){var o=eV(t);a+="(".concat(o,")")}return n&&Object.keys(n).forEach(function(e){-1===eW.indexOf(e)&&(n[e]&&Object.keys(n[e]).length?a+="@".concat(e,"(").concat(eV(n[e]),")"):a+="@".concat(e))}),a},{setStringify:function(e){var t=eV;return eV=e,t}}),eV=function(e){return JSON.stringify(e,eq)};function eq(e,t){return(0,eO.s)(t)&&!Array.isArray(t)&&(t=Object.keys(t).sort().reduce(function(e,n){return e[n]=t[n],e},{})),t}function eZ(e,t){if(e.arguments&&e.arguments.length){var n={};return e.arguments.forEach(function(e){var r;return ez(n,e.name,e.value,t)}),n}return null}function eX(e){return e.alias?e.alias.value:e.name.value}function eJ(e,t,n){for(var r,i=0,a=t.selections;i<a.length;i++){var o=a[i];if(eQ(o)){if("__typename"===o.name.value)return e[eX(o)]}else r?r.push(o):r=[o]}if("string"==typeof e.__typename)return e.__typename;if(r)for(var s=0,u=r;s<u.length;s++){var o=u[s],c=eJ(e,eC(o,n).selectionSet,n);if("string"==typeof c)return c}}function eQ(e){return"Field"===e.kind}function e1(e){return"InlineFragment"===e.kind}function e0(e){__DEV__?(0,Q.kG)(e&&"Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):(0,Q.kG)(e&&"Document"===e.kind,47);var t=e.definitions.filter(function(e){return"FragmentDefinition"!==e.kind}).map(function(e){if("OperationDefinition"!==e.kind)throw __DEV__?new Q.ej('Schema type definitions not allowed in queries. Found: "'.concat(e.kind,'"')):new Q.ej(48);return e});return __DEV__?(0,Q.kG)(t.length<=1,"Ambiguous GraphQL document: contains ".concat(t.length," operations")):(0,Q.kG)(t.length<=1,49),e}function e2(e){return e0(e),e.definitions.filter(function(e){return"OperationDefinition"===e.kind})[0]}function e3(e){return e.definitions.filter(function(e){return"OperationDefinition"===e.kind&&!!e.name}).map(function(e){return e.name.value})[0]||null}function e4(e){return e.definitions.filter(function(e){return"FragmentDefinition"===e.kind})}function e6(e){var t=e2(e);return __DEV__?(0,Q.kG)(t&&"query"===t.operation,"Must contain a query definition."):(0,Q.kG)(t&&"query"===t.operation,50),t}function e5(e){__DEV__?(0,Q.kG)("Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):(0,Q.kG)("Document"===e.kind,51),__DEV__?(0,Q.kG)(e.definitions.length<=1,"Fragment must have exactly one definition."):(0,Q.kG)(e.definitions.length<=1,52);var t=e.definitions[0];return __DEV__?(0,Q.kG)("FragmentDefinition"===t.kind,"Must be a fragment definition."):(0,Q.kG)("FragmentDefinition"===t.kind,53),t}function e8(e){e0(e);for(var t,n=0,r=e.definitions;n<r.length;n++){var i=r[n];if("OperationDefinition"===i.kind){var a=i.operation;if("query"===a||"mutation"===a||"subscription"===a)return i}"FragmentDefinition"!==i.kind||t||(t=i)}if(t)return t;throw __DEV__?new Q.ej("Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment."):new Q.ej(54)}function e9(e){var t=Object.create(null),n=e&&e.variableDefinitions;return n&&n.length&&n.forEach(function(e){e.defaultValue&&ez(t,e.variable.name,e.defaultValue)}),t}function e7(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!=typeof t.query?e3(t.query)||void 0:""),t}function te(e){for(var t=["query","operationName","variables","extensions","context",],n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(0>t.indexOf(i))throw __DEV__?new Q.ej("illegal argument: ".concat(i)):new Q.ej(27)}return e}function tt(e,t){return t?t(e):eT.of()}function tn(e){return"function"==typeof e?new ta(e):e}function tr(e){return e.request.length<=1}var ti=function(e){function t(t,n){var r=e.call(this,t)||this;return r.link=n,r}return(0,en.ZT)(t,e),t}(Error),ta=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e(function(){return eT.of()})},e.from=function(t){return 0===t.length?e.empty():t.map(tn).reduce(function(e,t){return e.concat(t)})},e.split=function(t,n,r){var i=tn(n),a=tn(r||new e(tt));return new e(tr(i)&&tr(a)?function(e){return t(e)?i.request(e)||eT.of():a.request(e)||eT.of()}:function(e,n){return t(e)?i.request(e,n)||eT.of():a.request(e,n)||eT.of()})},e.execute=function(e,t){return e.request(eM(t.context,e7(te(t))))||eT.of()},e.concat=function(t,n){var r=tn(t);if(tr(r))return __DEV__&&Q.kG.warn(new ti("You are calling concat on a terminating link, which will have no effect",r)),r;var i=tn(n);return new e(tr(i)?function(e){return r.request(e,function(e){return i.request(e)||eT.of()})||eT.of()}:function(e,t){return r.request(e,function(e){return i.request(e,t)||eT.of()})||eT.of()})},e.prototype.split=function(t,n,r){return this.concat(e.split(t,n,r||new e(tt)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw __DEV__?new Q.ej("request is not implemented"):new Q.ej(22)},e.prototype.onError=function(e,t){if(t&&t.error)return t.error(e),!1;throw e},e.prototype.setOnError=function(e){return this.onError=e,this},e}(),to=__webpack_require__(25821),ts=__webpack_require__(25217),tu={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},tc=Object.freeze({});function tl(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:tu,r=void 0,i=Array.isArray(e),a=[e],o=-1,s=[],u=void 0,c=void 0,l=void 0,f=[],d=[],h=e;do{var p,b=++o===a.length,m=b&&0!==s.length;if(b){if(c=0===d.length?void 0:f[f.length-1],u=l,l=d.pop(),m){if(i)u=u.slice();else{for(var g={},v=0,y=Object.keys(u);v<y.length;v++){var w=y[v];g[w]=u[w]}u=g}for(var _=0,E=0;E<s.length;E++){var S=s[E][0],k=s[E][1];i&&(S-=_),i&&null===k?(u.splice(S,1),_++):u[S]=k}}o=r.index,a=r.keys,s=r.edits,i=r.inArray,r=r.prev}else{if(c=l?i?o:a[o]:void 0,null===(u=l?l[c]:h)||void 0===u)continue;l&&f.push(c)}var x=void 0;if(!Array.isArray(u)){if(!(0,ts.UG)(u))throw Error("Invalid AST Node: ".concat((0,to.Z)(u),"."));var T=tf(t,u.kind,b);if(T){if((x=T.call(t,u,c,l,f,d))===tc)break;if(!1===x){if(!b){f.pop();continue}}else if(void 0!==x&&(s.push([c,x]),!b)){if((0,ts.UG)(x))u=x;else{f.pop();continue}}}}void 0===x&&m&&s.push([c,u]),b?f.pop():(r={inArray:i,index:o,keys:a,edits:s,prev:r},a=(i=Array.isArray(u))?u:null!==(p=n[u.kind])&&void 0!==p?p:[],o=-1,s=[],l&&d.push(l),l=u)}while(void 0!==r)return 0!==s.length&&(h=s[s.length-1][1]),h}function tf(e,t,n){var r=e[t];if(r){if(!n&&"function"==typeof r)return r;var i=n?r.leave:r.enter;if("function"==typeof i)return i}else{var a=n?e.leave:e.enter;if(a){if("function"==typeof a)return a;var o=a[t];if("function"==typeof o)return o}}}function td(e,t){var n=e.directives;return!n||!n.length||tv(n).every(function(e){var n=e.directive,r=e.ifArgument,i=!1;return"Variable"===r.value.kind?(i=t&&t[r.value.name.value],__DEV__?(0,Q.kG)(void 0!==i,"Invalid variable referenced in @".concat(n.name.value," directive.")):(0,Q.kG)(void 0!==i,40)):i=r.value.value,"skip"===n.name.value?!i:i})}var th=function(e,t){return tb(e,t,!1)},tp=function(e,t){return tb(e,t,!0)};function tb(e,t,n){var r=new Set(e),i=r.size;return tl(t,{Directive:function(e){if(r.delete(e.name.value)&&(!n||!r.size))return tc}}),n?!r.size:r.size<i}function tm(e){return e&&tb(["client","export"],e,!0)}function tg(e){var t=e.name.value;return"skip"===t||"include"===t}function tv(e){var t=[];return e&&e.length&&e.forEach(function(e){if(tg(e)){var n=e.arguments,r=e.name.value;__DEV__?(0,Q.kG)(n&&1===n.length,"Incorrect number of arguments for the @".concat(r," directive.")):(0,Q.kG)(n&&1===n.length,41);var i=n[0];__DEV__?(0,Q.kG)(i.name&&"if"===i.name.value,"Invalid argument for the @".concat(r," directive.")):(0,Q.kG)(i.name&&"if"===i.name.value,42);var a=i.value;__DEV__?(0,Q.kG)(a&&("Variable"===a.kind||"BooleanValue"===a.kind),"Argument for the @".concat(r," directive must be a variable or a boolean value.")):(0,Q.kG)(a&&("Variable"===a.kind||"BooleanValue"===a.kind),43),t.push({directive:e,ifArgument:i})}}),t}var ty=function(e,t){var n;try{n=JSON.stringify(e)}catch(r){var i=__DEV__?new Q.ej("Network request failed. ".concat(t," is not serializable: ").concat(r.message)):new Q.ej(24);throw i.parseError=r,i}return n},tw=function(e,t){var n=e.getContext().uri;return n||("function"==typeof t?t(e):t||"/graphql")},t_=__webpack_require__(30320);function tE(e){return!!e.body}function tS(e){return!!e.getReader}function tk(e){return!!(t_.DN&&e[Symbol.asyncIterator])}function tx(e){return!!e.stream}function tT(e){return!!e.arrayBuffer}function tM(e){return!!e.pipe}function tO(e){var t,n=e[Symbol.asyncIterator]();return(t={next:function(){return n.next()}})[Symbol.asyncIterator]=function(){return this},t}function tA(e){var t=null,n=null,r=!1,i=[],a=[];function o(e){if(!n){if(a.length){var t=a.shift();if(Array.isArray(t)&&t[0])return t[0]({value:e,done:!1})}i.push(e)}}function s(e){n=e,a.slice().forEach(function(t){t[1](e)}),t&&t()}function u(){r=!0,a.slice().forEach(function(e){e[0]({value:void 0,done:!0})}),t&&t()}function c(){return new Promise(function(e,t){return n?t(n):i.length?e({value:i.shift(),done:!1}):r?e({value:void 0,done:!0}):void a.push([e,t])})}t=function(){t=null,e.removeListener("data",o),e.removeListener("error",s),e.removeListener("end",u),e.removeListener("finish",u),e.removeListener("close",u)},e.on("data",o),e.on("error",s),e.on("end",u),e.on("finish",u),e.on("close",u);var l={next:function(){return c()}};return t_.DN&&(l[Symbol.asyncIterator]=function(){return this}),l}function tL(e){var t=!1,n={next:function(){return t?Promise.resolve({value:void 0,done:!0}):(t=!0,new Promise(function(t,n){e.then(function(e){t({value:e,done:!1})}).catch(n)}))}};return t_.DN&&(n[Symbol.asyncIterator]=function(){return this}),n}function tC(e){var t={next:function(){return e.read()}};return t_.DN&&(t[Symbol.asyncIterator]=function(){return this}),t}function tI(e){var t=e;if(tE(e)&&(t=e.body),tk(t))return tO(t);if(tS(t))return tC(t.getReader());if(tx(t))return tC(t.stream().getReader());if(tT(t))return tL(t.arrayBuffer());if(tM(t))return tA(t);throw Error("Unknown body type for responseIterator. Please pass a streamable response.")}var tD=function(e,t,n){var r=Error(n);throw r.name="ServerError",r.response=e,r.statusCode=e.status,r.result=t,r},tN=__webpack_require__(30990),tP=__webpack_require__(21436),tR=Object.prototype.hasOwnProperty;function tj(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return tF(e)}function tF(e){var t=e[0]||{},n=e.length;if(n>1)for(var r=new tB,i=1;i<n;++i)t=r.merge(t,e[i]);return t}var tY=function(e,t,n){return this.merge(e[n],t[n])},tB=function(){function e(e){void 0===e&&(e=tY),this.reconciler=e,this.isObject=eO.s,this.pastCopies=new Set}return e.prototype.merge=function(e,t){for(var n=this,r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return(0,eO.s)(t)&&(0,eO.s)(e)?(Object.keys(t).forEach(function(i){if(tR.call(e,i)){var a=e[i];if(t[i]!==a){var o=n.reconciler.apply(n,(0,en.ev)([e,t,i],r,!1));o!==a&&((e=n.shallowCopyForMerge(e))[i]=o)}}else(e=n.shallowCopyForMerge(e))[i]=t[i]}),e):t},e.prototype.shallowCopyForMerge=function(e){return(0,eO.s)(e)&&!this.pastCopies.has(e)&&(e=Array.isArray(e)?e.slice(0):(0,en.pi)({__proto__:Object.getPrototypeOf(e)},e),this.pastCopies.add(e)),e},e}();function tU(e){return"incremental"in e}function tH(e){return"hasNext"in e&&"data"in e}function t$(e){return tU(e)||tH(e)}function tz(e){return(0,eO.s)(e)&&"payload"in e}function tG(e,t){var n=e,r=new tB;return tU(t)&&(0,tP.O)(t.incremental)&&t.incremental.forEach(function(e){for(var t=e.data,i=e.path,a=i.length-1;a>=0;--a){var o=i[a],s=isNaN(+o)?{}:[];s[o]=t,t=s}n=r.merge(n,t)}),n}var tW=Object.prototype.hasOwnProperty;function tK(e,t){var n,r,i,a,o;return(0,en.mG)(this,void 0,void 0,function(){var s,u,c,l,f,d,h,p,b,m,g,v,y,w,_,E,S,k,x,T,M,O,A;return(0,en.Jh)(this,function(L){switch(L.label){case 0:if(void 0===TextDecoder)throw Error("TextDecoder must be defined in the environment: please import a polyfill.");s=new TextDecoder("utf-8"),u=null===(n=e.headers)||void 0===n?void 0:n.get("content-type"),c="boundary=",l=(null==u?void 0:u.includes(c))?null==u?void 0:u.substring((null==u?void 0:u.indexOf(c))+c.length).replace(/['"]/g,"").replace(/\;(.*)/gm,"").trim():"-",f="\r\n--".concat(l),d="",h=tI(e),p=!0,L.label=1;case 1:if(!p)return[3,3];return[4,h.next()];case 2:for(m=(b=L.sent()).value,g=b.done,v="string"==typeof m?m:s.decode(m),y=d.length-f.length+1,p=!g,d+=v,w=d.indexOf(f,y);w>-1;){if(_=void 0,_=(O=[d.slice(0,w),d.slice(w+f.length),])[0],d=O[1],E=_.indexOf("\r\n\r\n"),(k=(S=tV(_.slice(0,E)))["content-type"])&&-1===k.toLowerCase().indexOf("application/json"))throw Error("Unsupported patch content type: application/json is required.");if(x=_.slice(E))try{T=tq(e,x),Object.keys(T).length>1||"data"in T||"incremental"in T||"errors"in T||"payload"in T?tz(T)?(M={},"payload"in T&&(M=(0,en.pi)({},T.payload)),"errors"in T&&(M=(0,en.pi)((0,en.pi)({},M),{extensions:(0,en.pi)((0,en.pi)({},"extensions"in M?M.extensions:null),((A={})[tN.YG]=T.errors,A))})),null===(r=t.next)||void 0===r||r.call(t,M)):null===(i=t.next)||void 0===i||i.call(t,T):1===Object.keys(T).length&&"hasNext"in T&&!T.hasNext&&(null===(a=t.complete)||void 0===a||a.call(t))}catch(C){tZ(C,t)}w=d.indexOf(f)}return[3,1];case 3:return null===(o=t.complete)||void 0===o||o.call(t),[2]}})})}function tV(e){var t={};return e.split("\n").forEach(function(e){var n=e.indexOf(":");if(n>-1){var r=e.slice(0,n).trim().toLowerCase(),i=e.slice(n+1).trim();t[r]=i}}),t}function tq(e,t){e.status>=300&&tD(e,function(){try{return JSON.parse(t)}catch(e){return t}}(),"Response not successful: Received status code ".concat(e.status));try{return JSON.parse(t)}catch(n){var r=n;throw r.name="ServerParseError",r.response=e,r.statusCode=e.status,r.bodyText=t,r}}function tZ(e,t){var n,r;"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&(null===(n=t.next)||void 0===n||n.call(t,e.result)),null===(r=t.error)||void 0===r||r.call(t,e))}function tX(e,t,n){tJ(t)(e).then(function(e){var t,r;null===(t=n.next)||void 0===t||t.call(n,e),null===(r=n.complete)||void 0===r||r.call(n)}).catch(function(e){return tZ(e,n)})}function tJ(e){return function(t){return t.text().then(function(e){return tq(t,e)}).then(function(n){return t.status>=300&&tD(t,n,"Response not successful: Received status code ".concat(t.status)),Array.isArray(n)||tW.call(n,"data")||tW.call(n,"errors")||tD(t,n,"Server response was missing for query '".concat(Array.isArray(e)?e.map(function(e){return e.operationName}):e.operationName,"'.")),n})}}var tQ=function(e){if(!e&&"undefined"==typeof fetch)throw __DEV__?new Q.ej("\n\"fetch\" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:\n\nimport fetch from 'cross-fetch';\nimport { ApolloClient, HttpLink } from '@apollo/client';\nconst client = new ApolloClient({\n link: new HttpLink({ uri: '/graphql', fetch })\n});\n "):new Q.ej(23)},t1=__webpack_require__(87392);function t0(e){return tl(e,{leave:t3})}var t2=80,t3={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return t6(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,n=e.name,r=t8("(",t6(e.variableDefinitions,", "),")"),i=t6(e.directives," "),a=e.selectionSet;return n||i||r||"query"!==t?t6([t,t6([n,r]),i,a]," "):a},VariableDefinition:function(e){var t=e.variable,n=e.type,r=e.defaultValue,i=e.directives;return t+": "+n+t8(" = ",r)+t8(" ",t6(i," "))},SelectionSet:function(e){return t5(e.selections)},Field:function(e){var t=e.alias,n=e.name,r=e.arguments,i=e.directives,a=e.selectionSet,o=t8("",t,": ")+n,s=o+t8("(",t6(r,", "),")");return s.length>t2&&(s=o+t8("(\n",t9(t6(r,"\n")),"\n)")),t6([s,t6(i," "),a]," ")},Argument:function(e){var t;return e.name+": "+e.value},FragmentSpread:function(e){var t;return"..."+e.name+t8(" ",t6(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,n=e.directives,r=e.selectionSet;return t6(["...",t8("on ",t),t6(n," "),r]," ")},FragmentDefinition:function(e){var t=e.name,n=e.typeCondition,r=e.variableDefinitions,i=e.directives,a=e.selectionSet;return"fragment ".concat(t).concat(t8("(",t6(r,", "),")")," ")+"on ".concat(n," ").concat(t8("",t6(i," ")," "))+a},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?(0,t1.LZ)(n,"description"===t?"":" "):JSON.stringify(n)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+t6(e.values,", ")+"]"},ObjectValue:function(e){return"{"+t6(e.fields,", ")+"}"},ObjectField:function(e){var t;return e.name+": "+e.value},Directive:function(e){var t;return"@"+e.name+t8("(",t6(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:t4(function(e){var t=e.directives,n=e.operationTypes;return t6(["schema",t6(t," "),t5(n)]," ")}),OperationTypeDefinition:function(e){var t;return e.operation+": "+e.type},ScalarTypeDefinition:t4(function(e){var t;return t6(["scalar",e.name,t6(e.directives," ")]," ")}),ObjectTypeDefinition:t4(function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return t6(["type",t,t8("implements ",t6(n," & ")),t6(r," "),t5(i)]," ")}),FieldDefinition:t4(function(e){var t=e.name,n=e.arguments,r=e.type,i=e.directives;return t+(ne(n)?t8("(\n",t9(t6(n,"\n")),"\n)"):t8("(",t6(n,", "),")"))+": "+r+t8(" ",t6(i," "))}),InputValueDefinition:t4(function(e){var t=e.name,n=e.type,r=e.defaultValue,i=e.directives;return t6([t+": "+n,t8("= ",r),t6(i," ")]," ")}),InterfaceTypeDefinition:t4(function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return t6(["interface",t,t8("implements ",t6(n," & ")),t6(r," "),t5(i)]," ")}),UnionTypeDefinition:t4(function(e){var t=e.name,n=e.directives,r=e.types;return t6(["union",t,t6(n," "),r&&0!==r.length?"= "+t6(r," | "):""]," ")}),EnumTypeDefinition:t4(function(e){var t=e.name,n=e.directives,r=e.values;return t6(["enum",t,t6(n," "),t5(r)]," ")}),EnumValueDefinition:t4(function(e){var t;return t6([e.name,t6(e.directives," ")]," ")}),InputObjectTypeDefinition:t4(function(e){var t=e.name,n=e.directives,r=e.fields;return t6(["input",t,t6(n," "),t5(r)]," ")}),DirectiveDefinition:t4(function(e){var t=e.name,n=e.arguments,r=e.repeatable,i=e.locations;return"directive @"+t+(ne(n)?t8("(\n",t9(t6(n,"\n")),"\n)"):t8("(",t6(n,", "),")"))+(r?" repeatable":"")+" on "+t6(i," | ")}),SchemaExtension:function(e){var t=e.directives,n=e.operationTypes;return t6(["extend schema",t6(t," "),t5(n)]," ")},ScalarTypeExtension:function(e){var t;return t6(["extend scalar",e.name,t6(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return t6(["extend type",t,t8("implements ",t6(n," & ")),t6(r," "),t5(i)]," ")},InterfaceTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return t6(["extend interface",t,t8("implements ",t6(n," & ")),t6(r," "),t5(i)]," ")},UnionTypeExtension:function(e){var t=e.name,n=e.directives,r=e.types;return t6(["extend union",t,t6(n," "),r&&0!==r.length?"= "+t6(r," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,n=e.directives,r=e.values;return t6(["extend enum",t,t6(n," "),t5(r)]," ")},InputObjectTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return t6(["extend input",t,t6(n," "),t5(r)]," ")}};function t4(e){return function(t){return t6([t.description,e(t)],"\n")}}function t6(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter(function(e){return e}).join(n))&&void 0!==t?t:""}function t5(e){return t8("{\n",t9(t6(e,"\n")),"\n}")}function t8(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return null!=t&&""!==t?e+t+n:""}function t9(e){return t8(" ",e.replace(/\n/g,"\n "))}function t7(e){return -1!==e.indexOf("\n")}function ne(e){return null!=e&&e.some(t7)}var nt,nn,nr,ni={http:{includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},na=function(e,t){return t(e)};function no(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i={},a={};n.forEach(function(e){i=(0,en.pi)((0,en.pi)((0,en.pi)({},i),e.options),{headers:(0,en.pi)((0,en.pi)({},i.headers),e.headers)}),e.credentials&&(i.credentials=e.credentials),a=(0,en.pi)((0,en.pi)({},a),e.http)}),i.headers&&(i.headers=ns(i.headers,a.preserveHeaderCase));var o=e.operationName,s=e.extensions,u=e.variables,c=e.query,l={operationName:o,variables:u};return a.includeExtensions&&(l.extensions=s),a.includeQuery&&(l.query=t(c,t0)),{options:i,body:l}}function ns(e,t){if(!t){var n=Object.create(null);return Object.keys(Object(e)).forEach(function(t){n[t.toLowerCase()]=e[t]}),n}var r=Object.create(null);Object.keys(Object(e)).forEach(function(t){r[t.toLowerCase()]={originalName:t,value:e[t]}});var i=Object.create(null);return Object.keys(r).forEach(function(e){i[r[e].originalName]=r[e].value}),i}var nu=function(){if("undefined"==typeof AbortController)return{controller:!1,signal:!1};var e=new AbortController,t=e.signal;return{controller:e,signal:t}};function nc(e,t){var n=[],r=function(e,t){n.push("".concat(e,"=").concat(encodeURIComponent(t)))};if("query"in t&&r("query",t.query),t.operationName&&r("operationName",t.operationName),t.variables){var i=void 0;try{i=ty(t.variables,"Variables map")}catch(a){return{parseError:a}}r("variables",i)}if(t.extensions){var o=void 0;try{o=ty(t.extensions,"Extensions map")}catch(s){return{parseError:s}}r("extensions",o)}var u="",c=e,l=e.indexOf("#");-1!==l&&(u=e.substr(l),c=e.substr(0,l));var f=-1===c.indexOf("?")?"?":"&";return{newURI:c+f+n.join("&")+u}}function nl(e){return new eT(function(t){t.error(e)})}var nf=(0,Q.wY)(function(){return fetch}),nd=function(e){void 0===e&&(e={});var t=e.uri,n=void 0===t?"/graphql":t,r=e.fetch,i=e.print,a=void 0===i?na:i,o=e.includeExtensions,s=e.preserveHeaderCase,u=e.useGETForQueries,c=e.includeUnusedVariables,l=void 0!==c&&c,f=(0,en._T)(e,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]);__DEV__&&tQ(r||nf);var d={http:{includeExtensions:o,preserveHeaderCase:s},options:f.fetchOptions,credentials:f.credentials,headers:f.headers};return new ta(function(e){var t,i=tw(e,n),o=e.getContext(),s={};if(o.clientAwareness){var c=o.clientAwareness,f=c.name,h=c.version;f&&(s["apollographql-client-name"]=f),h&&(s["apollographql-client-version"]=h)}var p=(0,en.pi)((0,en.pi)({},s),o.headers),b={http:o.http,options:o.fetchOptions,credentials:o.credentials,headers:p},m=no(e,a,ni,d,b),g=m.options,v=m.body;if(v.variables&&!l){var y=new Set(Object.keys(v.variables));tl(e.query,{Variable:function(e,t,n){n&&"VariableDefinition"!==n.kind&&y.delete(e.name.value)}}),y.size&&(v.variables=(0,en.pi)({},v.variables),y.forEach(function(e){delete v.variables[e]}))}if(!g.signal){var w=nu(),_=w.controller,E=w.signal;(t=_)&&(g.signal=E)}var S,k=function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation},x=(S=e8(e.query),"OperationDefinition"===S.kind&&"subscription"===S.operation),T=tb(["defer"],e.query);if(u&&!e.query.definitions.some(k)&&(g.method="GET"),T||x){g.headers=g.headers||{};var M="multipart/mixed;";x&&T&&__DEV__&&Q.kG.warn("Multipart-subscriptions do not support @defer"),x?M+="boundary=graphql;subscriptionSpec=1.0,application/json":T&&(M+="deferSpec=20220824,application/json"),g.headers.accept=M}if("GET"===g.method){var O=nc(i,v),A=O.newURI,L=O.parseError;if(L)return nl(L);i=A}else try{g.body=ty(v,"Payload")}catch(C){return nl(C)}return new eT(function(n){return(r||(0,Q.wY)(function(){return fetch})||nf)(i,g).then(function(t){e.setContext({response:t});var r,i=null===(r=t.headers)||void 0===r?void 0:r.get("content-type");return null!==i&&/^multipart\/mixed/i.test(i)?tK(t,n):tX(t,e,n)}).catch(function(e){return tZ(e,n)}),function(){t&&t.abort()}})})},nh=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,nd(t).request)||this;return n.options=t,n}return(0,en.ZT)(t,e),t}(ta),np=ta.execute,nb="3.7.17",nm=__webpack_require__(82152);let ng=()=>Object.create(null),{forEach:nv,slice:ny}=Array.prototype,{hasOwnProperty:nw}=Object.prototype;class n_{constructor(e=!0,t=ng){this.weakness=e,this.makeData=t}lookup(...e){return this.lookupArray(e)}lookupArray(e){let t=this;return nv.call(e,e=>t=t.getChildTrie(e)),nw.call(t,"data")?t.data:t.data=this.makeData(ny.call(e))}peek(...e){return this.peekArray(e)}peekArray(e){let t=this;for(let n=0,r=e.length;t&&n<r;++n){let i=this.weakness&&nE(e[n])?t.weak:t.strong;t=i&&i.get(e[n])}return t&&t.data}getChildTrie(e){let t=this.weakness&&nE(e)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),n=t.get(e);return n||t.set(e,n=new n_(this.weakness,this.makeData)),n}}function nE(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}function nS(e){return(0,eO.s)(e)?(0,tP.k)(e)?e.slice(0):(0,en.pi)({__proto__:Object.getPrototypeOf(e)},e):e}var nk=function(){function e(){this.known=new(t_.sy?WeakSet:Set),this.pool=new n_(t_.mr),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(e){return(0,eO.s)(e)&&this.known.has(e)},e.prototype.pass=function(e){if((0,eO.s)(e)){var t=nS(e);return this.passes.set(t,e),t}return e},e.prototype.admit=function(e){var t=this;if((0,eO.s)(e)){var n=this.passes.get(e);if(n)return n;var r=Object.getPrototypeOf(e);switch(r){case Array.prototype:if(this.known.has(e))break;var i=e.map(this.admit,this),a=this.pool.lookupArray(i);return!a.array&&(this.known.add(a.array=i),__DEV__&&Object.freeze(i)),a.array;case null:case Object.prototype:if(this.known.has(e))break;var o=Object.getPrototypeOf(e),s=[o],u=this.sortedKeys(e);s.push(u.json);var c=s.length;u.sorted.forEach(function(n){s.push(t.admit(e[n]))});var a=this.pool.lookupArray(s);if(!a.object){var l=a.object=Object.create(o);this.known.add(l),u.sorted.forEach(function(e,t){l[e]=s[c+t]}),__DEV__&&Object.freeze(l)}return a.object}}return e},e.prototype.sortedKeys=function(e){var t=Object.keys(e),n=this.pool.lookupArray(t);if(!n.keys){t.sort();var r=JSON.stringify(t);(n.keys=this.keysByJSON.get(r))||this.keysByJSON.set(r,n.keys={sorted:t,json:r})}return n.keys},e}(),nx=Object.assign(function(n){if((0,eO.s)(n)){void 0===e&&nT();var r=e.admit(n),i=t.get(r);return void 0===i&&t.set(r,i=JSON.stringify(r)),i}return JSON.stringify(n)},{reset:nT});function nT(){e=new nk,t=new(t_.mr?WeakMap:Map)}function nM(e,t,n){return new eT(function(r){var i=r.next,a=r.error,o=r.complete,s=0,u=!1,c={then:function(e){return new Promise(function(t){return t(e())})}};function l(e,t){return e?function(t){++s;var n=function(){return e(t)};c=c.then(n,n).then(function(e){--s,i&&i.call(r,e),u&&f.complete()},function(e){throw--s,e}).catch(function(e){a&&a.call(r,e)})}:function(e){return t&&t.call(r,e)}}var f={next:l(t,i),error:l(n,a),complete:function(){u=!0,!s&&o&&o.call(r)}},d=e.subscribe(f);return function(){return d.unsubscribe()}})}function nO(e){var t=nA(e);return(0,tP.O)(t)}function nA(e){var t=(0,tP.O)(e.errors)?e.errors.slice(0):[];return tU(e)&&(0,tP.O)(e.incremental)&&e.incremental.forEach(function(e){e.errors&&t.push.apply(t,e.errors)}),t}var nL=__webpack_require__(97359),nC={kind:nL.h.FIELD,name:{kind:nL.h.NAME,value:"__typename"}};function nI(e,t){return!e||e.selectionSet.selections.every(function(e){return e.kind===nL.h.FRAGMENT_SPREAD&&nI(t[e.name.value],t)})}function nD(e){return nI(e2(e)||e5(e),eL(e4(e)))?null:e}function nN(e){var t=new Set,n=[];return e.forEach(function(e){e.name?t.add(e.name):e.test&&n.push(e.test)}),function(e){return t.has(e.name.value)||n.some(function(t){return t(e)})}}function nP(e){var t=new Map;return function(n){void 0===n&&(n=e);var r=t.get(n);return r||t.set(n,r={variables:new Set,fragmentSpreads:new Set}),r}}function nR(e,t){for(var n=nP(""),r=nP(""),i=function(e){for(var t=0,i=void 0;t<e.length&&(i=e[t]);++t)if(!(0,tP.k)(i)){if(i.kind===nL.h.OPERATION_DEFINITION)return n(i.name&&i.name.value);if(i.kind===nL.h.FRAGMENT_DEFINITION)return r(i.name.value)}return __DEV__&&Q.kG.error("Could not find operation or fragment"),null},a=0,o=t.definitions.length-1;o>=0;--o)t.definitions[o].kind===nL.h.OPERATION_DEFINITION&&++a;var s=nN(e),u=e.some(function(e){return e.remove}),c=function(e){return u&&e&&e.some(s)},l=new Map,f=!1,d={enter:function(e){if(c(e.directives))return f=!0,null}},h=tl(t,{Field:d,InlineFragment:d,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(e,t,n,r,a){var o=i(a);o&&o.variables.add(e.name.value)}},FragmentSpread:{enter:function(e,t,n,r,a){if(c(e.directives))return f=!0,null;var o=i(a);o&&o.fragmentSpreads.add(e.name.value)}},FragmentDefinition:{enter:function(e,t,n,r){l.set(JSON.stringify(r),e)},leave:function(e,t,n,i){return e===l.get(JSON.stringify(i))?e:a>0&&e.selectionSet.selections.every(function(e){return e.kind===nL.h.FIELD&&"__typename"===e.name.value})?(r(e.name.value).removed=!0,f=!0,null):void 0}},Directive:{leave:function(e){if(s(e))return f=!0,null}}});if(!f)return t;var p=function(e){return e.transitiveVars||(e.transitiveVars=new Set(e.variables),e.removed||e.fragmentSpreads.forEach(function(t){p(r(t)).transitiveVars.forEach(function(t){e.transitiveVars.add(t)})})),e},b=new Set;h.definitions.forEach(function(e){e.kind===nL.h.OPERATION_DEFINITION?p(n(e.name&&e.name.value)).fragmentSpreads.forEach(function(e){b.add(e)}):e.kind!==nL.h.FRAGMENT_DEFINITION||0!==a||r(e.name.value).removed||b.add(e.name.value)}),b.forEach(function(e){p(r(e)).fragmentSpreads.forEach(function(e){b.add(e)})});var m=function(e){return!!(!b.has(e)||r(e).removed)},g={enter:function(e){if(m(e.name.value))return null}};return nD(tl(h,{FragmentSpread:g,FragmentDefinition:g,OperationDefinition:{leave:function(e){if(e.variableDefinitions){var t=p(n(e.name&&e.name.value)).transitiveVars;if(t.size<e.variableDefinitions.length)return(0,en.pi)((0,en.pi)({},e),{variableDefinitions:e.variableDefinitions.filter(function(e){return t.has(e.variable.name.value)})})}}}}))}var nj=Object.assign(function(e){return tl(e,{SelectionSet:{enter:function(e,t,n){if(!n||n.kind!==nL.h.OPERATION_DEFINITION){var r=e.selections;if(!(!r||r.some(function(e){return eQ(e)&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))}))){var i=n;if(!(eQ(i)&&i.directives&&i.directives.some(function(e){return"export"===e.name.value})))return(0,en.pi)((0,en.pi)({},e),{selections:(0,en.ev)((0,en.ev)([],r,!0),[nC],!1)})}}}}})},{added:function(e){return e===nC}}),nF={test:function(e){var t="connection"===e.name.value;return t&&(!e.arguments||!e.arguments.some(function(e){return"key"===e.name.value}))&&__DEV__&&Q.kG.warn("Removing an @connection directive even though it does not have a key. You may want to use the key parameter to specify a store key."),t}};function nY(e){return nR([nF],e0(e))}function nB(e,t,n){return void 0===n&&(n=!0),!!t&&t.selections&&t.selections.some(function(t){return nU(e,t,n)})}function nU(e,t,n){return void 0===n&&(n=!0),!isField(t)||!!t.directives&&(t.directives.some(nN(e))||n&&nB(e,t.selectionSet,n))}function nH(e){return"query"===e8(e).operation?e:tl(e,{OperationDefinition:{enter:function(e){return(0,en.pi)((0,en.pi)({},e),{operation:"query"})}}})}function n$(e){return e0(e),nR([{test:function(e){return"client"===e.name.value},remove:!0},],e)}var nz=new Map;function nG(e){var t=nz.get(e)||1;return nz.set(e,t+1),"".concat(e,":").concat(t,":").concat(Math.random().toString(36).slice(2))}function nW(e,t,n){var r=[];e.forEach(function(e){return e[t]&&r.push(e)}),r.forEach(function(e){return e[t](n)})}function nK(e){function t(t){Object.defineProperty(e,t,{value:eT})}return t_.aS&&Symbol.species&&t(Symbol.species),t("@@species"),e}function nV(e){return e&&"function"==typeof e.then}var nq=function(e){function t(t){var n=e.call(this,function(e){return n.addObserver(e),function(){return n.removeObserver(e)}})||this;return n.observers=new Set,n.promise=new Promise(function(e,t){n.resolve=e,n.reject=t}),n.handlers={next:function(e){null!==n.sub&&(n.latest=["next",e],n.notify("next",e),nW(n.observers,"next",e))},error:function(e){var t=n.sub;null!==t&&(t&&setTimeout(function(){return t.unsubscribe()}),n.sub=null,n.latest=["error",e],n.reject(e),n.notify("error",e),nW(n.observers,"error",e))},complete:function(){var e=n,t=e.sub,r=e.sources,i=void 0===r?[]:r;if(null!==t){var a=i.shift();a?nV(a)?a.then(function(e){return n.sub=e.subscribe(n.handlers)}):n.sub=a.subscribe(n.handlers):(t&&setTimeout(function(){return t.unsubscribe()}),n.sub=null,n.latest&&"next"===n.latest[0]?n.resolve(n.latest[1]):n.resolve(),n.notify("complete"),nW(n.observers,"complete"))}}},n.nextResultListeners=new Set,n.cancel=function(e){n.reject(e),n.sources=[],n.handlers.complete()},n.promise.catch(function(e){}),"function"==typeof t&&(t=[new eT(t)]),nV(t)?t.then(function(e){return n.start(e)},n.handlers.error):n.start(t),n}return(0,en.ZT)(t,e),t.prototype.start=function(e){void 0===this.sub&&(this.sources=Array.from(e),this.handlers.complete())},t.prototype.deliverLastMessage=function(e){if(this.latest){var t=this.latest[0],n=e[t];n&&n.call(e,this.latest[1]),null===this.sub&&"next"===t&&e.complete&&e.complete()}},t.prototype.addObserver=function(e){this.observers.has(e)||(this.deliverLastMessage(e),this.observers.add(e))},t.prototype.removeObserver=function(e){this.observers.delete(e)&&this.observers.size<1&&this.handlers.complete()},t.prototype.notify=function(e,t){var n=this.nextResultListeners;n.size&&(this.nextResultListeners=new Set,n.forEach(function(n){return n(e,t)}))},t.prototype.beforeNext=function(e){var t=!1;this.nextResultListeners.add(function(n,r){t||(t=!0,e(n,r))})},t}(eT);nK(nq);var nZ=__webpack_require__(1644),nX=Object.prototype.toString;function nJ(e){return nQ(e)}function nQ(e,t){switch(nX.call(e)){case"[object Array]":if((t=t||new Map).has(e))return t.get(e);var n=e.slice(0);return t.set(e,n),n.forEach(function(e,r){n[r]=nQ(e,t)}),n;case"[object Object]":if((t=t||new Map).has(e))return t.get(e);var r=Object.create(Object.getPrototypeOf(e));return t.set(e,r),Object.keys(e).forEach(function(n){r[n]=nQ(e[n],t)}),r;default:return e}}var n1=__webpack_require__(53712),n0=Object.assign,n2=Object.hasOwnProperty,n3=function(e){function t(t){var n=t.queryManager,r=t.queryInfo,i=t.options,a=e.call(this,function(e){try{var t=e._subscription._observer;t&&!t.error&&(t.error=n6)}catch(n){}var r=!a.observers.size;a.observers.add(e);var i=a.last;return i&&i.error?e.error&&e.error(i.error):i&&i.result&&e.next&&e.next(i.result),r&&a.reobserve().catch(function(){}),function(){a.observers.delete(e)&&!a.observers.size&&a.tearDownQuery()}})||this;a.observers=new Set,a.subscriptions=new Set,a.queryInfo=r,a.queryManager=n,a.waitForOwnResult=n8(i.fetchPolicy),a.isTornDown=!1;var o=n.defaultOptions.watchQuery,s=(void 0===o?{}:o).fetchPolicy,u=void 0===s?"cache-first":s,c=i.fetchPolicy,l=void 0===c?u:c,f=i.initialFetchPolicy,d=void 0===f?"standby"===l?u:l:f;a.options=(0,en.pi)((0,en.pi)({},i),{initialFetchPolicy:d,fetchPolicy:l}),a.queryId=r.queryId||n.generateQueryId();var h=e2(a.query);return a.queryName=h&&h.name&&h.name.value,a}return(0,en.ZT)(t,e),Object.defineProperty(t.prototype,"query",{get:function(){return this.queryManager.transform(this.options.query).document},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var e=this;return new Promise(function(t,n){var r={next:function(n){t(n),e.observers.delete(r),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout(function(){i.unsubscribe()},0)},error:n},i=e.subscribe(r)})},t.prototype.getCurrentResult=function(e){void 0===e&&(e=!0);var t=this.getLastResult(!0),n=this.queryInfo.networkStatus||t&&t.networkStatus||nZ.I.ready,r=(0,en.pi)((0,en.pi)({},t),{loading:(0,nZ.O)(n),networkStatus:n}),i=this.options.fetchPolicy,a=void 0===i?"cache-first":i;if(n8(a)||this.queryManager.transform(this.options.query).hasForcedResolvers);else if(this.waitForOwnResult)this.queryInfo.updateWatch();else{var o=this.queryInfo.getDiff();(o.complete||this.options.returnPartialData)&&(r.data=o.result),(0,nm.D)(r.data,{})&&(r.data=void 0),o.complete?(delete r.partial,o.complete&&r.networkStatus===nZ.I.loading&&("cache-first"===a||"cache-only"===a)&&(r.networkStatus=nZ.I.ready,r.loading=!1)):r.partial=!0,!__DEV__||o.complete||this.options.partialRefetch||r.loading||r.data||r.error||n5(o.missing)}return e&&this.updateLastResult(r),r},t.prototype.isDifferentFromLastResult=function(e,t){return!this.last||!(0,nm.D)(this.last.result,e)||t&&!(0,nm.D)(this.last.variables,t)},t.prototype.getLast=function(e,t){var n=this.last;if(n&&n[e]&&(!t||(0,nm.D)(n.variables,this.variables)))return n[e]},t.prototype.getLastResult=function(e){return this.getLast("result",e)},t.prototype.getLastError=function(e){return this.getLast("error",e)},t.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(e){var t,n={pollInterval:0},r=this.options.fetchPolicy;if("cache-and-network"===r?n.fetchPolicy=r:"no-cache"===r?n.fetchPolicy="no-cache":n.fetchPolicy="network-only",__DEV__&&e&&n2.call(e,"variables")){var i=e6(this.query),a=i.variableDefinitions;(!a||!a.some(function(e){return"variables"===e.variable.name.value}))&&__DEV__&&Q.kG.warn("Called refetch(".concat(JSON.stringify(e),") for query ").concat((null===(t=i.name)||void 0===t?void 0:t.value)||JSON.stringify(i),", which does not declare a $variables variable.\nDid you mean to call refetch(variables) instead of refetch({ variables })?"))}return e&&!(0,nm.D)(this.options.variables,e)&&(n.variables=this.options.variables=(0,en.pi)((0,en.pi)({},this.options.variables),e)),this.queryInfo.resetLastWrite(),this.reobserve(n,nZ.I.refetch)},t.prototype.fetchMore=function(e){var t=this,n=(0,en.pi)((0,en.pi)({},e.query?e:(0,en.pi)((0,en.pi)((0,en.pi)((0,en.pi)({},this.options),{query:this.query}),e),{variables:(0,en.pi)((0,en.pi)({},this.options.variables),e.variables)})),{fetchPolicy:"no-cache"}),r=this.queryManager.generateQueryId(),i=this.queryInfo,a=i.networkStatus;i.networkStatus=nZ.I.fetchMore,n.notifyOnNetworkStatusChange&&this.observe();var o=new Set;return this.queryManager.fetchQuery(r,n,nZ.I.fetchMore).then(function(s){return t.queryManager.removeQuery(r),i.networkStatus===nZ.I.fetchMore&&(i.networkStatus=a),t.queryManager.cache.batch({update:function(r){var i=e.updateQuery;i?r.updateQuery({query:t.query,variables:t.variables,returnPartialData:!0,optimistic:!1},function(e){return i(e,{fetchMoreResult:s.data,variables:n.variables})}):r.writeQuery({query:n.query,variables:n.variables,data:s.data})},onWatchUpdated:function(e){o.add(e.query)}}),s}).finally(function(){o.has(t.query)||n4(t)})},t.prototype.subscribeToMore=function(e){var t=this,n=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:function(n){var r=e.updateQuery;r&&t.updateQuery(function(e,t){return r(e,{subscriptionData:n,variables:t.variables})})},error:function(t){if(e.onError){e.onError(t);return}__DEV__&&Q.kG.error("Unhandled GraphQL subscription error",t)}});return this.subscriptions.add(n),function(){t.subscriptions.delete(n)&&n.unsubscribe()}},t.prototype.setOptions=function(e){return this.reobserve(e)},t.prototype.setVariables=function(e){return(0,nm.D)(this.variables,e)?this.observers.size?this.result():Promise.resolve():(this.options.variables=e,this.observers.size)?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:e},nZ.I.setVariables):Promise.resolve()},t.prototype.updateQuery=function(e){var t=this.queryManager,n=e(t.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,{variables:this.variables});n&&(t.cache.writeQuery({query:this.options.query,data:n,variables:this.variables}),t.broadcastQueries())},t.prototype.startPolling=function(e){this.options.pollInterval=e,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.applyNextFetchPolicy=function(e,t){if(t.nextFetchPolicy){var n=t.fetchPolicy,r=void 0===n?"cache-first":n,i=t.initialFetchPolicy,a=void 0===i?r:i;"standby"===r||("function"==typeof t.nextFetchPolicy?t.fetchPolicy=t.nextFetchPolicy(r,{reason:e,options:t,observable:this,initialFetchPolicy:a}):"variables-changed"===e?t.fetchPolicy=a:t.fetchPolicy=t.nextFetchPolicy)}return t.fetchPolicy},t.prototype.fetch=function(e,t){return this.queryManager.setObservableQuery(this),this.queryManager.fetchConcastWithInfo(this.queryId,e,t)},t.prototype.updatePolling=function(){var e=this;if(!this.queryManager.ssrMode){var t=this,n=t.pollingInfo,r=t.options.pollInterval;if(!r){n&&(clearTimeout(n.timeout),delete this.pollingInfo);return}if(!n||n.interval!==r){__DEV__?(0,Q.kG)(r,"Attempted to start a polling query without a polling interval."):(0,Q.kG)(r,13),(n||(this.pollingInfo={})).interval=r;var i=function(){e.pollingInfo&&((0,nZ.O)(e.queryInfo.networkStatus)?a():e.reobserve({fetchPolicy:"no-cache"===e.options.initialFetchPolicy?"no-cache":"network-only"},nZ.I.poll).then(a,a))},a=function(){var t=e.pollingInfo;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(i,t.interval))};a()}}},t.prototype.updateLastResult=function(e,t){return void 0===t&&(t=this.variables),this.last=(0,en.pi)((0,en.pi)({},this.last),{result:this.queryManager.assumeImmutableResults?e:nJ(e),variables:t}),(0,tP.O)(e.errors)||delete this.last.error,this.last},t.prototype.reobserveAsConcast=function(e,t){var n=this;this.isTornDown=!1;var r=t===nZ.I.refetch||t===nZ.I.fetchMore||t===nZ.I.poll,i=this.options.variables,a=this.options.fetchPolicy,o=(0,n1.o)(this.options,e||{}),s=r?o:n0(this.options,o);!r&&(this.updatePolling(),e&&e.variables&&!(0,nm.D)(e.variables,i)&&"standby"!==s.fetchPolicy&&s.fetchPolicy===a&&(this.applyNextFetchPolicy("variables-changed",s),void 0===t&&(t=nZ.I.setVariables))),this.waitForOwnResult&&(this.waitForOwnResult=n8(s.fetchPolicy));var u=function(){n.concast===f&&(n.waitForOwnResult=!1)},c=s.variables&&(0,en.pi)({},s.variables),l=this.fetch(s,t),f=l.concast,d=l.fromLink,h={next:function(e){u(),n.reportResult(e,c)},error:function(e){u(),n.reportError(e,c)}};return!r&&d&&(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=f,this.observer=h),f.addObserver(h),f},t.prototype.reobserve=function(e,t){return this.reobserveAsConcast(e,t).promise},t.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},t.prototype.reportResult=function(e,t){var n=this.getLastError();(n||this.isDifferentFromLastResult(e,t))&&((n||!e.partial||this.options.returnPartialData)&&this.updateLastResult(e,t),nW(this.observers,"next",e))},t.prototype.reportError=function(e,t){var n=(0,en.pi)((0,en.pi)({},this.getLastResult()),{error:e,errors:e.graphQLErrors,networkStatus:nZ.I.error,loading:!1});this.updateLastResult(n,t),nW(this.observers,"error",this.last.error=e)},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach(function(e){return e.unsubscribe()}),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t}(eT);function n4(e){var t=e.options,n=t.fetchPolicy,r=t.nextFetchPolicy;return"cache-and-network"===n||"network-only"===n?e.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(){return(this.nextFetchPolicy=r,"function"==typeof r)?r.apply(this,arguments):n}}):e.reobserve()}function n6(e){__DEV__&&Q.kG.error("Unhandled error",e.message,e.stack)}function n5(e){__DEV__&&e&&__DEV__&&Q.kG.debug("Missing cache result fields: ".concat(JSON.stringify(e)),e)}function n8(e){return"network-only"===e||"no-cache"===e||"standby"===e}nK(n3);function n9(e){return e.kind===nL.h.FIELD||e.kind===nL.h.FRAGMENT_SPREAD||e.kind===nL.h.INLINE_FRAGMENT}function n7(e){return e.kind===Kind.SCALAR_TYPE_DEFINITION||e.kind===Kind.OBJECT_TYPE_DEFINITION||e.kind===Kind.INTERFACE_TYPE_DEFINITION||e.kind===Kind.UNION_TYPE_DEFINITION||e.kind===Kind.ENUM_TYPE_DEFINITION||e.kind===Kind.INPUT_OBJECT_TYPE_DEFINITION}function re(e){return e.kind===Kind.SCALAR_TYPE_EXTENSION||e.kind===Kind.OBJECT_TYPE_EXTENSION||e.kind===Kind.INTERFACE_TYPE_EXTENSION||e.kind===Kind.UNION_TYPE_EXTENSION||e.kind===Kind.ENUM_TYPE_EXTENSION||e.kind===Kind.INPUT_OBJECT_TYPE_EXTENSION}var rt=function(){return Object.create(null)},rn=Array.prototype,rr=rn.forEach,ri=rn.slice,ra=function(){function e(e,t){void 0===e&&(e=!0),void 0===t&&(t=rt),this.weakness=e,this.makeData=t}return e.prototype.lookup=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.lookupArray(e)},e.prototype.lookupArray=function(e){var t=this;return rr.call(e,function(e){return t=t.getChildTrie(e)}),t.data||(t.data=this.makeData(ri.call(e)))},e.prototype.getChildTrie=function(t){var n=this.weakness&&ro(t)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),r=n.get(t);return r||n.set(t,r=new e(this.weakness,this.makeData)),r},e}();function ro(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}let rs=null,ru={},rc=1,rl=()=>class{constructor(){this.id=["slot",rc++,Date.now(),Math.random().toString(36).slice(2),].join(":")}hasValue(){for(let e=rs;e;e=e.parent)if(this.id in e.slots){let t=e.slots[this.id];if(t===ru)break;return e!==rs&&(rs.slots[this.id]=t),!0}return rs&&(rs.slots[this.id]=ru),!1}getValue(){if(this.hasValue())return rs.slots[this.id]}withValue(e,t,n,r){let i={__proto__:null,[this.id]:e},a=rs;rs={parent:a,slots:i};try{return t.apply(r,n)}finally{rs=a}}static bind(e){let t=rs;return function(){let n=rs;try{return rs=t,e.apply(this,arguments)}finally{rs=n}}}static noContext(e,t,n){if(!rs)return e.apply(n,t);{let r=rs;try{return rs=null,e.apply(n,t)}finally{rs=r}}}};function rf(e){try{return e()}catch(t){}}let rd="@wry/context:Slot",rh=rf(()=>globalThis)||rf(()=>global)||Object.create(null),rp=rh,rb=rp[rd]||Array[rd]||function(e){try{Object.defineProperty(rp,rd,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(rl()),{bind:rm,noContext:rg}=rb;function rv(){}var ry=function(){function e(e,t){void 0===e&&(e=1/0),void 0===t&&(t=rv),this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}return e.prototype.has=function(e){return this.map.has(e)},e.prototype.get=function(e){var t=this.getNode(e);return t&&t.value},e.prototype.getNode=function(e){var t=this.map.get(e);if(t&&t!==this.newest){var n=t.older,r=t.newer;r&&(r.older=n),n&&(n.newer=r),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=r)}return t},e.prototype.set=function(e,t){var n=this.getNode(e);return n?n.value=t:(n={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.map.set(e,n),n.value)},e.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},e.prototype.delete=function(e){var t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)},e}(),rw=new rb,r_=Object.prototype.hasOwnProperty,rE=void 0===(n=Array.from)?function(e){var t=[];return e.forEach(function(e){return t.push(e)}),t}:n;function rS(e){var t=e.unsubscribe;"function"==typeof t&&(e.unsubscribe=void 0,t())}var rk=[],rx=100;function rT(e,t){if(!e)throw Error(t||"assertion failure")}function rM(e,t){var n=e.length;return n>0&&n===t.length&&e[n-1]===t[n-1]}function rO(e){switch(e.length){case 0:throw Error("unknown value");case 1:return e[0];case 2:throw e[1]}}function rA(e){return e.slice(0)}var rL=function(){function e(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++e.count}return e.prototype.peek=function(){if(1===this.value.length&&!rN(this))return rC(this),this.value[0]},e.prototype.recompute=function(e){return rT(!this.recomputing,"already recomputing"),rC(this),rN(this)?rI(this,e):rO(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,rR(this),rS(this))},e.prototype.dispose=function(){var e=this;this.setDirty(),rH(this),rF(this,function(t,n){t.setDirty(),r$(t,e)})},e.prototype.forget=function(){this.dispose()},e.prototype.dependOn=function(e){e.add(this),this.deps||(this.deps=rk.pop()||new Set),this.deps.add(e)},e.prototype.forgetDeps=function(){var e=this;this.deps&&(rE(this.deps).forEach(function(t){return t.delete(e)}),this.deps.clear(),rk.push(this.deps),this.deps=null)},e.count=0,e}();function rC(e){var t=rw.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),rN(e)?rY(t,e):rB(t,e),t}function rI(e,t){return rH(e),rw.withValue(e,rD,[e,t]),rz(e,t)&&rP(e),rO(e.value)}function rD(e,t){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,t)}catch(n){e.value[1]=n}e.recomputing=!1}function rN(e){return e.dirty||!!(e.dirtyChildren&&e.dirtyChildren.size)}function rP(e){e.dirty=!1,!rN(e)&&rj(e)}function rR(e){rF(e,rY)}function rj(e){rF(e,rB)}function rF(e,t){var n=e.parents.size;if(n)for(var r=rE(e.parents),i=0;i<n;++i)t(r[i],e)}function rY(e,t){rT(e.childValues.has(t)),rT(rN(t));var n=!rN(e);if(e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=rk.pop()||new Set;e.dirtyChildren.add(t),n&&rR(e)}function rB(e,t){rT(e.childValues.has(t)),rT(!rN(t));var n=e.childValues.get(t);0===n.length?e.childValues.set(t,rA(t.value)):rM(n,t.value)||e.setDirty(),rU(e,t),!rN(e)&&rj(e)}function rU(e,t){var n=e.dirtyChildren;n&&(n.delete(t),0===n.size&&(rk.length<rx&&rk.push(n),e.dirtyChildren=null))}function rH(e){e.childValues.size>0&&e.childValues.forEach(function(t,n){r$(e,n)}),e.forgetDeps(),rT(null===e.dirtyChildren)}function r$(e,t){t.parents.delete(e),e.childValues.delete(t),rU(e,t)}function rz(e,t){if("function"==typeof e.subscribe)try{rS(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(n){return e.setDirty(),!1}return!0}var rG={setDirty:!0,dispose:!0,forget:!0};function rW(e){var t=new Map,n=e&&e.subscribe;function r(e){var r=rw.getValue();if(r){var i=t.get(e);i||t.set(e,i=new Set),r.dependOn(i),"function"==typeof n&&(rS(i),i.unsubscribe=n(e))}}return r.dirty=function(e,n){var r=t.get(e);if(r){var i=n&&r_.call(rG,n)?n:"setDirty";rE(r).forEach(function(e){return e[i]()}),t.delete(e),rS(r)}},r}function rK(){var e=new ra("function"==typeof WeakMap);return function(){return e.lookupArray(arguments)}}var rV=rK(),rq=new Set;function rZ(e,t){void 0===t&&(t=Object.create(null));var n=new ry(t.max||65536,function(e){return e.dispose()}),r=t.keyArgs,i=t.makeCacheKey||rK(),a=function(){var a=i.apply(null,r?r.apply(null,arguments):arguments);if(void 0===a)return e.apply(null,arguments);var o=n.get(a);o||(n.set(a,o=new rL(e)),o.subscribe=t.subscribe,o.forget=function(){return n.delete(a)});var s=o.recompute(Array.prototype.slice.call(arguments));return n.set(a,o),rq.add(n),rw.hasValue()||(rq.forEach(function(e){return e.clean()}),rq.clear()),s};function o(e){var t=n.get(e);t&&t.setDirty()}function s(e){var t=n.get(e);if(t)return t.peek()}function u(e){return n.delete(e)}return Object.defineProperty(a,"size",{get:function(){return n.map.size},configurable:!1,enumerable:!1}),a.dirtyKey=o,a.dirty=function(){o(i.apply(null,arguments))},a.peekKey=s,a.peek=function(){return s(i.apply(null,arguments))},a.forgetKey=u,a.forget=function(){return u(i.apply(null,arguments))},a.makeCacheKey=i,a.getKey=r?function(){return i.apply(null,r.apply(null,arguments))}:i,Object.freeze(a)}var rX=new rb,rJ=new WeakMap;function rQ(e){var t=rJ.get(e);return t||rJ.set(e,t={vars:new Set,dep:rW()}),t}function r1(e){rQ(e).vars.forEach(function(t){return t.forgetCache(e)})}function r0(e){rQ(e).vars.forEach(function(t){return t.attachCache(e)})}function r2(e){var t=new Set,n=new Set,r=function(a){if(arguments.length>0){if(e!==a){e=a,t.forEach(function(e){rQ(e).dep.dirty(r),r3(e)});var o=Array.from(n);n.clear(),o.forEach(function(t){return t(e)})}}else{var s=rX.getValue();s&&(i(s),rQ(s).dep(r))}return e};r.onNextChange=function(e){return n.add(e),function(){n.delete(e)}};var i=r.attachCache=function(e){return t.add(e),rQ(e).vars.add(r),r};return r.forgetCache=function(e){return t.delete(e)},r}function r3(e){e.broadcastWatches&&e.broadcastWatches()}var r4=function(){function e(e){var t=e.cache,n=e.client,r=e.resolvers,i=e.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=t,n&&(this.client=n),r&&this.addResolvers(r),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach(function(e){t.resolvers=tj(t.resolvers,e)}):this.resolvers=tj(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,n=e.remoteResult,r=e.context,i=e.variables,a=e.onlyRunForcedResolvers,o=void 0!==a&&a;return(0,en.mG)(this,void 0,void 0,function(){return(0,en.Jh)(this,function(e){return t?[2,this.resolveDocument(t,n.data,r,i,this.fragmentMatcher,o).then(function(e){return(0,en.pi)((0,en.pi)({},n),{data:e.result})})]:[2,n]})})},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return tb(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return n$(e)},e.prototype.prepareContext=function(e){var t=this.cache;return(0,en.pi)((0,en.pi)({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),(0,en.mG)(this,void 0,void 0,function(){return(0,en.Jh)(this,function(r){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(n),t).then(function(e){return(0,en.pi)((0,en.pi)({},t),e.exportedVariables)})]:[2,(0,en.pi)({},t)]})})},e.prototype.shouldForceResolvers=function(e){var t=!1;return tl(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some(function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value})))return tc}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:nH(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,n,r,i,a){return void 0===n&&(n={}),void 0===r&&(r={}),void 0===i&&(i=function(){return!0}),void 0===a&&(a=!1),(0,en.mG)(this,void 0,void 0,function(){var o,s,u,c,l,f,d,h,p,b,m;return(0,en.Jh)(this,function(g){return o=e8(e),s=e4(e),u=eL(s),c=this.collectSelectionsToResolve(o,u),f=(l=o.operation)?l.charAt(0).toUpperCase()+l.slice(1):"Query",d=this,h=d.cache,p=d.client,b={fragmentMap:u,context:(0,en.pi)((0,en.pi)({},n),{cache:h,client:p}),variables:r,fragmentMatcher:i,defaultOperationType:f,exportedVariables:{},selectionsToResolve:c,onlyRunForcedResolvers:a},m=!1,[2,this.resolveSelectionSet(o.selectionSet,m,t,b).then(function(e){return{result:e,exportedVariables:b.exportedVariables}})]})})},e.prototype.resolveSelectionSet=function(e,t,n,r){return(0,en.mG)(this,void 0,void 0,function(){var i,a,o,s,u,c=this;return(0,en.Jh)(this,function(l){return i=r.fragmentMap,a=r.context,o=r.variables,s=[n],u=function(e){return(0,en.mG)(c,void 0,void 0,function(){var u,c;return(0,en.Jh)(this,function(l){return(t||r.selectionsToResolve.has(e))&&td(e,o)?eQ(e)?[2,this.resolveField(e,t,n,r).then(function(t){var n;void 0!==t&&s.push(((n={})[eX(e)]=t,n))})]:(e1(e)?u=e:(u=i[e.name.value],__DEV__?(0,Q.kG)(u,"No fragment named ".concat(e.name.value)):(0,Q.kG)(u,11)),u&&u.typeCondition&&(c=u.typeCondition.name.value,r.fragmentMatcher(n,c,a)))?[2,this.resolveSelectionSet(u.selectionSet,t,n,r).then(function(e){s.push(e)})]:[2]:[2]})})},[2,Promise.all(e.selections.map(u)).then(function(){return tF(s)})]})})},e.prototype.resolveField=function(e,t,n,r){return(0,en.mG)(this,void 0,void 0,function(){var i,a,o,s,u,c,l,f,d,h=this;return(0,en.Jh)(this,function(p){return n?(i=r.variables,a=e.name.value,o=eX(e),s=a!==o,c=Promise.resolve(u=n[o]||n[a]),(!r.onlyRunForcedResolvers||this.shouldForceResolvers(e))&&(l=n.__typename||r.defaultOperationType,(f=this.resolvers&&this.resolvers[l])&&(d=f[s?a:o])&&(c=Promise.resolve(rX.withValue(this.cache,d,[n,eZ(e,i),r.context,{field:e,fragmentMap:r.fragmentMap},])))),[2,c.then(function(n){if(void 0===n&&(n=u),e.directives&&e.directives.forEach(function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach(function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(r.exportedVariables[e.value.value]=n)})}),!e.selectionSet||null==n)return n;var i,a,o=null!==(a=null===(i=e.directives)||void 0===i?void 0:i.some(function(e){return"client"===e.name.value}))&&void 0!==a&&a;return Array.isArray(n)?h.resolveSubSelectedArray(e,t||o,n,r):e.selectionSet?h.resolveSelectionSet(e.selectionSet,t||o,n,r):void 0})]):[2,null]})})},e.prototype.resolveSubSelectedArray=function(e,t,n,r){var i=this;return Promise.all(n.map(function(n){return null===n?null:Array.isArray(n)?i.resolveSubSelectedArray(e,t,n,r):e.selectionSet?i.resolveSelectionSet(e.selectionSet,t,n,r):void 0}))},e.prototype.collectSelectionsToResolve=function(e,t){var n=function(e){return!Array.isArray(e)},r=this.selectionsToResolveCache;function i(e){if(!r.has(e)){var a=new Set;r.set(e,a),tl(e,{Directive:function(e,t,r,i,o){"client"===e.name.value&&o.forEach(function(e){n(e)&&n9(e)&&a.add(e)})},FragmentSpread:function(e,r,o,s,u){var c=t[e.name.value];__DEV__?(0,Q.kG)(c,"No fragment named ".concat(e.name.value)):(0,Q.kG)(c,12);var l=i(c);l.size>0&&(u.forEach(function(e){n(e)&&n9(e)&&a.add(e)}),a.add(e),l.forEach(function(e){a.add(e)}))}})}return r.get(e)}return i(e)},e}(),r6=new(t_.mr?WeakMap:Map);function r5(e,t){var n=e[t];"function"==typeof n&&(e[t]=function(){return r6.set(e,(r6.get(e)+1)%1e15),n.apply(this,arguments)})}function r8(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var r9=function(){function e(e,t){void 0===t&&(t=e.generateQueryId()),this.queryId=t,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.subscriptions=new Set,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var n=this.cache=e.cache;r6.has(n)||(r6.set(n,0),r5(n,"evict"),r5(n,"modify"),r5(n,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||nZ.I.loading;return this.variables&&this.networkStatus!==nZ.I.loading&&!(0,nm.D)(this.variables,e.variables)&&(t=nZ.I.setVariables),(0,nm.D)(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.reset=function(){r8(this),this.dirty=!1},e.prototype.getDiff=function(e){void 0===e&&(e=this.variables);var t=this.getDiffOptions(e);if(this.lastDiff&&(0,nm.D)(t,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables=e);var n=this.observableQuery;if(n&&"no-cache"===n.options.fetchPolicy)return{complete:!1};var r=this.cache.diff(t);return this.updateLastDiff(r,t),r},e.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(e){var t;return void 0===e&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:null===(t=this.observableQuery)||void 0===t?void 0:t.options.canonizeResults}},e.prototype.setDiff=function(e){var t=this,n=this.lastDiff&&this.lastDiff.diff;this.updateLastDiff(e),this.dirty||(0,nm.D)(n&&n.result,e&&e.result)||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(function(){return t.notify()},0)))},e.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){t.getDiff().fromOptimisticTransaction?e.observe():n4(e)})):delete this.oqListener)},e.prototype.notify=function(){var e=this;r8(this),this.shouldNotify()&&this.listeners.forEach(function(t){return t(e)}),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if((0,nZ.O)(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if("cache-only"!==e&&"cache-and-network"!==e)return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel,this.subscriptions.forEach(function(e){return e.unsubscribe()});var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var n=this.observableQuery;if(!n||"no-cache"!==n.options.fetchPolicy){var r=(0,en.pi)((0,en.pi)({},this.getDiffOptions(e)),{watcher:this,callback:function(e){return t.setDiff(e)}});this.lastWatch&&(0,nm.D)(r,this.lastWatch)||(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=r))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(e,t){var n=this.lastWrite;return!(n&&n.dmCount===r6.get(this.cache)&&(0,nm.D)(t,n.variables)&&(0,nm.D)(e.data,n.result.data))},e.prototype.markResult=function(e,t,n,r){var i=this,a=new tB,o=(0,tP.O)(e.errors)?e.errors.slice(0):[];if(this.reset(),"incremental"in e&&(0,tP.O)(e.incremental)){var s=tG(this.getDiff().result,e);e.data=s}else if("hasNext"in e&&e.hasNext){var u=this.getDiff();e.data=a.merge(u.result,e.data)}this.graphQLErrors=o,"no-cache"===n.fetchPolicy?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(n.variables)):0!==r&&(r7(e,n.errorPolicy)?this.cache.performTransaction(function(a){if(i.shouldWrite(e,n.variables))a.writeQuery({query:t,data:e.data,variables:n.variables,overwrite:1===r}),i.lastWrite={result:e,variables:n.variables,dmCount:r6.get(i.cache)};else if(i.lastDiff&&i.lastDiff.diff.complete){e.data=i.lastDiff.diff.result;return}var o=i.getDiffOptions(n.variables),s=a.diff(o);i.stopped||i.updateWatch(n.variables),i.updateLastDiff(s,o),s.complete&&(e.data=s.result)}):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=nZ.I.ready},e.prototype.markError=function(e){return this.networkStatus=nZ.I.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function r7(e,t){void 0===t&&(t="none");var n="ignore"===t||"all"===t,r=!nO(e);return!r&&n&&e.data&&(r=!0),r}var ie=Object.prototype.hasOwnProperty,it=function(){function e(e){var t=e.cache,n=e.link,r=e.defaultOptions,i=e.queryDeduplication,a=void 0!==i&&i,o=e.onBroadcast,s=e.ssrMode,u=void 0!==s&&s,c=e.clientAwareness,l=void 0===c?{}:c,f=e.localState,d=e.assumeImmutableResults;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new(t_.mr?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map,this.cache=t,this.link=n,this.defaultOptions=r||Object.create(null),this.queryDeduplication=a,this.clientAwareness=l,this.localState=f||new r4({cache:t}),this.ssrMode=u,this.assumeImmutableResults=!!d,(this.onBroadcast=o)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var e=this;this.queries.forEach(function(t,n){e.stopQueryNoBroadcast(n)}),this.cancelPendingFetches(__DEV__?new Q.ej("QueryManager stopped while query was in flight"):new Q.ej(14))},e.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach(function(t){return t(e)}),this.fetchCancelFns.clear()},e.prototype.mutate=function(e){var t,n,r=e.mutation,i=e.variables,a=e.optimisticResponse,o=e.updateQueries,s=e.refetchQueries,u=void 0===s?[]:s,c=e.awaitRefetchQueries,l=void 0!==c&&c,f=e.update,d=e.onQueryUpdated,h=e.fetchPolicy,p=void 0===h?(null===(t=this.defaultOptions.mutate)||void 0===t?void 0:t.fetchPolicy)||"network-only":h,b=e.errorPolicy,m=void 0===b?(null===(n=this.defaultOptions.mutate)||void 0===n?void 0:n.errorPolicy)||"none":b,g=e.keepRootFields,v=e.context;return(0,en.mG)(this,void 0,void 0,function(){var e,t,n,s,c,h;return(0,en.Jh)(this,function(b){switch(b.label){case 0:if(__DEV__?(0,Q.kG)(r,"mutation option is required. You must specify your GraphQL document in the mutation option."):(0,Q.kG)(r,15),__DEV__?(0,Q.kG)("network-only"===p||"no-cache"===p,"Mutations support only 'network-only' or 'no-cache' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write."):(0,Q.kG)("network-only"===p||"no-cache"===p,16),e=this.generateMutationId(),n=(t=this.transform(r)).document,s=t.hasClientExports,r=this.cache.transformForLink(n),i=this.getVariables(r,i),!s)return[3,2];return[4,this.localState.addExportedVariables(r,i,v)];case 1:i=b.sent(),b.label=2;case 2:return c=this.mutationStore&&(this.mutationStore[e]={mutation:r,variables:i,loading:!0,error:null}),a&&this.markMutationOptimistic(a,{mutationId:e,document:r,variables:i,fetchPolicy:p,errorPolicy:m,context:v,updateQueries:o,update:f,keepRootFields:g}),this.broadcastQueries(),h=this,[2,new Promise(function(t,n){return nM(h.getObservableFromLink(r,(0,en.pi)((0,en.pi)({},v),{optimisticResponse:a}),i,!1),function(t){if(nO(t)&&"none"===m)throw new tN.cA({graphQLErrors:nA(t)});c&&(c.loading=!1,c.error=null);var n=(0,en.pi)({},t);return"function"==typeof u&&(u=u(n)),"ignore"===m&&nO(n)&&delete n.errors,h.markMutationResult({mutationId:e,result:n,document:r,variables:i,fetchPolicy:p,errorPolicy:m,context:v,update:f,updateQueries:o,awaitRefetchQueries:l,refetchQueries:u,removeOptimistic:a?e:void 0,onQueryUpdated:d,keepRootFields:g})}).subscribe({next:function(e){h.broadcastQueries(),"hasNext"in e&&!1!==e.hasNext||t(e)},error:function(t){c&&(c.loading=!1,c.error=t),a&&h.cache.removeOptimistic(e),h.broadcastQueries(),n(t instanceof tN.cA?t:new tN.cA({networkError:t}))}})})]}})})},e.prototype.markMutationResult=function(e,t){var n=this;void 0===t&&(t=this.cache);var r=e.result,i=[],a="no-cache"===e.fetchPolicy;if(!a&&r7(r,e.errorPolicy)){if(tU(r)||i.push({result:r.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}),tU(r)&&(0,tP.O)(r.incremental)){var o=t.diff({id:"ROOT_MUTATION",query:this.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0}),s=void 0;o.result&&(s=tG(o.result,r)),void 0!==s&&(r.data=s,i.push({result:s,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}))}var u=e.updateQueries;u&&this.queries.forEach(function(e,a){var o=e.observableQuery,s=o&&o.queryName;if(s&&ie.call(u,s)){var c,l=u[s],f=n.queries.get(a),d=f.document,h=f.variables,p=t.diff({query:d,variables:h,returnPartialData:!0,optimistic:!1}),b=p.result;if(p.complete&&b){var m=l(b,{mutationResult:r,queryName:d&&e3(d)||void 0,queryVariables:h});m&&i.push({result:m,dataId:"ROOT_QUERY",query:d,variables:h})}}})}if(i.length>0||e.refetchQueries||e.update||e.onQueryUpdated||e.removeOptimistic){var c=[];if(this.refetchQueries({updateCache:function(t){a||i.forEach(function(e){return t.write(e)});var o=e.update,s=!t$(r)||tU(r)&&!r.hasNext;if(o){if(!a){var u=t.diff({id:"ROOT_MUTATION",query:n.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});u.complete&&("incremental"in(r=(0,en.pi)((0,en.pi)({},r),{data:u.result}))&&delete r.incremental,"hasNext"in r&&delete r.hasNext)}s&&o(t,r,{context:e.context,variables:e.variables})}a||e.keepRootFields||!s||t.modify({id:"ROOT_MUTATION",fields:function(e,t){var n=t.fieldName,r=t.DELETE;return"__typename"===n?e:r}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach(function(e){return c.push(e)}),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(c).then(function(){return r})}return Promise.resolve(r)},e.prototype.markMutationOptimistic=function(e,t){var n=this,r="function"==typeof e?e(t.variables):e;return this.cache.recordOptimisticTransaction(function(e){try{n.markMutationResult((0,en.pi)((0,en.pi)({},t),{result:{data:r}}),e)}catch(i){__DEV__&&Q.kG.error(i)}},t.mutationId)},e.prototype.fetchQuery=function(e,t,n){return this.fetchQueryObservable(e,t,n).promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach(function(t,n){e[n]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}}),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){var t=this.transformCache;if(!t.has(e)){var n=this.cache.transformDocument(e),r=nY(n),i=this.localState.clientQuery(n),a=r&&this.localState.serverQuery(r),o={document:n,hasClientExports:tm(n),hasForcedResolvers:this.localState.shouldForceResolvers(n),clientQuery:i,serverQuery:a,defaultVars:e9(e2(n)),asQuery:(0,en.pi)((0,en.pi)({},n),{definitions:n.definitions.map(function(e){return"OperationDefinition"===e.kind&&"query"!==e.operation?(0,en.pi)((0,en.pi)({},e),{operation:"query"}):e})})},s=function(e){e&&!t.has(e)&&t.set(e,o)};s(e),s(n),s(i),s(a)}return t.get(e)},e.prototype.getVariables=function(e,t){return(0,en.pi)((0,en.pi)({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e){void 0===(e=(0,en.pi)((0,en.pi)({},e),{variables:this.getVariables(e.query,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var t=new r9(this),n=new n3({queryManager:this,queryInfo:t,options:e});return this.queries.set(n.queryId,t),t.init({document:n.query,observableQuery:n,variables:n.variables}),n},e.prototype.query=function(e,t){var n=this;return void 0===t&&(t=this.generateQueryId()),__DEV__?(0,Q.kG)(e.query,"query option is required. You must specify your GraphQL document in the query option."):(0,Q.kG)(e.query,17),__DEV__?(0,Q.kG)("Document"===e.query.kind,'You must wrap the query string in a "gql" tag.'):(0,Q.kG)("Document"===e.query.kind,18),__DEV__?(0,Q.kG)(!e.returnPartialData,"returnPartialData option only supported on watchQuery."):(0,Q.kG)(!e.returnPartialData,19),__DEV__?(0,Q.kG)(!e.pollInterval,"pollInterval option only supported on watchQuery."):(0,Q.kG)(!e.pollInterval,20),this.fetchQuery(t,e).finally(function(){return n.stopQuery(t)})},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(e){return void 0===e&&(e={discardWatches:!0}),this.cancelPendingFetches(__DEV__?new Q.ej("Store reset while query was in flight (not completed in link chain)"):new Q.ej(21)),this.queries.forEach(function(e){e.observableQuery?e.networkStatus=nZ.I.loading:e.stop()}),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},e.prototype.getObservableQueries=function(e){var t=this;void 0===e&&(e="active");var n=new Map,r=new Map,i=new Set;return Array.isArray(e)&&e.forEach(function(e){"string"==typeof e?r.set(e,!1):eN(e)?r.set(t.transform(e).document,!1):(0,eO.s)(e)&&e.query&&i.add(e)}),this.queries.forEach(function(t,i){var a=t.observableQuery,o=t.document;if(a){if("all"===e){n.set(i,a);return}var s=a.queryName;if("standby"===a.options.fetchPolicy||"active"===e&&!a.hasObservers())return;("active"===e||s&&r.has(s)||o&&r.has(o))&&(n.set(i,a),s&&r.set(s,!0),o&&r.set(o,!0))}}),i.size&&i.forEach(function(e){var r=nG("legacyOneTimeQuery"),i=t.getQuery(r).init({document:e.query,variables:e.variables}),a=new n3({queryManager:t,queryInfo:i,options:(0,en.pi)((0,en.pi)({},e),{fetchPolicy:"network-only"})});(0,Q.kG)(a.queryId===r),i.setObservableQuery(a),n.set(r,a)}),__DEV__&&r.size&&r.forEach(function(e,t){!e&&__DEV__&&Q.kG.warn("Unknown query ".concat("string"==typeof t?"named ":"").concat(JSON.stringify(t,null,2)," requested in refetchQueries options.include array"))}),n},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var n=[];return this.getObservableQueries(e?"all":"active").forEach(function(r,i){var a=r.options.fetchPolicy;r.resetLastResults(),(e||"standby"!==a&&"cache-only"!==a)&&n.push(r.refetch()),t.getQuery(i).setDiff(null)}),this.broadcastQueries(),Promise.all(n)},e.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},e.prototype.startGraphQLSubscription=function(e){var t=this,n=e.query,r=e.fetchPolicy,i=e.errorPolicy,a=e.variables,o=e.context,s=void 0===o?{}:o;n=this.transform(n).document,a=this.getVariables(n,a);var u=function(e){return t.getObservableFromLink(n,s,e).map(function(a){"no-cache"!==r&&(r7(a,i)&&t.cache.write({query:n,result:a.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries());var o=nO(a),s=(0,tN.ls)(a);if(o||s){var u={};throw o&&(u.graphQLErrors=a.errors),s&&(u.protocolErrors=a.extensions[tN.YG]),new tN.cA(u)}return a})};if(this.transform(n).hasClientExports){var c=this.localState.addExportedVariables(n,a,s).then(u);return new eT(function(e){var t=null;return c.then(function(n){return t=n.subscribe(e)},e.error),function(){return t&&t.unsubscribe()}})}return u(a)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.queries.has(e)&&(this.getQuery(e).stop(),this.queries.delete(e))},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach(function(e){return e.notify()})},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,n,r){var i,a,o=this;void 0===r&&(r=null!==(i=null==t?void 0:t.queryDeduplication)&&void 0!==i?i:this.queryDeduplication);var s=this.transform(e).serverQuery;if(s){var u=this,c=u.inFlightLinkObservables,l=u.link,f={query:s,variables:n,operationName:e3(s)||void 0,context:this.prepareContext((0,en.pi)((0,en.pi)({},t),{forceFetch:!r}))};if(t=f.context,r){var d=c.get(s)||new Map;c.set(s,d);var h=nx(n);if(!(a=d.get(h))){var p=new nq([np(l,f)]);d.set(h,a=p),p.beforeNext(function(){d.delete(h)&&d.size<1&&c.delete(s)})}}else a=new nq([np(l,f)])}else a=new nq([eT.of({data:{}})]),t=this.prepareContext(t);var b=this.transform(e).clientQuery;return b&&(a=nM(a,function(e){return o.localState.runResolvers({document:b,remoteResult:e,context:t,variables:n})})),a},e.prototype.getResultsFromLink=function(e,t,n){var r=e.lastRequestId=this.generateRequestId(),i=this.cache.transformForLink(this.transform(e.document).document);return nM(this.getObservableFromLink(i,n.context,n.variables),function(a){var o=nA(a),s=o.length>0;if(r>=e.lastRequestId){if(s&&"none"===n.errorPolicy)throw e.markError(new tN.cA({graphQLErrors:o}));e.markResult(a,i,n,t),e.markReady()}var u={data:a.data,loading:!1,networkStatus:nZ.I.ready};return s&&"ignore"!==n.errorPolicy&&(u.errors=o,u.networkStatus=nZ.I.error),u},function(t){var n=(0,tN.MS)(t)?t:new tN.cA({networkError:t});throw r>=e.lastRequestId&&e.markError(n),n})},e.prototype.fetchQueryObservable=function(e,t,n){return this.fetchConcastWithInfo(e,t,n).concast},e.prototype.fetchConcastWithInfo=function(e,t,n){var r,i,a=this;void 0===n&&(n=nZ.I.loading);var o=this.transform(t.query).document,s=this.getVariables(o,t.variables),u=this.getQuery(e),c=this.defaultOptions.watchQuery,l=t.fetchPolicy,f=void 0===l?c&&c.fetchPolicy||"cache-first":l,d=t.errorPolicy,h=void 0===d?c&&c.errorPolicy||"none":d,p=t.returnPartialData,b=void 0!==p&&p,m=t.notifyOnNetworkStatusChange,g=void 0!==m&&m,v=t.context,y=void 0===v?{}:v,w=Object.assign({},t,{query:o,variables:s,fetchPolicy:f,errorPolicy:h,returnPartialData:b,notifyOnNetworkStatusChange:g,context:y}),_=function(e){w.variables=e;var r=a.fetchQueryByPolicy(u,w,n);return"standby"!==w.fetchPolicy&&r.sources.length>0&&u.observableQuery&&u.observableQuery.applyNextFetchPolicy("after-fetch",t),r},E=function(){return a.fetchCancelFns.delete(e)};if(this.fetchCancelFns.set(e,function(e){E(),setTimeout(function(){return r.cancel(e)})}),this.transform(w.query).hasClientExports)r=new nq(this.localState.addExportedVariables(w.query,w.variables,w.context).then(_).then(function(e){return e.sources})),i=!0;else{var S=_(w.variables);i=S.fromLink,r=new nq(S.sources)}return r.promise.then(E,E),{concast:r,fromLink:i}},e.prototype.refetchQueries=function(e){var t=this,n=e.updateCache,r=e.include,i=e.optimistic,a=void 0!==i&&i,o=e.removeOptimistic,s=void 0===o?a?nG("refetchQueries"):void 0:o,u=e.onQueryUpdated,c=new Map;r&&this.getObservableQueries(r).forEach(function(e,n){c.set(n,{oq:e,lastDiff:t.getQuery(n).getDiff()})});var l=new Map;return n&&this.cache.batch({update:n,optimistic:a&&s||!1,removeOptimistic:s,onWatchUpdated:function(e,t,n){var r=e.watcher instanceof r9&&e.watcher.observableQuery;if(r){if(u){c.delete(r.queryId);var i=u(r,t,n);return!0===i&&(i=r.refetch()),!1!==i&&l.set(r,i),i}null!==u&&c.set(r.queryId,{oq:r,lastDiff:n,diff:t})}}}),c.size&&c.forEach(function(e,n){var r,i=e.oq,a=e.lastDiff,o=e.diff;if(u){if(!o){var s=i.queryInfo;s.reset(),o=s.getDiff()}r=u(i,o,a)}u&&!0!==r||(r=i.refetch()),!1!==r&&l.set(i,r),n.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(n)}),s&&this.cache.removeOptimistic(s),l},e.prototype.fetchQueryByPolicy=function(e,t,n){var r=this,i=t.query,a=t.variables,o=t.fetchPolicy,s=t.refetchWritePolicy,u=t.errorPolicy,c=t.returnPartialData,l=t.context,f=t.notifyOnNetworkStatusChange,d=e.networkStatus;e.init({document:this.transform(i).document,variables:a,networkStatus:n});var h=function(){return e.getDiff(a)},p=function(t,n){void 0===n&&(n=e.networkStatus||nZ.I.loading);var o=t.result;!__DEV__||c||(0,nm.D)(o,{})||n5(t.missing);var s=function(e){return eT.of((0,en.pi)({data:e,loading:(0,nZ.O)(n),networkStatus:n},t.complete?null:{partial:!0}))};return o&&r.transform(i).hasForcedResolvers?r.localState.runResolvers({document:i,remoteResult:{data:o},context:l,variables:a,onlyRunForcedResolvers:!0}).then(function(e){return s(e.data||void 0)}):"none"===u&&n===nZ.I.refetch&&Array.isArray(t.missing)?s(void 0):s(o)},b="no-cache"===o?0:n===nZ.I.refetch&&"merge"!==s?1:2,m=function(){return r.getResultsFromLink(e,b,{variables:a,context:l,fetchPolicy:o,errorPolicy:u})},g=f&&"number"==typeof d&&d!==n&&(0,nZ.O)(n);switch(o){default:case"cache-first":var v=h();if(v.complete)return{fromLink:!1,sources:[p(v,e.markReady())]};if(c||g)return{fromLink:!0,sources:[p(v),m()]};return{fromLink:!0,sources:[m()]};case"cache-and-network":var v=h();if(v.complete||c||g)return{fromLink:!0,sources:[p(v),m()]};return{fromLink:!0,sources:[m()]};case"cache-only":return{fromLink:!1,sources:[p(h(),e.markReady())]};case"network-only":if(g)return{fromLink:!0,sources:[p(h()),m()]};return{fromLink:!0,sources:[m()]};case"no-cache":if(g)return{fromLink:!0,sources:[p(e.getDiff()),m(),]};return{fromLink:!0,sources:[m()]};case"standby":return{fromLink:!1,sources:[]}}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new r9(this,e)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return(0,en.pi)((0,en.pi)({},t),{clientAwareness:this.clientAwareness})},e}(),ir=__webpack_require__(14012),ii=!1,ia=function(){function e(e){var t=this;this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var n=e.uri,r=e.credentials,i=e.headers,a=e.cache,o=e.ssrMode,s=void 0!==o&&o,u=e.ssrForceFetchDelay,c=void 0===u?0:u,l=e.connectToDevTools,f=void 0===l?"object"==typeof window&&!window.__APOLLO_CLIENT__&&__DEV__:l,d=e.queryDeduplication,h=void 0===d||d,p=e.defaultOptions,b=e.assumeImmutableResults,m=void 0!==b&&b,g=e.resolvers,v=e.typeDefs,y=e.fragmentMatcher,w=e.name,_=e.version,E=e.link;if(E||(E=n?new nh({uri:n,credentials:r,headers:i}):ta.empty()),!a)throw __DEV__?new Q.ej("To initialize Apollo Client, you must specify a 'cache' property in the options object. \nFor more information, please visit: https://go.apollo.dev/c/docs"):new Q.ej(9);if(this.link=E,this.cache=a,this.disableNetworkFetches=s||c>0,this.queryDeduplication=h,this.defaultOptions=p||Object.create(null),this.typeDefs=v,c&&setTimeout(function(){return t.disableNetworkFetches=!1},c),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),f&&"object"==typeof window&&(window.__APOLLO_CLIENT__=this),!ii&&f&&__DEV__&&(ii=!0,"undefined"!=typeof window&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__)){var S=window.navigator,k=S&&S.userAgent,x=void 0;"string"==typeof k&&(k.indexOf("Chrome/")>-1?x="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":k.indexOf("Firefox/")>-1&&(x="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),x&&__DEV__&&Q.kG.log("Download the Apollo DevTools for a better development experience: "+x)}this.version=nb,this.localState=new r4({cache:a,client:this,resolvers:g,fragmentMatcher:y}),this.queryManager=new it({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,queryDeduplication:h,ssrMode:s,clientAwareness:{name:w,version:_},localState:this.localState,assumeImmutableResults:m,onBroadcast:f?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=(0,ir.J)(this.defaultOptions.watchQuery,e)),this.disableNetworkFetches&&("network-only"===e.fetchPolicy||"cache-and-network"===e.fetchPolicy)&&(e=(0,en.pi)((0,en.pi)({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=(0,ir.J)(this.defaultOptions.query,e)),__DEV__?(0,Q.kG)("cache-and-network"!==e.fetchPolicy,"The cache-and-network fetchPolicy does not work with client.query, because client.query can only return a single result. Please use client.watchQuery to receive multiple results from the cache and the network, or consider using a different fetchPolicy, such as cache-first or network-only."):(0,Q.kG)("cache-and-network"!==e.fetchPolicy,10),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=(0,en.pi)((0,en.pi)({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=(0,ir.J)(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){var t=this.cache.writeQuery(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t},e.prototype.writeFragment=function(e){var t=this.cache.writeFragment(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return np(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!1})}).then(function(){return Promise.all(e.resetStoreCallbacks.map(function(e){return e()}))}).then(function(){return e.reFetchObservableQueries()})},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!0})}).then(function(){return Promise.all(e.clearStoreCallbacks.map(function(e){return e()}))})},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter(function(t){return t!==e})}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter(function(t){return t!==e})}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),n=[],r=[];t.forEach(function(e,t){n.push(t),r.push(e)});var i=Promise.all(r);return i.queries=n,i.results=r,i.catch(function(e){__DEV__&&Q.kG.debug("In client.refetchQueries, Promise.all promise rejected with error ".concat(e))}),i},e.prototype.getObservableQueries=function(e){return void 0===e&&(e="active"),this.queryManager.getObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e.prototype.setLink=function(e){this.link=this.queryManager.link=e},e}(),io=function(){function e(){this.getFragmentDoc=rZ(eA)}return e.prototype.batch=function(e){var t,n=this,r="string"==typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;return this.performTransaction(function(){return t=e.update(n)},r),t},e.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},e.prototype.transformDocument=function(e){return e},e.prototype.transformForLink=function(e){return e},e.prototype.identify=function(e){},e.prototype.gc=function(){return[]},e.prototype.modify=function(e){return!1},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,en.pi)((0,en.pi)({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,en.pi)((0,en.pi)({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))},e.prototype.writeQuery=function(e){var t=e.id,n=e.data,r=(0,en._T)(e,["id","data"]);return this.write(Object.assign(r,{dataId:t||"ROOT_QUERY",result:n}))},e.prototype.writeFragment=function(e){var t=e.id,n=e.data,r=e.fragment,i=e.fragmentName,a=(0,en._T)(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(a,{query:this.getFragmentDoc(r,i),dataId:t,result:n}))},e.prototype.updateQuery=function(e,t){return this.batch({update:function(n){var r=n.readQuery(e),i=t(r);return null==i?r:(n.writeQuery((0,en.pi)((0,en.pi)({},e),{data:i})),i)}})},e.prototype.updateFragment=function(e,t){return this.batch({update:function(n){var r=n.readFragment(e),i=t(r);return null==i?r:(n.writeFragment((0,en.pi)((0,en.pi)({},e),{data:i})),i)}})},e}(),is=function(e){function t(n,r,i,a){var o,s=e.call(this,n)||this;if(s.message=n,s.path=r,s.query=i,s.variables=a,Array.isArray(s.path)){s.missing=s.message;for(var u=s.path.length-1;u>=0;--u)s.missing=((o={})[s.path[u]]=s.missing,o)}else s.missing=s.path;return s.__proto__=t.prototype,s}return(0,en.ZT)(t,e),t}(Error),iu=__webpack_require__(10542),ic=Object.prototype.hasOwnProperty;function il(e){return null==e}function id(e,t){var n=e.__typename,r=e.id,i=e._id;if("string"==typeof n&&(t&&(t.keyObject=il(r)?il(i)?void 0:{_id:i}:{id:r}),il(r)&&!il(i)&&(r=i),!il(r)))return"".concat(n,":").concat("number"==typeof r||"string"==typeof r?r:JSON.stringify(r))}var ih={dataIdFromObject:id,addTypename:!0,resultCaching:!0,canonizeResults:!1};function ip(e){return(0,n1.o)(ih,e)}function ib(e){var t=e.canonizeResults;return void 0===t?ih.canonizeResults:t}function im(e,t){return eD(t)?e.get(t.__ref,"__typename"):t&&t.__typename}var ig=/^[_a-z][_0-9a-z]*/i;function iv(e){var t=e.match(ig);return t?t[0]:e}function iy(e,t,n){return!!(0,eO.s)(t)&&((0,tP.k)(t)?t.every(function(t){return iy(e,t,n)}):e.selections.every(function(e){if(eQ(e)&&td(e,n)){var r=eX(e);return ic.call(t,r)&&(!e.selectionSet||iy(e.selectionSet,t[r],n))}return!0}))}function iw(e){return(0,eO.s)(e)&&!eD(e)&&!(0,tP.k)(e)}function i_(){return new tB}function iE(e,t){var n=eL(e4(e));return{fragmentMap:n,lookupFragment:function(e){var r=n[e];return!r&&t&&(r=t.lookup(e)),r||null}}}var iS=Object.create(null),ik=function(){return iS},ix=Object.create(null),iT=function(){function e(e,t){var n=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(e,t){return(0,iu.J)(eD(e)?n.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return eD(e)?n.has(e.__ref):"object"==typeof e},this.toReference=function(e,t){if("string"==typeof e)return eI(e);if(eD(e))return e;var r=n.policies.identify(e)[0];if(r){var i=eI(r);return t&&n.merge(r,e),i}}}return e.prototype.toObject=function(){return(0,en.pi)({},this.data)},e.prototype.has=function(e){return void 0!==this.lookup(e,!0)},e.prototype.get=function(e,t){if(this.group.depend(e,t),ic.call(this.data,e)){var n=this.data[e];if(n&&ic.call(n,t))return n[t]}return"__typename"===t&&ic.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof iL?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return(t&&this.group.depend(e,"__exists"),ic.call(this.data,e))?this.data[e]:this instanceof iL?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var n,r=this;eD(e)&&(e=e.__ref),eD(t)&&(t=t.__ref);var i="string"==typeof e?this.lookup(n=e):e,a="string"==typeof t?this.lookup(n=t):t;if(a){__DEV__?(0,Q.kG)("string"==typeof n,"store.merge expects a string ID"):(0,Q.kG)("string"==typeof n,1);var o=new tB(iI).merge(i,a);if(this.data[n]=o,o!==i&&(delete this.refs[n],this.group.caching)){var s=Object.create(null);i||(s.__exists=1),Object.keys(a).forEach(function(e){if(!i||i[e]!==o[e]){s[e]=1;var t=iv(e);t===e||r.policies.hasKeyArgs(o.__typename,t)||(s[t]=1),void 0!==o[e]||r instanceof iL||delete o[e]}}),s.__typename&&!(i&&i.__typename)&&this.policies.rootTypenamesById[n]===o.__typename&&delete s.__typename,Object.keys(s).forEach(function(e){return r.group.dirty(n,e)})}}},e.prototype.modify=function(e,t){var n=this,r=this.lookup(e);if(r){var i=Object.create(null),a=!1,o=!0,s={DELETE:iS,INVALIDATE:ix,isReference:eD,toReference:this.toReference,canRead:this.canRead,readField:function(t,r){return n.policies.readField("string"==typeof t?{fieldName:t,from:r||eI(e)}:t,{store:n})}};if(Object.keys(r).forEach(function(u){var c=iv(u),l=r[u];if(void 0!==l){var f="function"==typeof t?t:t[u]||t[c];if(f){var d=f===ik?iS:f((0,iu.J)(l),(0,en.pi)((0,en.pi)({},s),{fieldName:c,storeFieldName:u,storage:n.getStorage(e,u)}));d===ix?n.group.dirty(e,u):(d===iS&&(d=void 0),d!==l&&(i[u]=d,a=!0,l=d))}void 0!==l&&(o=!1)}}),a)return this.merge(e,i),o&&(this instanceof iL?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},e.prototype.delete=function(e,t,n){var r,i=this.lookup(e);if(i){var a=this.getFieldValue(i,"__typename"),o=t&&n?this.policies.getStoreFieldName({typename:a,fieldName:t,args:n}):t;return this.modify(e,o?((r={})[o]=ik,r):ik)}return!1},e.prototype.evict=function(e,t){var n=!1;return e.id&&(ic.call(this.data,e.id)&&(n=this.delete(e.id,e.fieldName,e.args)),this instanceof iL&&this!==t&&(n=this.parent.evict(e,t)||n),(e.fieldName||n)&&this.group.dirty(e.id,e.fieldName||"__exists")),n},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var e=this,t=this.toObject(),n=[];return this.getRootIdSet().forEach(function(t){ic.call(e.policies.rootTypenamesById,t)||n.push(t)}),n.length&&(t.__META={extraRootIds:n.sort()}),t},e.prototype.replace=function(e){var t=this;if(Object.keys(this.data).forEach(function(n){e&&ic.call(e,n)||t.delete(n)}),e){var n=e.__META,r=(0,en._T)(e,["__META"]);Object.keys(r).forEach(function(e){t.merge(e,r[e])}),n&&n.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},e.prototype.release=function(e){if(this.rootIds[e]>0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof iL?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),n=this.toObject();t.forEach(function(r){ic.call(n,r)&&(Object.keys(e.findChildRefIds(r)).forEach(t.add,t),delete n[r])});var r=Object.keys(n);if(r.length){for(var i=this;i instanceof iL;)i=i.parent;r.forEach(function(e){return i.delete(e)})}return r},e.prototype.findChildRefIds=function(e){if(!ic.call(this.refs,e)){var t=this.refs[e]=Object.create(null),n=this.data[e];if(!n)return t;var r=new Set([n]);r.forEach(function(e){eD(e)&&(t[e.__ref]=!0),(0,eO.s)(e)&&Object.keys(e).forEach(function(t){var n=e[t];(0,eO.s)(n)&&r.add(n)})})}return this.refs[e]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),iM=function(){function e(e,t){void 0===t&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?rW():null,this.keyMaker=new n_(t_.mr)},e.prototype.depend=function(e,t){if(this.d){this.d(iO(e,t));var n=iv(t);n!==t&&this.d(iO(e,n)),this.parent&&this.parent.depend(e,t)}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty(iO(e,t),"__exists"===t?"forget":"setDirty")},e}();function iO(e,t){return t+"#"+e}function iA(e,t){iD(e)&&e.group.depend(t,"__exists")}!function(e){var t=function(e){function t(t){var n=t.policies,r=t.resultCaching,i=void 0===r||r,a=t.seed,o=e.call(this,n,new iM(i))||this;return o.stump=new iC(o),o.storageTrie=new n_(t_.mr),a&&o.replace(a),o}return(0,en.ZT)(t,e),t.prototype.addLayer=function(e,t){return this.stump.addLayer(e,t)},t.prototype.removeLayer=function(){return this},t.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},t}(e);e.Root=t}(iT||(iT={}));var iL=function(e){function t(t,n,r,i){var a=e.call(this,n.policies,i)||this;return a.id=t,a.parent=n,a.replay=r,a.group=i,r(a),a}return(0,en.ZT)(t,e),t.prototype.addLayer=function(e,n){return new t(e,this,n,this.group)},t.prototype.removeLayer=function(e){var t=this,n=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach(function(e){var r=t.data[e],i=n.lookup(e);i?r?r!==i&&Object.keys(r).forEach(function(n){(0,nm.D)(r[n],i[n])||t.group.dirty(e,n)}):(t.group.dirty(e,"__exists"),Object.keys(i).forEach(function(n){t.group.dirty(e,n)})):t.delete(e)}),n):n===this.parent?this:n.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return(0,en.pi)((0,en.pi)({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var n=this.parent.findChildRefIds(t);return ic.call(this.data,t)?(0,en.pi)((0,en.pi)({},n),e.prototype.findChildRefIds.call(this,t)):n},t.prototype.getStorage=function(){for(var e=this.parent;e.parent;)e=e.parent;return e.getStorage.apply(e,arguments)},t}(iT),iC=function(e){function t(t){return e.call(this,"EntityStore.Stump",t,function(){},new iM(t.group.caching,t.group))||this}return(0,en.ZT)(t,e),t.prototype.removeLayer=function(){return this},t.prototype.merge=function(){return this.parent.merge.apply(this.parent,arguments)},t}(iL);function iI(e,t,n){var r=e[n],i=t[n];return(0,nm.D)(r,i)?r:i}function iD(e){return!!(e instanceof iT&&e.group.caching)}function iN(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults,]}var iP=function(){function e(e){var t=this;this.knownResults=new(t_.mr?WeakMap:Map),this.config=(0,n1.o)(e,{addTypename:!1!==e.addTypename,canonizeResults:ib(e)}),this.canon=e.canon||new nk,this.executeSelectionSet=rZ(function(e){var n,r=e.context.canonizeResults,i=iN(e);i[3]=!r;var a=(n=t.executeSelectionSet).peek.apply(n,i);return a?r?(0,en.pi)((0,en.pi)({},a),{result:t.canon.admit(a.result)}):a:(iA(e.context.store,e.enclosingRef.__ref),t.execSelectionSetImpl(e))},{max:this.config.resultCacheMaxSize,keyArgs:iN,makeCacheKey:function(e,t,n,r){if(iD(n.store))return n.store.makeCacheKey(e,eD(t)?t.__ref:t,n.varString,r)}}),this.executeSubSelectedArray=rZ(function(e){return iA(e.context.store,e.enclosingRef.__ref),t.execSubSelectedArrayImpl(e)},{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var t=e.field,n=e.array,r=e.context;if(iD(r.store))return r.store.makeCacheKey(t,n,r.varString)}})}return e.prototype.resetCanon=function(){this.canon=new nk},e.prototype.diffQueryAgainstStore=function(e){var t,n=e.store,r=e.query,i=e.rootId,a=void 0===i?"ROOT_QUERY":i,o=e.variables,s=e.returnPartialData,u=void 0===s||s,c=e.canonizeResults,l=void 0===c?this.config.canonizeResults:c,f=this.config.cache.policies;o=(0,en.pi)((0,en.pi)({},e9(e6(r))),o);var d=eI(a),h=this.executeSelectionSet({selectionSet:e8(r).selectionSet,objectOrReference:d,enclosingRef:d,context:(0,en.pi)({store:n,query:r,policies:f,variables:o,varString:nx(o),canonizeResults:l},iE(r,this.config.fragments))});if(h.missing&&(t=[new is(iR(h.missing),h.missing,r,o)],!u))throw t[0];return{result:h.result,complete:!t,missing:t}},e.prototype.isFresh=function(e,t,n,r){if(iD(r.store)&&this.knownResults.get(e)===n){var i=this.executeSelectionSet.peek(n,t,r,this.canon.isKnown(e));if(i&&e===i.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t,n=this,r=e.selectionSet,i=e.objectOrReference,a=e.enclosingRef,o=e.context;if(eD(i)&&!o.policies.rootTypenamesById[i.__ref]&&!o.store.has(i.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(i.__ref," object")};var s=o.variables,u=o.policies,c=o.store.getFieldValue(i,"__typename"),l=[],f=new tB;function d(e,n){var r;return e.missing&&(t=f.merge(t,((r={})[n]=e.missing,r))),e.result}this.config.addTypename&&"string"==typeof c&&!u.rootIdsByTypename[c]&&l.push({__typename:c});var h=new Set(r.selections);h.forEach(function(e){var r,p;if(td(e,s)){if(eQ(e)){var b=u.readField({fieldName:e.name.value,field:e,variables:o.variables,from:i},o),m=eX(e);void 0===b?nj.added(e)||(t=f.merge(t,((r={})[m]="Can't find field '".concat(e.name.value,"' on ").concat(eD(i)?i.__ref+" object":"object "+JSON.stringify(i,null,2)),r))):(0,tP.k)(b)?b=d(n.executeSubSelectedArray({field:e,array:b,enclosingRef:a,context:o}),m):e.selectionSet?null!=b&&(b=d(n.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:b,enclosingRef:eD(b)?b:a,context:o}),m)):o.canonizeResults&&(b=n.canon.pass(b)),void 0!==b&&l.push(((p={})[m]=b,p))}else{var g=eC(e,o.lookupFragment);if(!g&&e.kind===nL.h.FRAGMENT_SPREAD)throw __DEV__?new Q.ej("No fragment named ".concat(e.name.value)):new Q.ej(5);g&&u.fragmentMatches(g,c)&&g.selectionSet.selections.forEach(h.add,h)}}});var p={result:tF(l),missing:t},b=o.canonizeResults?this.canon.admit(p):(0,iu.J)(p);return b.result&&this.knownResults.set(b.result,r),b},e.prototype.execSubSelectedArrayImpl=function(e){var t,n=this,r=e.field,i=e.array,a=e.enclosingRef,o=e.context,s=new tB;function u(e,n){var r;return e.missing&&(t=s.merge(t,((r={})[n]=e.missing,r))),e.result}return r.selectionSet&&(i=i.filter(o.store.canRead)),i=i.map(function(e,t){return null===e?null:(0,tP.k)(e)?u(n.executeSubSelectedArray({field:r,array:e,enclosingRef:a,context:o}),t):r.selectionSet?u(n.executeSelectionSet({selectionSet:r.selectionSet,objectOrReference:e,enclosingRef:eD(e)?e:a,context:o}),t):(__DEV__&&ij(o.store,r,e),e)}),{result:o.canonizeResults?this.canon.admit(i):i,missing:t}},e}();function iR(e){try{JSON.stringify(e,function(e,t){if("string"==typeof t)throw t;return t})}catch(t){return t}}function ij(e,t,n){if(!t.selectionSet){var r=new Set([n]);r.forEach(function(n){(0,eO.s)(n)&&(__DEV__?(0,Q.kG)(!eD(n),"Missing selection set for object of type ".concat(im(e,n)," returned for query field ").concat(t.name.value)):(0,Q.kG)(!eD(n),6),Object.values(n).forEach(r.add,r))})}}function iF(e){var t=nG("stringifyForDisplay");return JSON.stringify(e,function(e,n){return void 0===n?t:n}).split(JSON.stringify(t)).join("<undefined>")}var iY=Object.create(null);function iB(e){var t=JSON.stringify(e);return iY[t]||(iY[t]=Object.create(null))}function iU(e){var t=iB(e);return t.keyFieldsFn||(t.keyFieldsFn=function(t,n){var r=function(e,t){return n.readField(t,e)},i=n.keyObject=i$(e,function(e){var i=iW(n.storeObject,e,r);return void 0===i&&t!==n.storeObject&&ic.call(t,e[0])&&(i=iW(t,e,iG)),__DEV__?(0,Q.kG)(void 0!==i,"Missing field '".concat(e.join("."),"' while extracting keyFields from ").concat(JSON.stringify(t))):(0,Q.kG)(void 0!==i,2),i});return"".concat(n.typename,":").concat(JSON.stringify(i))})}function iH(e){var t=iB(e);return t.keyArgsFn||(t.keyArgsFn=function(t,n){var r=n.field,i=n.variables,a=n.fieldName,o=JSON.stringify(i$(e,function(e){var n=e[0],a=n.charAt(0);if("@"===a){if(r&&(0,tP.O)(r.directives)){var o=n.slice(1),s=r.directives.find(function(e){return e.name.value===o}),u=s&&eZ(s,i);return u&&iW(u,e.slice(1))}return}if("$"===a){var c=n.slice(1);if(i&&ic.call(i,c)){var l=e.slice(0);return l[0]=c,iW(i,l)}return}if(t)return iW(t,e)}));return(t||"{}"!==o)&&(a+=":"+o),a})}function i$(e,t){var n=new tB;return iz(e).reduce(function(e,r){var i,a=t(r);if(void 0!==a){for(var o=r.length-1;o>=0;--o)a=((i={})[r[o]]=a,i);e=n.merge(e,a)}return e},Object.create(null))}function iz(e){var t=iB(e);if(!t.paths){var n=t.paths=[],r=[];e.forEach(function(t,i){(0,tP.k)(t)?(iz(t).forEach(function(e){return n.push(r.concat(e))}),r.length=0):(r.push(t),(0,tP.k)(e[i+1])||(n.push(r.slice(0)),r.length=0))})}return t.paths}function iG(e,t){return e[t]}function iW(e,t,n){return n=n||iG,iK(t.reduce(function e(t,r){return(0,tP.k)(t)?t.map(function(t){return e(t,r)}):t&&n(t,r)},e))}function iK(e){return(0,eO.s)(e)?(0,tP.k)(e)?e.map(iK):i$(Object.keys(e).sort(),function(t){return iW(e,t)}):e}function iV(e){return void 0!==e.args?e.args:e.field?eZ(e.field,e.variables):null}eK.setStringify(nx);var iq=function(){},iZ=function(e,t){return t.fieldName},iX=function(e,t,n){return(0,n.mergeObjects)(e,t)},iJ=function(e,t){return t},iQ=function(){function e(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=(0,en.pi)({dataIdFromObject:id},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return e.prototype.identify=function(e,t){var n,r,i=this,a=t&&(t.typename||(null===(n=t.storeObject)||void 0===n?void 0:n.__typename))||e.__typename;if(a===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var o=t&&t.storeObject||e,s=(0,en.pi)((0,en.pi)({},t),{typename:a,storeObject:o,readField:t&&t.readField||function(){var e=i0(arguments,o);return i.readField(e,{store:i.cache.data,variables:e.variables})}}),u=a&&this.getTypePolicy(a),c=u&&u.keyFn||this.config.dataIdFromObject;c;){var l=c((0,en.pi)((0,en.pi)({},e),o),s);if((0,tP.k)(l))c=iU(l);else{r=l;break}}return r=r?String(r):void 0,s.keyObject?[r,s.keyObject]:[r]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach(function(n){var r=e[n],i=r.queryType,a=r.mutationType,o=r.subscriptionType,s=(0,en._T)(r,["queryType","mutationType","subscriptionType"]);i&&t.setRootTypename("Query",n),a&&t.setRootTypename("Mutation",n),o&&t.setRootTypename("Subscription",n),ic.call(t.toBeAdded,n)?t.toBeAdded[n].push(s):t.toBeAdded[n]=[s]})},e.prototype.updateTypePolicy=function(e,t){var n=this,r=this.getTypePolicy(e),i=t.keyFields,a=t.fields;function o(e,t){e.merge="function"==typeof t?t:!0===t?iX:!1===t?iJ:e.merge}o(r,t.merge),r.keyFn=!1===i?iq:(0,tP.k)(i)?iU(i):"function"==typeof i?i:r.keyFn,a&&Object.keys(a).forEach(function(t){var r=n.getFieldPolicy(e,t,!0),i=a[t];if("function"==typeof i)r.read=i;else{var s=i.keyArgs,u=i.read,c=i.merge;r.keyFn=!1===s?iZ:(0,tP.k)(s)?iH(s):"function"==typeof s?s:r.keyFn,"function"==typeof u&&(r.read=u),o(r,c)}r.read&&r.merge&&(r.keyFn=r.keyFn||iZ)})},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var n="ROOT_"+e.toUpperCase(),r=this.rootTypenamesById[n];t!==r&&(__DEV__?(0,Q.kG)(!r||r===e,"Cannot change root ".concat(e," __typename more than once")):(0,Q.kG)(!r||r===e,3),r&&delete this.rootIdsByTypename[r],this.rootIdsByTypename[t]=n,this.rootTypenamesById[n]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach(function(n){t.getSupertypeSet(n,!0),e[n].forEach(function(e){t.getSupertypeSet(e,!0).add(n);var r=e.match(ig);r&&r[0]===e||t.fuzzySubtypes.set(e,RegExp(e))})})},e.prototype.getTypePolicy=function(e){var t=this;if(!ic.call(this.typePolicies,e)){var n=this.typePolicies[e]=Object.create(null);n.fields=Object.create(null);var r=this.supertypeMap.get(e);r&&r.size&&r.forEach(function(e){var r=t.getTypePolicy(e),i=r.fields;Object.assign(n,(0,en._T)(r,["fields"])),Object.assign(n.fields,i)})}var i=this.toBeAdded[e];return i&&i.length&&i.splice(0).forEach(function(n){t.updateTypePolicy(e,n)}),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t,n){if(e){var r=this.getTypePolicy(e).fields;return r[t]||n&&(r[t]=Object.create(null))}},e.prototype.getSupertypeSet=function(e,t){var n=this.supertypeMap.get(e);return!n&&t&&this.supertypeMap.set(e,n=new Set),n},e.prototype.fragmentMatches=function(e,t,n,r){var i=this;if(!e.typeCondition)return!0;if(!t)return!1;var a=e.typeCondition.name.value;if(t===a)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(a))for(var o=this.getSupertypeSet(t,!0),s=[o],u=function(e){var t=i.getSupertypeSet(e,!1);t&&t.size&&0>s.indexOf(t)&&s.push(t)},c=!!(n&&this.fuzzySubtypes.size),l=!1,f=0;f<s.length;++f){var d=s[f];if(d.has(a))return o.has(a)||(l&&__DEV__&&Q.kG.warn("Inferring subtype ".concat(t," of supertype ").concat(a)),o.add(a)),!0;d.forEach(u),c&&f===s.length-1&&iy(e.selectionSet,n,r)&&(c=!1,l=!0,this.fuzzySubtypes.forEach(function(e,n){var r=t.match(e);r&&r[0]===t&&u(n)}))}return!1},e.prototype.hasKeyArgs=function(e,t){var n=this.getFieldPolicy(e,t,!1);return!!(n&&n.keyFn)},e.prototype.getStoreFieldName=function(e){var t,n=e.typename,r=e.fieldName,i=this.getFieldPolicy(n,r,!1),a=i&&i.keyFn;if(a&&n)for(var o={typename:n,fieldName:r,field:e.field||null,variables:e.variables},s=iV(e);a;){var u=a(s,o);if((0,tP.k)(u))a=iH(u);else{t=u||r;break}}return(void 0===t&&(t=e.field?eG(e.field,e.variables):eK(r,iV(e))),!1===t)?r:r===iv(t)?t:r+":"+t},e.prototype.readField=function(e,t){var n=e.from;if(n&&(e.field||e.fieldName)){if(void 0===e.typename){var r=t.store.getFieldValue(n,"__typename");r&&(e.typename=r)}var i=this.getStoreFieldName(e),a=iv(i),o=t.store.getFieldValue(n,i),s=this.getFieldPolicy(e.typename,a,!1),u=s&&s.read;if(u){var c=i1(this,n,e,t,t.store.getStorage(eD(n)?n.__ref:n,i));return rX.withValue(this.cache,u,[o,c])}return o}},e.prototype.getReadFunction=function(e,t){var n=this.getFieldPolicy(e,t,!1);return n&&n.read},e.prototype.getMergeFunction=function(e,t,n){var r=this.getFieldPolicy(e,t,!1),i=r&&r.merge;return!i&&n&&(i=(r=this.getTypePolicy(n))&&r.merge),i},e.prototype.runMergeFunction=function(e,t,n,r,i){var a=n.field,o=n.typename,s=n.merge;return s===iX?i2(r.store)(e,t):s===iJ?t:(r.overwrite&&(e=void 0),s(e,t,i1(this,void 0,{typename:o,fieldName:a.name.value,field:a,variables:r.variables},r,i||Object.create(null))))},e}();function i1(e,t,n,r,i){var a=e.getStoreFieldName(n),o=iv(a),s=n.variables||r.variables,u=r.store,c=u.toReference,l=u.canRead;return{args:iV(n),field:n.field||null,fieldName:o,storeFieldName:a,variables:s,isReference:eD,toReference:c,storage:i,cache:e.cache,canRead:l,readField:function(){return e.readField(i0(arguments,t,s),r)},mergeObjects:i2(r.store)}}function i0(e,t,n){var r,i=e[0],a=e[1],o=e.length;return"string"==typeof i?r={fieldName:i,from:o>1?a:t}:(r=(0,en.pi)({},i),ic.call(r,"from")||(r.from=t)),__DEV__&&void 0===r.from&&__DEV__&&Q.kG.warn("Undefined 'from' passed to readField with arguments ".concat(iF(Array.from(e)))),void 0===r.variables&&(r.variables=n),r}function i2(e){return function(t,n){if((0,tP.k)(t)||(0,tP.k)(n))throw __DEV__?new Q.ej("Cannot automatically merge arrays"):new Q.ej(4);if((0,eO.s)(t)&&(0,eO.s)(n)){var r=e.getFieldValue(t,"__typename"),i=e.getFieldValue(n,"__typename");if(r&&i&&r!==i)return n;if(eD(t)&&iw(n))return e.merge(t.__ref,n),t;if(iw(t)&&eD(n))return e.merge(t,n.__ref),n;if(iw(t)&&iw(n))return(0,en.pi)((0,en.pi)({},t),n)}return n}}function i3(e,t,n){var r="".concat(t).concat(n),i=e.flavors.get(r);return i||e.flavors.set(r,i=e.clientOnly===t&&e.deferred===n?e:(0,en.pi)((0,en.pi)({},e),{clientOnly:t,deferred:n})),i}var i4=function(){function e(e,t,n){this.cache=e,this.reader=t,this.fragments=n}return e.prototype.writeToStore=function(e,t){var n=this,r=t.query,i=t.result,a=t.dataId,o=t.variables,s=t.overwrite,u=e2(r),c=i_();o=(0,en.pi)((0,en.pi)({},e9(u)),o);var l=(0,en.pi)((0,en.pi)({store:e,written:Object.create(null),merge:function(e,t){return c.merge(e,t)},variables:o,varString:nx(o)},iE(r,this.fragments)),{overwrite:!!s,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),f=this.processSelectionSet({result:i||Object.create(null),dataId:a,selectionSet:u.selectionSet,mergeTree:{map:new Map},context:l});if(!eD(f))throw __DEV__?new Q.ej("Could not identify object ".concat(JSON.stringify(i))):new Q.ej(7);return l.incomingById.forEach(function(t,r){var i=t.storeObject,a=t.mergeTree,o=t.fieldNodeSet,s=eI(r);if(a&&a.map.size){var u=n.applyMerges(a,s,i,l);if(eD(u))return;i=u}if(__DEV__&&!l.overwrite){var c=Object.create(null);o.forEach(function(e){e.selectionSet&&(c[e.name.value]=!0)});var f=function(e){return!0===c[iv(e)]},d=function(e){var t=a&&a.map.get(e);return Boolean(t&&t.info&&t.info.merge)};Object.keys(i).forEach(function(e){f(e)&&!d(e)&&at(s,i,e,l.store)})}e.merge(r,i)}),e.retain(f.__ref),f},e.prototype.processSelectionSet=function(e){var t=this,n=e.dataId,r=e.result,i=e.selectionSet,a=e.context,o=e.mergeTree,s=this.cache.policies,u=Object.create(null),c=n&&s.rootTypenamesById[n]||eJ(r,i,a.fragmentMap)||n&&a.store.get(n,"__typename");"string"==typeof c&&(u.__typename=c);var l=function(){var e=i0(arguments,u,a.variables);if(eD(e.from)){var t=a.incomingById.get(e.from.__ref);if(t){var n=s.readField((0,en.pi)((0,en.pi)({},e),{from:t.storeObject}),a);if(void 0!==n)return n}}return s.readField(e,a)},f=new Set;this.flattenFields(i,r,a,c).forEach(function(e,n){var i,a=r[eX(n)];if(f.add(n),void 0!==a){var d=s.getStoreFieldName({typename:c,fieldName:n.name.value,field:n,variables:e.variables}),h=i5(o,d),p=t.processFieldValue(a,n,n.selectionSet?i3(e,!1,!1):e,h),b=void 0;n.selectionSet&&(eD(p)||iw(p))&&(b=l("__typename",p));var m=s.getMergeFunction(c,n.name.value,b);m?h.info={field:n,typename:c,merge:m}:i7(o,d),u=e.merge(u,((i={})[d]=p,i))}else __DEV__&&!e.clientOnly&&!e.deferred&&!nj.added(n)&&!s.getReadFunction(c,n.name.value)&&__DEV__&&Q.kG.error("Missing field '".concat(eX(n),"' while writing result ").concat(JSON.stringify(r,null,2)).substring(0,1e3))});try{var d=s.identify(r,{typename:c,selectionSet:i,fragmentMap:a.fragmentMap,storeObject:u,readField:l}),h=d[0],p=d[1];n=n||h,p&&(u=a.merge(u,p))}catch(b){if(!n)throw b}if("string"==typeof n){var m=eI(n),g=a.written[n]||(a.written[n]=[]);if(g.indexOf(i)>=0||(g.push(i),this.reader&&this.reader.isFresh(r,m,i,a)))return m;var v=a.incomingById.get(n);return v?(v.storeObject=a.merge(v.storeObject,u),v.mergeTree=i8(v.mergeTree,o),f.forEach(function(e){return v.fieldNodeSet.add(e)})):a.incomingById.set(n,{storeObject:u,mergeTree:i9(o)?void 0:o,fieldNodeSet:f}),m}return u},e.prototype.processFieldValue=function(e,t,n,r){var i=this;return t.selectionSet&&null!==e?(0,tP.k)(e)?e.map(function(e,a){var o=i.processFieldValue(e,t,n,i5(r,a));return i7(r,a),o}):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:n,mergeTree:r}):__DEV__?nJ(e):e},e.prototype.flattenFields=function(e,t,n,r){void 0===r&&(r=eJ(t,e,n.fragmentMap));var i=new Map,a=this.cache.policies,o=new n_(!1);return function e(s,u){var c=o.lookup(s,u.clientOnly,u.deferred);c.visited||(c.visited=!0,s.selections.forEach(function(o){if(td(o,n.variables)){var s=u.clientOnly,c=u.deferred;if(!(s&&c)&&(0,tP.O)(o.directives)&&o.directives.forEach(function(e){var t=e.name.value;if("client"===t&&(s=!0),"defer"===t){var r=eZ(e,n.variables);r&&!1===r.if||(c=!0)}}),eQ(o)){var l=i.get(o);l&&(s=s&&l.clientOnly,c=c&&l.deferred),i.set(o,i3(n,s,c))}else{var f=eC(o,n.lookupFragment);if(!f&&o.kind===nL.h.FRAGMENT_SPREAD)throw __DEV__?new Q.ej("No fragment named ".concat(o.name.value)):new Q.ej(8);f&&a.fragmentMatches(f,r,t,n.variables)&&e(f.selectionSet,i3(n,s,c))}}}))}(e,n),i},e.prototype.applyMerges=function(e,t,n,r,i){var a=this;if(e.map.size&&!eD(n)){var o,s,u=!(0,tP.k)(n)&&(eD(t)||iw(t))?t:void 0,c=n;u&&!i&&(i=[eD(u)?u.__ref:u]);var l=function(e,t){return(0,tP.k)(e)?"number"==typeof t?e[t]:void 0:r.store.getFieldValue(e,String(t))};e.map.forEach(function(e,t){var n=l(u,t),o=l(c,t);if(void 0!==o){i&&i.push(t);var f=a.applyMerges(e,n,o,r,i);f!==o&&(s=s||new Map).set(t,f),i&&(0,Q.kG)(i.pop()===t)}}),s&&(n=(0,tP.k)(c)?c.slice(0):(0,en.pi)({},c),s.forEach(function(e,t){n[t]=e}))}return e.info?this.cache.policies.runMergeFunction(t,n,e.info,r,i&&(o=r.store).getStorage.apply(o,i)):n},e}(),i6=[];function i5(e,t){var n=e.map;return n.has(t)||n.set(t,i6.pop()||{map:new Map}),n.get(t)}function i8(e,t){if(e===t||!t||i9(t))return e;if(!e||i9(e))return t;var n=e.info&&t.info?(0,en.pi)((0,en.pi)({},e.info),t.info):e.info||t.info,r=e.map.size&&t.map.size,i=r?new Map:e.map.size?e.map:t.map,a={info:n,map:i};if(r){var o=new Set(t.map.keys());e.map.forEach(function(e,n){a.map.set(n,i8(e,t.map.get(n))),o.delete(n)}),o.forEach(function(n){a.map.set(n,i8(t.map.get(n),e.map.get(n)))})}return a}function i9(e){return!e||!(e.info||e.map.size)}function i7(e,t){var n=e.map,r=n.get(t);r&&i9(r)&&(i6.push(r),n.delete(t))}var ae=new Set;function at(e,t,n,r){var i=function(e){var t=r.getFieldValue(e,n);return"object"==typeof t&&t},a=i(e);if(a){var o=i(t);if(!(!o||eD(a)||(0,nm.D)(a,o)||Object.keys(a).every(function(e){return void 0!==r.getFieldValue(o,e)}))){var s=r.getFieldValue(e,"__typename")||r.getFieldValue(t,"__typename"),u=iv(n),c="".concat(s,".").concat(u);if(!ae.has(c)){ae.add(c);var l=[];(0,tP.k)(a)||(0,tP.k)(o)||[a,o].forEach(function(e){var t=r.getFieldValue(e,"__typename");"string"!=typeof t||l.includes(t)||l.push(t)}),__DEV__&&Q.kG.warn("Cache data may be lost when replacing the ".concat(u," field of a ").concat(s," object.\n\nThis could cause additional (usually avoidable) network requests to fetch data that were otherwise cached.\n\nTo address this problem (which is not a bug in Apollo Client), ").concat(l.length?"either ensure all objects of type "+l.join(" and ")+" have an ID or a custom merge function, or ":"","define a custom merge function for the ").concat(c," field, so InMemoryCache can safely merge these objects:\n\n existing: ").concat(JSON.stringify(a).slice(0,1e3),"\n incoming: ").concat(JSON.stringify(o).slice(0,1e3),"\n\nFor more information about these options, please refer to the documentation:\n\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\n"))}}}}var an=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;return n.watches=new Set,n.typenameDocumentCache=new Map,n.makeVar=r2,n.txCount=0,n.config=ip(t),n.addTypename=!!n.config.addTypename,n.policies=new iQ({cache:n,dataIdFromObject:n.config.dataIdFromObject,possibleTypes:n.config.possibleTypes,typePolicies:n.config.typePolicies}),n.init(),n}return(0,en.ZT)(t,e),t.prototype.init=function(){var e=this.data=new iT.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()},t.prototype.resetResultCache=function(e){var t=this,n=this.storeReader,r=this.config.fragments;this.storeWriter=new i4(this,this.storeReader=new iP({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:ib(this.config),canon:e?void 0:n&&n.canon,fragments:r}),r),this.maybeBroadcastWatch=rZ(function(e,n){return t.broadcastWatch(e,n)},{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var n=e.optimistic?t.optimisticData:t.data;if(iD(n)){var r=e.optimistic,i=e.id,a=e.variables;return n.makeCacheKey(e.query,e.callback,nx({optimistic:r,id:i,variables:a}))}}}),new Set([this.data.group,this.optimisticData.group,]).forEach(function(e){return e.resetCaching()})},t.prototype.restore=function(e){return this.init(),e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).extract()},t.prototype.read=function(e){var t=e.returnPartialData,n=void 0!==t&&t;try{return this.storeReader.diffQueryAgainstStore((0,en.pi)((0,en.pi)({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:n})).result||null}catch(r){if(r instanceof is)return null;throw r}},t.prototype.write=function(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.modify=function(e){if(ic.call(e,"id")&&!e.id)return!1;var t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore((0,en.pi)((0,en.pi)({},e),{store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(e){var t=this;return this.watches.size||r0(this),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),function(){t.watches.delete(e)&&!t.watches.size&&r1(t),t.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(e){nx.reset();var t=this.optimisticData.gc();return e&&!this.txCount&&(e.resetResultCache?this.resetResultCache(e.resetResultIdentities):e.resetResultIdentities&&this.storeReader.resetCanon()),t},t.prototype.retain=function(e,t){return(t?this.optimisticData:this.data).retain(e)},t.prototype.release=function(e,t){return(t?this.optimisticData:this.data).release(e)},t.prototype.identify=function(e){if(eD(e))return e.__ref;try{return this.policies.identify(e)[0]}catch(t){__DEV__&&Q.kG.warn(t)}},t.prototype.evict=function(e){if(!e.id){if(ic.call(e,"id"))return!1;e=(0,en.pi)((0,en.pi)({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.reset=function(e){var t=this;return this.init(),nx.reset(),e&&e.discardWatches?(this.watches.forEach(function(e){return t.maybeBroadcastWatch.forget(e)}),this.watches.clear(),r1(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){var t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())},t.prototype.batch=function(e){var t,n=this,r=e.update,i=e.optimistic,a=void 0===i||i,o=e.removeOptimistic,s=e.onWatchUpdated,u=function(e){var i=n,a=i.data,o=i.optimisticData;++n.txCount,e&&(n.data=n.optimisticData=e);try{return t=r(n)}finally{--n.txCount,n.data=a,n.optimisticData=o}},c=new Set;return s&&!this.txCount&&this.broadcastWatches((0,en.pi)((0,en.pi)({},e),{onWatchUpdated:function(e){return c.add(e),!1}})),"string"==typeof a?this.optimisticData=this.optimisticData.addLayer(a,u):!1===a?u(this.data):u(),"string"==typeof o&&(this.optimisticData=this.optimisticData.removeLayer(o)),s&&c.size?(this.broadcastWatches((0,en.pi)((0,en.pi)({},e),{onWatchUpdated:function(e,t){var n=s.call(this,e,t);return!1!==n&&c.delete(e),n}})),c.size&&c.forEach(function(e){return n.maybeBroadcastWatch.dirty(e)})):this.broadcastWatches(e),t},t.prototype.performTransaction=function(e,t){return this.batch({update:e,optimistic:t||null!==t})},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.typenameDocumentCache.get(e);return t||(t=nj(e),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}return e},t.prototype.transformForLink=function(e){var t=this.config.fragments;return t?t.transform(e):e},t.prototype.broadcastWatches=function(e){var t=this;this.txCount||this.watches.forEach(function(n){return t.maybeBroadcastWatch(n,e)})},t.prototype.broadcastWatch=function(e,t){var n=e.lastDiff,r=this.diff(e);(!t||(e.optimistic&&"string"==typeof t.optimistic&&(r.fromOptimisticTransaction=!0),!t.onWatchUpdated||!1!==t.onWatchUpdated.call(this,e,r,n)))&&(n&&(0,nm.D)(n.result,r.result)||e.callback(e.lastDiff=r,n))},t}(io),ar={possibleTypes:{ApproveJobProposalSpecPayload:["ApproveJobProposalSpecSuccess","JobAlreadyExistsError","NotFoundError"],BridgePayload:["Bridge","NotFoundError"],CancelJobProposalSpecPayload:["CancelJobProposalSpecSuccess","NotFoundError"],ChainPayload:["Chain","NotFoundError"],CreateAPITokenPayload:["CreateAPITokenSuccess","InputErrors"],CreateBridgePayload:["CreateBridgeSuccess"],CreateCSAKeyPayload:["CSAKeyExistsError","CreateCSAKeySuccess"],CreateFeedsManagerChainConfigPayload:["CreateFeedsManagerChainConfigSuccess","InputErrors","NotFoundError"],CreateFeedsManagerPayload:["CreateFeedsManagerSuccess","DuplicateFeedsManagerError","InputErrors","NotFoundError","SingleFeedsManagerError"],CreateJobPayload:["CreateJobSuccess","InputErrors"],CreateOCR2KeyBundlePayload:["CreateOCR2KeyBundleSuccess"],CreateOCRKeyBundlePayload:["CreateOCRKeyBundleSuccess"],CreateP2PKeyPayload:["CreateP2PKeySuccess"],DeleteAPITokenPayload:["DeleteAPITokenSuccess","InputErrors"],DeleteBridgePayload:["DeleteBridgeConflictError","DeleteBridgeInvalidNameError","DeleteBridgeSuccess","NotFoundError"],DeleteCSAKeyPayload:["DeleteCSAKeySuccess","NotFoundError"],DeleteFeedsManagerChainConfigPayload:["DeleteFeedsManagerChainConfigSuccess","NotFoundError"],DeleteJobPayload:["DeleteJobSuccess","NotFoundError"],DeleteOCR2KeyBundlePayload:["DeleteOCR2KeyBundleSuccess","NotFoundError"],DeleteOCRKeyBundlePayload:["DeleteOCRKeyBundleSuccess","NotFoundError"],DeleteP2PKeyPayload:["DeleteP2PKeySuccess","NotFoundError"],DeleteVRFKeyPayload:["DeleteVRFKeySuccess","NotFoundError"],DisableFeedsManagerPayload:["DisableFeedsManagerSuccess","NotFoundError"],DismissJobErrorPayload:["DismissJobErrorSuccess","NotFoundError"],EnableFeedsManagerPayload:["EnableFeedsManagerSuccess","NotFoundError"],Error:["CSAKeyExistsError","DeleteBridgeConflictError","DeleteBridgeInvalidNameError","DuplicateFeedsManagerError","InputError","JobAlreadyExistsError","NotFoundError","RunJobCannotRunError","SingleFeedsManagerError"],EthTransactionPayload:["EthTransaction","NotFoundError"],FeaturesPayload:["Features"],FeedsManagerPayload:["FeedsManager","NotFoundError"],GetSQLLoggingPayload:["SQLLogging"],GlobalLogLevelPayload:["GlobalLogLevel"],JobPayload:["Job","NotFoundError"],JobProposalPayload:["JobProposal","NotFoundError"],JobRunPayload:["JobRun","NotFoundError"],JobSpec:["BlockHeaderFeederSpec","BlockhashStoreSpec","BootstrapSpec","CronSpec","DirectRequestSpec","FluxMonitorSpec","GatewaySpec","KeeperSpec","OCR2Spec","OCRSpec","StandardCapabilitiesSpec","StreamSpec","VRFSpec","WebhookSpec","WorkflowSpec"],NodePayload:["Node","NotFoundError"],PaginatedPayload:["BridgesPayload","ChainsPayload","EthTransactionAttemptsPayload","EthTransactionsPayload","JobRunsPayload","JobsPayload","NodesPayload"],RejectJobProposalSpecPayload:["NotFoundError","RejectJobProposalSpecSuccess"],RunJobPayload:["NotFoundError","RunJobCannotRunError","RunJobSuccess"],SetGlobalLogLevelPayload:["InputErrors","SetGlobalLogLevelSuccess"],SetSQLLoggingPayload:["SetSQLLoggingSuccess"],SetServicesLogLevelsPayload:["InputErrors","SetServicesLogLevelsSuccess"],UpdateBridgePayload:["NotFoundError","UpdateBridgeSuccess"],UpdateFeedsManagerChainConfigPayload:["InputErrors","NotFoundError","UpdateFeedsManagerChainConfigSuccess"],UpdateFeedsManagerPayload:["InputErrors","NotFoundError","UpdateFeedsManagerSuccess"],UpdateJobProposalSpecDefinitionPayload:["NotFoundError","UpdateJobProposalSpecDefinitionSuccess"],UpdatePasswordPayload:["InputErrors","UpdatePasswordSuccess"],VRFKeyPayload:["NotFoundError","VRFKeySuccess"]}};let ai=ar;var aa=(r=void 0,location.origin),ao=new nh({uri:"".concat(aa,"/query"),credentials:"include"}),as=new ia({cache:new an({possibleTypes:ai.possibleTypes}),link:ao});if(a.Z.locale(o),u().defaultFormat="YYYY-MM-DD h:mm:ss A","undefined"!=typeof document){var au,ac,al=f().hydrate;ac=X,al(c.createElement(et,{client:as},c.createElement(d.zj,null,c.createElement(i.MuiThemeProvider,{theme:J.r},c.createElement(ac,null)))),document.getElementById("root"))}})()})(); \ No newline at end of file diff --git a/core/web/assets/main.1d1632f9bf7627b5ea5e.js.gz b/core/web/assets/main.57f94389bc8271642420.js.gz similarity index 84% rename from core/web/assets/main.1d1632f9bf7627b5ea5e.js.gz rename to core/web/assets/main.57f94389bc8271642420.js.gz index d99776f49e5..82b42bc1d0a 100644 Binary files a/core/web/assets/main.1d1632f9bf7627b5ea5e.js.gz and b/core/web/assets/main.57f94389bc8271642420.js.gz differ diff --git a/core/web/solana_chains_controller_test.go b/core/web/solana_chains_controller_test.go index 4aa0dbe579d..fdc9bd16b9b 100644 --- a/core/web/solana_chains_controller_test.go +++ b/core/web/solana_chains_controller_test.go @@ -67,19 +67,19 @@ Nodes = [] [MultiNode] Enabled = false PollFailureThreshold = 5 -PollInterval = '10s' +PollInterval = '15s' SelectionMode = 'PriorityLevel' -SyncThreshold = 5 +SyncThreshold = 10 NodeIsSyncingEnabled = false LeaseDuration = '1m0s' FinalizedBlockPollInterval = '5s' EnforceRepeatableRead = true -DeathDeclarationDelay = '10s' -NodeNoNewHeadsThreshold = '10s' -NoNewFinalizedHeadsThreshold = '10s' +DeathDeclarationDelay = '20s' +NodeNoNewHeadsThreshold = '20s' +NoNewFinalizedHeadsThreshold = '20s' FinalityDepth = 0 FinalityTagEnabled = true -FinalizedBlockOffset = 0 +FinalizedBlockOffset = 50 `, } }, diff --git a/deployment/address_book.go b/deployment/address_book.go index 8385bc0e9f1..076e2a235d6 100644 --- a/deployment/address_book.go +++ b/deployment/address_book.go @@ -3,6 +3,9 @@ package deployment import ( "fmt" "strings" + "sync" + + "golang.org/x/exp/maps" "github.com/Masterminds/semver/v3" "github.com/ethereum/go-ethereum/common" @@ -82,14 +85,16 @@ type AddressBook interface { AddressesForChain(chain uint64) (map[string]TypeAndVersion, error) // Allows for merging address books (e.g. new deployments with existing ones) Merge(other AddressBook) error + Remove(ab AddressBook) error } type AddressBookMap struct { - AddressesByChain map[uint64]map[string]TypeAndVersion + addressesByChain map[uint64]map[string]TypeAndVersion + mtx sync.RWMutex } -// Save will save an address for a given chain selector. It will error if there is a conflicting existing address. -func (m *AddressBookMap) Save(chainSelector uint64, address string, typeAndVersion TypeAndVersion) error { +// save will save an address for a given chain selector. It will error if there is a conflicting existing address. +func (m *AddressBookMap) save(chainSelector uint64, address string, typeAndVersion TypeAndVersion) error { _, exists := chainsel.ChainBySelector(chainSelector) if !exists { return errors.Wrapf(ErrInvalidChainSelector, "chain selector %d", chainSelector) @@ -106,19 +111,34 @@ func (m *AddressBookMap) Save(chainSelector uint64, address string, typeAndVersi if typeAndVersion.Type == "" { return fmt.Errorf("type cannot be empty") } - if _, exists := m.AddressesByChain[chainSelector]; !exists { + + if _, exists := m.addressesByChain[chainSelector]; !exists { // First time chain add, create map - m.AddressesByChain[chainSelector] = make(map[string]TypeAndVersion) + m.addressesByChain[chainSelector] = make(map[string]TypeAndVersion) } - if _, exists := m.AddressesByChain[chainSelector][address]; exists { + if _, exists := m.addressesByChain[chainSelector][address]; exists { return fmt.Errorf("address %s already exists for chain %d", address, chainSelector) } - m.AddressesByChain[chainSelector][address] = typeAndVersion + m.addressesByChain[chainSelector][address] = typeAndVersion return nil } +// Save will save an address for a given chain selector. It will error if there is a conflicting existing address. +// thread safety version of the save method +func (m *AddressBookMap) Save(chainSelector uint64, address string, typeAndVersion TypeAndVersion) error { + m.mtx.Lock() + defer m.mtx.Unlock() + return m.save(chainSelector, address, typeAndVersion) +} + func (m *AddressBookMap) Addresses() (map[uint64]map[string]TypeAndVersion, error) { - return m.AddressesByChain, nil + m.mtx.RLock() + defer m.mtx.RUnlock() + + // maps are mutable and pass via a pointer + // creating a copy of the map to prevent concurrency + // read and changes outside object-bound + return m.cloneAddresses(m.addressesByChain), nil } func (m *AddressBookMap) AddressesForChain(chainSelector uint64) (map[string]TypeAndVersion, error) { @@ -126,10 +146,18 @@ func (m *AddressBookMap) AddressesForChain(chainSelector uint64) (map[string]Typ if !exists { return nil, errors.Wrapf(ErrInvalidChainSelector, "chain selector %d", chainSelector) } - if _, exists := m.AddressesByChain[chainSelector]; !exists { + + m.mtx.RLock() + defer m.mtx.RUnlock() + + if _, exists := m.addressesByChain[chainSelector]; !exists { return nil, errors.Wrapf(ErrChainNotFound, "chain selector %d", chainSelector) } - return m.AddressesByChain[chainSelector], nil + + // maps are mutable and pass via a pointer + // creating a copy of the map to prevent concurrency + // read and changes outside object-bound + return maps.Clone(m.addressesByChain[chainSelector]), nil } // Merge will merge the addresses from another address book into this one. @@ -139,9 +167,13 @@ func (m *AddressBookMap) Merge(ab AddressBook) error { if err != nil { return err } - for chain, chainAddresses := range addresses { - for address, typeAndVersions := range chainAddresses { - if err := m.Save(chain, address, typeAndVersions); err != nil { + + m.mtx.Lock() + defer m.mtx.Unlock() + + for chainSelector, chainAddresses := range addresses { + for address, typeAndVersion := range chainAddresses { + if err := m.save(chainSelector, address, typeAndVersion); err != nil { return err } } @@ -149,18 +181,57 @@ func (m *AddressBookMap) Merge(ab AddressBook) error { return nil } +// Remove removes the address book addresses specified via the argument from the AddressBookMap. +// Errors if all the addresses in the given address book are not contained in the AddressBookMap. +func (m *AddressBookMap) Remove(ab AddressBook) error { + addresses, err := ab.Addresses() + if err != nil { + return err + } + + m.mtx.Lock() + defer m.mtx.Unlock() + + // State of m.addressesByChain storage must not be changed in case of an error + // need to do double iteration over the address book. First validation, second actual deletion + for chainSelector, chainAddresses := range addresses { + for address, _ := range chainAddresses { + if _, exists := m.addressesByChain[chainSelector][address]; !exists { + return errors.New("AddressBookMap does not contain address from the given address book") + } + } + } + + for chainSelector, chainAddresses := range addresses { + for address, _ := range chainAddresses { + delete(m.addressesByChain[chainSelector], address) + } + } + + return nil +} + +// cloneAddresses creates a deep copy of map[uint64]map[string]TypeAndVersion object +func (m *AddressBookMap) cloneAddresses(input map[uint64]map[string]TypeAndVersion) map[uint64]map[string]TypeAndVersion { + result := make(map[uint64]map[string]TypeAndVersion) + for chainSelector, chainAddresses := range input { + result[chainSelector] = maps.Clone(chainAddresses) + } + return result +} + // TODO: Maybe could add an environment argument // which would ensure only mainnet/testnet chain selectors are used // for further safety? func NewMemoryAddressBook() *AddressBookMap { return &AddressBookMap{ - AddressesByChain: make(map[uint64]map[string]TypeAndVersion), + addressesByChain: make(map[uint64]map[string]TypeAndVersion), } } func NewMemoryAddressBookFromMap(addressesByChain map[uint64]map[string]TypeAndVersion) *AddressBookMap { return &AddressBookMap{ - AddressesByChain: addressesByChain, + addressesByChain: addressesByChain, } } diff --git a/deployment/address_book_test.go b/deployment/address_book_test.go index bf3d2ad965c..9040902a169 100644 --- a/deployment/address_book_test.go +++ b/deployment/address_book_test.go @@ -2,6 +2,8 @@ package deployment import ( "errors" + "math/big" + "sync" "testing" "github.com/ethereum/go-ethereum/common" @@ -118,3 +120,122 @@ func TestAddressBook_Merge(t *testing.T) { }, }) } + +func TestAddressBook_Remove(t *testing.T) { + onRamp100 := NewTypeAndVersion("OnRamp", Version1_0_0) + onRamp110 := NewTypeAndVersion("OnRamp", Version1_1_0) + addr1 := common.HexToAddress("0x1").String() + addr2 := common.HexToAddress("0x2").String() + addr3 := common.HexToAddress("0x3").String() + + baseAB := NewMemoryAddressBookFromMap(map[uint64]map[string]TypeAndVersion{ + chainsel.TEST_90000001.Selector: { + addr1: onRamp100, + addr2: onRamp100, + }, + chainsel.TEST_90000002.Selector: { + addr1: onRamp110, + addr3: onRamp110, + }, + }) + + copyOfBaseAB := NewMemoryAddressBookFromMap(baseAB.cloneAddresses(baseAB.addressesByChain)) + + // this address book shouldn't be removed (state of baseAB not changed, error thrown) + failAB := NewMemoryAddressBookFromMap(map[uint64]map[string]TypeAndVersion{ + chainsel.TEST_90000001.Selector: { + addr1: onRamp100, + addr3: onRamp100, // doesn't exist in TEST_90000001.Selector + }, + }) + require.Error(t, baseAB.Remove(failAB)) + require.EqualValues(t, baseAB, copyOfBaseAB) + + // this Address book should be removed without error + successAB := NewMemoryAddressBookFromMap(map[uint64]map[string]TypeAndVersion{ + chainsel.TEST_90000002.Selector: { + addr3: onRamp100, + }, + chainsel.TEST_90000001.Selector: { + addr2: onRamp100, + }, + }) + + expectingAB := NewMemoryAddressBookFromMap(map[uint64]map[string]TypeAndVersion{ + chainsel.TEST_90000001.Selector: { + addr1: onRamp100, + }, + chainsel.TEST_90000002.Selector: { + addr1: onRamp110}, + }) + + require.NoError(t, baseAB.Remove(successAB)) + require.EqualValues(t, baseAB, expectingAB) +} + +func TestAddressBook_ConcurrencyAndDeadlock(t *testing.T) { + onRamp100 := NewTypeAndVersion("OnRamp", Version1_0_0) + onRamp110 := NewTypeAndVersion("OnRamp", Version1_1_0) + + baseAB := NewMemoryAddressBookFromMap(map[uint64]map[string]TypeAndVersion{ + chainsel.TEST_90000001.Selector: { + common.BigToAddress(big.NewInt(1)).String(): onRamp100, + }, + }) + + // concurrent writes + var i int64 + wg := sync.WaitGroup{} + for i = 2; i < 1000; i++ { + wg.Add(1) + go func(input int64) { + require.NoError(t, baseAB.Save( + chainsel.TEST_90000001.Selector, + common.BigToAddress(big.NewInt(input)).String(), + onRamp100, + )) + wg.Done() + }(i) + } + + // concurrent reads + for i = 0; i < 100; i++ { + wg.Add(1) + go func(input int64) { + addresses, err := baseAB.Addresses() + require.NoError(t, err) + for chainSelector, chainAddresses := range addresses { + // concurrent read chainAddresses from Addresses() method + for address, _ := range chainAddresses { + addresses[chainSelector][address] = onRamp110 + } + + // concurrent read chainAddresses from AddressesForChain() method + chainAddresses, err = baseAB.AddressesForChain(chainSelector) + require.NoError(t, err) + for address, _ := range chainAddresses { + _ = addresses[chainSelector][address] + } + } + require.NoError(t, err) + wg.Done() + }(i) + } + + // concurrent merges, starts from 1001 to avoid address conflicts + for i = 1001; i < 1100; i++ { + wg.Add(1) + go func(input int64) { + // concurrent merge + additionalAB := NewMemoryAddressBookFromMap(map[uint64]map[string]TypeAndVersion{ + chainsel.TEST_90000002.Selector: { + common.BigToAddress(big.NewInt(input)).String(): onRamp100, + }, + }) + require.NoError(t, baseAB.Merge(additionalAB)) + wg.Done() + }(i) + } + + wg.Wait() +} diff --git a/deployment/ccip/add_lane.go b/deployment/ccip/add_lane.go index 9d09a56444c..8af96277fc2 100644 --- a/deployment/ccip/add_lane.go +++ b/deployment/ccip/add_lane.go @@ -7,6 +7,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/smartcontractkit/chainlink/deployment" + "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/ccipevm" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/offramp" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/fee_quoter" @@ -14,13 +15,23 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/router" ) -var ( - InitialLinkPrice = deployment.E18Mult(20) - InitialWethPrice = deployment.E18Mult(4000) - InitialGasPrice = big.NewInt(2e12) -) +type InitialPrices struct { + LinkPrice *big.Int // USD to the power of 18 (e18) per LINK + WethPrice *big.Int // USD to the power of 18 (e18) per WETH + GasPrice *big.Int // uint224 packed gas price in USD (112 for exec // 112 for da) +} + +var DefaultInitialPrices = InitialPrices{ + LinkPrice: deployment.E18Mult(20), + WethPrice: deployment.E18Mult(4000), + GasPrice: ToPackedFee(big.NewInt(8e14), big.NewInt(0)), +} + +func AddLaneWithDefaultPrices(e deployment.Environment, state CCIPOnChainState, from, to uint64) error { + return AddLane(e, state, from, to, DefaultInitialPrices) +} -func AddLane(e deployment.Environment, state CCIPOnChainState, from, to uint64) error { +func AddLane(e deployment.Environment, state CCIPOnChainState, from, to uint64, initialPrices InitialPrices) error { // TODO: Batch tx, err := state.Chains[from].Router.ApplyRampUpdates(e.Chains[from].DeployerKey, []router.RouterOnRamp{ { @@ -47,17 +58,17 @@ func AddLane(e deployment.Environment, state CCIPOnChainState, from, to uint64) TokenPriceUpdates: []fee_quoter.InternalTokenPriceUpdate{ { SourceToken: state.Chains[from].LinkToken.Address(), - UsdPerToken: InitialLinkPrice, + UsdPerToken: initialPrices.LinkPrice, }, { SourceToken: state.Chains[from].Weth9.Address(), - UsdPerToken: InitialWethPrice, + UsdPerToken: initialPrices.WethPrice, }, }, GasPriceUpdates: []fee_quoter.InternalGasPriceUpdate{ { DestChainSelector: to, - UsdPerUnitGas: InitialGasPrice, + UsdPerUnitGas: initialPrices.GasPrice, }, }}) if _, err := deployment.ConfirmIfNoError(e.Chains[from], tx, err); err != nil { @@ -112,15 +123,15 @@ func DefaultFeeQuoterDestChainConfig() fee_quoter.FeeQuoterDestChainConfig { MaxNumberOfTokensPerMsg: 10, MaxDataBytes: 256, MaxPerMsgGasLimit: 3_000_000, - DestGasOverhead: 50_000, + DestGasOverhead: ccipevm.DestGasOverhead, DefaultTokenFeeUSDCents: 1, - DestGasPerPayloadByte: 10, + DestGasPerPayloadByte: ccipevm.CalldataGasPerByte, DestDataAvailabilityOverheadGas: 100, DestGasPerDataAvailabilityByte: 100, DestDataAvailabilityMultiplierBps: 1, DefaultTokenDestGasOverhead: 125_000, DefaultTxGasLimit: 200_000, - GasMultiplierWeiPerEth: 1, + GasMultiplierWeiPerEth: 11e17, // Gas multiplier in wei per eth is scaled by 1e18, so 11e17 is 1.1 = 110% NetworkFeeUSDCents: 1, ChainFamilySelector: [4]byte(evmFamilySelector), } diff --git a/deployment/ccip/add_lane_test.go b/deployment/ccip/add_lane_test.go index 02fea79c911..5edfdae1ab0 100644 --- a/deployment/ccip/add_lane_test.go +++ b/deployment/ccip/add_lane_test.go @@ -32,9 +32,13 @@ func TestAddLane(t *testing.T) { feeds := state.Chains[e.FeedChainSel].USDFeeds tokenConfig := NewTestTokenConfig(feeds) + newAddresses := deployment.NewMemoryAddressBook() + err = DeployPrerequisiteChainContracts(e.Env, newAddresses, e.Env.AllChainSelectors()) + require.NoError(t, err) + require.NoError(t, e.Env.ExistingAddresses.Merge(newAddresses)) // Set up CCIP contracts and a DON per chain. - newAddresses := deployment.NewMemoryAddressBook() + newAddresses = deployment.NewMemoryAddressBook() err = DeployCCIPContracts(e.Env, newAddresses, DeployCCIPContractConfig{ HomeChainSel: e.HomeChainSel, FeedChainSel: e.FeedChainSel, @@ -60,7 +64,7 @@ func TestAddLane(t *testing.T) { require.NoError(t, err) // Add one lane from chain1 to chain 2 and send traffic. - require.NoError(t, AddLane(e.Env, state, chain1, chain2)) + require.NoError(t, AddLaneWithDefaultPrices(e.Env, state, chain1, chain2)) ReplayLogs(t, e.Env.Offchain, replayBlocks) time.Sleep(30 * time.Second) @@ -96,34 +100,34 @@ func TestAddLane(t *testing.T) { startBlock := latesthdr.Number.Uint64() // Send traffic on the first lane and it should not be processed by the plugin as onRamp is disabled // we will check this by confirming that the message is not executed by the end of the test - seqNum1 := TestSendRequest(t, e.Env, state, chain1, chain2, false, router.ClientEVM2AnyMessage{ + msgSentEvent1 := TestSendRequest(t, e.Env, state, chain1, chain2, false, router.ClientEVM2AnyMessage{ Receiver: common.LeftPadBytes(state.Chains[chain2].Receiver.Address().Bytes(), 32), Data: []byte("hello world"), TokenAmounts: nil, FeeToken: common.HexToAddress("0x0"), ExtraArgs: nil, }) - require.Equal(t, uint64(1), seqNum1) + require.Equal(t, uint64(1), msgSentEvent1.SequenceNumber) // Add another lane - require.NoError(t, AddLane(e.Env, state, chain2, chain1)) + require.NoError(t, AddLaneWithDefaultPrices(e.Env, state, chain2, chain1)) // Send traffic on the second lane and it should succeed latesthdr, err = e.Env.Chains[chain1].Client.HeaderByNumber(testcontext.Get(t), nil) require.NoError(t, err) startBlock2 := latesthdr.Number.Uint64() - seqNum2 := TestSendRequest(t, e.Env, state, chain2, chain1, false, router.ClientEVM2AnyMessage{ + msgSentEvent2 := TestSendRequest(t, e.Env, state, chain2, chain1, false, router.ClientEVM2AnyMessage{ Receiver: common.LeftPadBytes(state.Chains[chain2].Receiver.Address().Bytes(), 32), Data: []byte("hello world"), TokenAmounts: nil, FeeToken: common.HexToAddress("0x0"), ExtraArgs: nil, }) - require.Equal(t, uint64(1), seqNum2) - require.NoError(t, commonutils.JustError(ConfirmExecWithSeqNr(t, e.Env.Chains[chain2], e.Env.Chains[chain1], state.Chains[chain1].OffRamp, &startBlock2, seqNum2))) + require.Equal(t, uint64(1), msgSentEvent2.SequenceNumber) + require.NoError(t, commonutils.JustError(ConfirmExecWithSeqNr(t, e.Env.Chains[chain2], e.Env.Chains[chain1], state.Chains[chain1].OffRamp, &startBlock2, msgSentEvent2.SequenceNumber))) // now check for the previous message from chain 1 to chain 2 that it has not been executed till now as the onRamp was disabled - ConfirmNoExecConsistentlyWithSeqNr(t, e.Env.Chains[chain1], e.Env.Chains[chain2], state.Chains[chain2].OffRamp, seqNum1, 30*time.Second) + ConfirmNoExecConsistentlyWithSeqNr(t, e.Env.Chains[chain1], e.Env.Chains[chain2], state.Chains[chain2].OffRamp, msgSentEvent1.SequenceNumber, 30*time.Second) // enable the onRamp on OffRamp enableRampTx, err := state.Chains[chain2].OffRamp.ApplySourceChainConfigUpdates(e.Env.Chains[chain2].DeployerKey, []offramp.OffRampSourceChainConfigArgs{ @@ -146,5 +150,5 @@ func TestAddLane(t *testing.T) { ReplayLogs(t, e.Env.Offchain, replayBlocks) time.Sleep(30 * time.Second) // Now that the onRamp is enabled, the request should be processed - require.NoError(t, commonutils.JustError(ConfirmExecWithSeqNr(t, e.Env.Chains[chain1], e.Env.Chains[chain2], state.Chains[chain2].OffRamp, &startBlock, seqNum1))) + require.NoError(t, commonutils.JustError(ConfirmExecWithSeqNr(t, e.Env.Chains[chain1], e.Env.Chains[chain2], state.Chains[chain2].OffRamp, &startBlock, msgSentEvent1.SequenceNumber))) } diff --git a/deployment/ccip/changeset/active_candidate.go b/deployment/ccip/changeset/active_candidate.go index e1d67720d12..9f46b8d20f1 100644 --- a/deployment/ccip/changeset/active_candidate.go +++ b/deployment/ccip/changeset/active_candidate.go @@ -59,6 +59,7 @@ func SetCandidatePluginChangeset( tokenConfig.GetTokenInfo(e.Logger, state.Chains[newChainSel].LinkToken, state.Chains[newChainSel].Weth9), nodes.NonBootstraps(), state.Chains[homeChainSel].RMNHome.Address(), + nil, ) if err != nil { return deployment.ChangesetOutput{}, err diff --git a/deployment/ccip/changeset/active_candidate_test.go b/deployment/ccip/changeset/active_candidate_test.go index 9daf383c971..cd1d7604817 100644 --- a/deployment/ccip/changeset/active_candidate_test.go +++ b/deployment/ccip/changeset/active_candidate_test.go @@ -28,7 +28,7 @@ func TestActiveCandidate(t *testing.T) { lggr := logger.TestLogger(t) ctx := ccdeploy.Context(t) - tenv := ccdeploy.NewMemoryEnvironment(t, lggr, 3, 5) + tenv := ccdeploy.NewMemoryEnvironment(t, lggr, 3, 5, ccdeploy.MockLinkPrice, ccdeploy.MockWethPrice) e := tenv.Env state, err := ccdeploy.LoadOnchainState(tenv.Env) @@ -84,14 +84,14 @@ func TestActiveCandidate(t *testing.T) { require.NoError(t, err) block := latesthdr.Number.Uint64() startBlocks[dest] = &block - seqNum := ccdeploy.TestSendRequest(t, e, state, src, dest, false, router.ClientEVM2AnyMessage{ + msgSentEvent := ccdeploy.TestSendRequest(t, e, state, src, dest, false, router.ClientEVM2AnyMessage{ Receiver: common.LeftPadBytes(state.Chains[dest].Receiver.Address().Bytes(), 32), Data: []byte("hello world"), TokenAmounts: nil, FeeToken: common.HexToAddress("0x0"), ExtraArgs: nil, }) - expectedSeqNum[dest] = seqNum + expectedSeqNum[dest] = msgSentEvent.SequenceNumber } } @@ -160,6 +160,7 @@ func TestActiveCandidate(t *testing.T) { tokenConfig.GetTokenInfo(e.Logger, state.Chains[destCS].LinkToken, state.Chains[destCS].Weth9), nodes.NonBootstraps(), rmnHomeAddress, + nil, ) require.NoError(t, err) diff --git a/deployment/ccip/changeset/add_chain.go b/deployment/ccip/changeset/add_chain.go index aa88e0f112f..3ce6d17d24e 100644 --- a/deployment/ccip/changeset/add_chain.go +++ b/deployment/ccip/changeset/add_chain.go @@ -107,6 +107,7 @@ func AddDonAndSetCandidateChangeset( tokenConfig.GetTokenInfo(e.Logger, state.Chains[newChainSel].LinkToken, state.Chains[newChainSel].Weth9), nodes.NonBootstraps(), state.Chains[homeChainSel].RMNHome.Address(), + nil, ) if err != nil { return deployment.ChangesetOutput{}, err diff --git a/deployment/ccip/changeset/add_chain_test.go b/deployment/ccip/changeset/add_chain_test.go index 6a87bdd0a0a..2d79a76005d 100644 --- a/deployment/ccip/changeset/add_chain_test.go +++ b/deployment/ccip/changeset/add_chain_test.go @@ -36,9 +36,13 @@ func TestAddChainInbound(t *testing.T) { newChain := e.Env.AllChainSelectorsExcluding([]uint64{e.HomeChainSel})[0] // We deploy to the rest. initialDeploy := e.Env.AllChainSelectorsExcluding([]uint64{newChain}) + newAddresses := deployment.NewMemoryAddressBook() + err = ccipdeployment.DeployPrerequisiteChainContracts(e.Env, newAddresses, initialDeploy) + require.NoError(t, err) + require.NoError(t, e.Env.ExistingAddresses.Merge(newAddresses)) tokenConfig := ccipdeployment.NewTestTokenConfig(state.Chains[e.FeedChainSel].USDFeeds) - newAddresses := deployment.NewMemoryAddressBook() + newAddresses = deployment.NewMemoryAddressBook() err = ccipdeployment.DeployCCIPContracts(e.Env, newAddresses, ccipdeployment.DeployCCIPContractConfig{ HomeChainSel: e.HomeChainSel, FeedChainSel: e.FeedChainSel, @@ -56,7 +60,7 @@ func TestAddChainInbound(t *testing.T) { for _, source := range initialDeploy { for _, dest := range initialDeploy { if source != dest { - require.NoError(t, ccipdeployment.AddLane(e.Env, state, source, dest)) + require.NoError(t, ccipdeployment.AddLaneWithDefaultPrices(e.Env, state, source, dest)) } } } @@ -68,15 +72,16 @@ func TestAddChainInbound(t *testing.T) { require.NoError(t, err) // Deploy contracts to new chain - newChainAddresses := deployment.NewMemoryAddressBook() + newAddresses = deployment.NewMemoryAddressBook() + err = ccipdeployment.DeployPrerequisiteChainContracts(e.Env, newAddresses, []uint64{newChain}) + require.NoError(t, err) + require.NoError(t, e.Env.ExistingAddresses.Merge(newAddresses)) + newAddresses = deployment.NewMemoryAddressBook() err = ccipdeployment.DeployChainContracts(e.Env, - e.Env.Chains[newChain], newChainAddresses, - ccipdeployment.FeeTokenContracts{ - LinkToken: state.Chains[newChain].LinkToken, - Weth9: state.Chains[newChain].Weth9, - }, ccipdeployment.NewTestMCMSConfig(t, e.Env), rmnHome) + e.Env.Chains[newChain], newAddresses, + ccipdeployment.NewTestMCMSConfig(t, e.Env), rmnHome) require.NoError(t, err) - require.NoError(t, e.Env.ExistingAddresses.Merge(newChainAddresses)) + require.NoError(t, e.Env.ExistingAddresses.Merge(newAddresses)) state, err = ccipdeployment.LoadOnchainState(e.Env) require.NoError(t, err) @@ -212,7 +217,7 @@ func TestAddChainInbound(t *testing.T) { latesthdr, err := e.Env.Chains[newChain].Client.HeaderByNumber(testcontext.Get(t), nil) require.NoError(t, err) startBlock := latesthdr.Number.Uint64() - seqNr := ccipdeployment.TestSendRequest(t, e.Env, state, initialDeploy[0], newChain, true, router.ClientEVM2AnyMessage{ + msgSentEvent := ccipdeployment.TestSendRequest(t, e.Env, state, initialDeploy[0], newChain, true, router.ClientEVM2AnyMessage{ Receiver: common.LeftPadBytes(state.Chains[newChain].Receiver.Address().Bytes(), 32), Data: []byte("hello world"), TokenAmounts: nil, @@ -222,10 +227,10 @@ func TestAddChainInbound(t *testing.T) { require.NoError(t, ccipdeployment.ConfirmCommitWithExpectedSeqNumRange(t, e.Env.Chains[initialDeploy[0]], e.Env.Chains[newChain], state.Chains[newChain].OffRamp, &startBlock, cciptypes.SeqNumRange{ cciptypes.SeqNum(1), - cciptypes.SeqNum(seqNr), + cciptypes.SeqNum(msgSentEvent.SequenceNumber), })) require.NoError(t, - commonutils.JustError(ccipdeployment.ConfirmExecWithSeqNr(t, e.Env.Chains[initialDeploy[0]], e.Env.Chains[newChain], state.Chains[newChain].OffRamp, &startBlock, seqNr))) + commonutils.JustError(ccipdeployment.ConfirmExecWithSeqNr(t, e.Env.Chains[initialDeploy[0]], e.Env.Chains[newChain], state.Chains[newChain].OffRamp, &startBlock, msgSentEvent.SequenceNumber))) linkAddress := state.Chains[newChain].LinkToken.Address() feeQuoter := state.Chains[newChain].FeeQuoter diff --git a/deployment/ccip/changeset/home_chain.go b/deployment/ccip/changeset/home_chain.go index 7d7f64a8bb8..0fabd2efb18 100644 --- a/deployment/ccip/changeset/home_chain.go +++ b/deployment/ccip/changeset/home_chain.go @@ -17,7 +17,6 @@ var _ deployment.ChangeSet[DeployHomeChainConfig] = DeployHomeChain // DeployHomeChain is a separate changeset because it is a standalone deployment performed once in home chain for the entire CCIP deployment. func DeployHomeChain(env deployment.Environment, cfg DeployHomeChainConfig) (deployment.ChangesetOutput, error) { - err := cfg.Validate() if err != nil { return deployment.ChangesetOutput{}, errors.Wrapf(deployment.ErrInvalidConfig, "%v", err) diff --git a/deployment/ccip/changeset/initial_deploy_test.go b/deployment/ccip/changeset/initial_deploy_test.go index b7dbdfcc972..a3756022245 100644 --- a/deployment/ccip/changeset/initial_deploy_test.go +++ b/deployment/ccip/changeset/initial_deploy_test.go @@ -4,12 +4,12 @@ import ( "testing" "github.com/ethereum/go-ethereum/common" - "github.com/smartcontractkit/chainlink/deployment" - - ccdeploy "github.com/smartcontractkit/chainlink/deployment/ccip" jobv1 "github.com/smartcontractkit/chainlink-protos/job-distributor/v1/job" + "github.com/smartcontractkit/chainlink/deployment" + ccdeploy "github.com/smartcontractkit/chainlink/deployment/ccip" + "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/testcontext" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/router" @@ -21,14 +21,18 @@ import ( func TestInitialDeploy(t *testing.T) { lggr := logger.TestLogger(t) ctx := ccdeploy.Context(t) - tenv := ccdeploy.NewMemoryEnvironment(t, lggr, 3, 4) + tenv := ccdeploy.NewMemoryEnvironment(t, lggr, 3, 4, ccdeploy.MockLinkPrice, ccdeploy.MockWethPrice) e := tenv.Env state, err := ccdeploy.LoadOnchainState(tenv.Env) require.NoError(t, err) - require.NotNil(t, state.Chains[tenv.HomeChainSel].LinkToken) + output, err := DeployPrerequisites(e, DeployPrerequisiteConfig{ + ChainSelectors: tenv.Env.AllChainSelectors(), + }) + require.NoError(t, err) + require.NoError(t, tenv.Env.ExistingAddresses.Merge(output.AddressBook)) - output, err := InitialDeploy(tenv.Env, ccdeploy.DeployCCIPContractConfig{ + output, err = InitialDeploy(tenv.Env, ccdeploy.DeployCCIPContractConfig{ HomeChainSel: tenv.HomeChainSel, FeedChainSel: tenv.FeedChainSel, ChainsToDeploy: tenv.Env.AllChainSelectors(), @@ -41,7 +45,7 @@ func TestInitialDeploy(t *testing.T) { require.NoError(t, tenv.Env.ExistingAddresses.Merge(output.AddressBook)) state, err = ccdeploy.LoadOnchainState(e) require.NoError(t, err) - + require.NotNil(t, state.Chains[tenv.HomeChainSel].LinkToken) // Ensure capreg logs are up to date. ccdeploy.ReplayLogs(t, e.Offchain, tenv.ReplayBlocks) @@ -74,14 +78,14 @@ func TestInitialDeploy(t *testing.T) { require.NoError(t, err) block := latesthdr.Number.Uint64() startBlocks[dest] = &block - seqNum := ccdeploy.TestSendRequest(t, e, state, src, dest, false, router.ClientEVM2AnyMessage{ + msgSentEvent := ccdeploy.TestSendRequest(t, e, state, src, dest, false, router.ClientEVM2AnyMessage{ Receiver: common.LeftPadBytes(state.Chains[dest].Receiver.Address().Bytes(), 32), Data: []byte("hello"), TokenAmounts: nil, FeeToken: common.HexToAddress("0x0"), ExtraArgs: nil, }) - expectedSeqNum[dest] = seqNum + expectedSeqNum[dest] = msgSentEvent.SequenceNumber } } @@ -89,7 +93,8 @@ func TestInitialDeploy(t *testing.T) { ccdeploy.ConfirmCommitForAllWithExpectedSeqNums(t, e, state, expectedSeqNum, startBlocks) // Confirm token and gas prices are updated - ccdeploy.ConfirmTokenPriceUpdatedForAll(t, e, state, startBlocks) + ccdeploy.ConfirmTokenPriceUpdatedForAll(t, e, state, startBlocks, + ccdeploy.DefaultInitialPrices.LinkPrice, ccdeploy.DefaultInitialPrices.WethPrice) // TODO: Fix gas prices? //ccdeploy.ConfirmGasPriceUpdatedForAll(t, e, state, startBlocks) // diff --git a/deployment/ccip/changeset/prerequisites.go b/deployment/ccip/changeset/prerequisites.go new file mode 100644 index 00000000000..7bead1cc05c --- /dev/null +++ b/deployment/ccip/changeset/prerequisites.go @@ -0,0 +1,58 @@ +package changeset + +import ( + "fmt" + + "github.com/ethereum/go-ethereum/common" + "github.com/pkg/errors" + "github.com/smartcontractkit/ccip-owner-contracts/pkg/proposal/timelock" + chain_selectors "github.com/smartcontractkit/chain-selectors" + + "github.com/smartcontractkit/chainlink/deployment" + ccipdeployment "github.com/smartcontractkit/chainlink/deployment/ccip" +) + +var ( + _ deployment.ChangeSet[DeployPrerequisiteConfig] = DeployPrerequisites +) + +// DeployPrerequisites deploys the pre-requisite contracts for CCIP +// pre-requisite contracts are the contracts which can be reused from previous versions of CCIP +func DeployPrerequisites(env deployment.Environment, cfg DeployPrerequisiteConfig) (deployment.ChangesetOutput, error) { + err := cfg.Validate() + if err != nil { + return deployment.ChangesetOutput{}, errors.Wrapf(deployment.ErrInvalidConfig, "%v", err) + } + ab := deployment.NewMemoryAddressBook() + err = ccipdeployment.DeployPrerequisiteChainContracts(env, ab, cfg.ChainSelectors) + if err != nil { + env.Logger.Errorw("Failed to deploy prerequisite contracts", "err", err, "addressBook", ab) + return deployment.ChangesetOutput{}, fmt.Errorf("failed to deploy prerequisite contracts: %w", err) + } + return deployment.ChangesetOutput{ + Proposals: []timelock.MCMSWithTimelockProposal{}, + AddressBook: ab, + JobSpecs: nil, + }, nil +} + +type DeployPrerequisiteConfig struct { + ChainSelectors []uint64 + // TODO handle tokens and feeds in prerequisite config + Tokens map[ccipdeployment.TokenSymbol]common.Address + Feeds map[ccipdeployment.TokenSymbol]common.Address +} + +func (c DeployPrerequisiteConfig) Validate() error { + for _, cs := range c.ChainSelectors { + if cs == 0 { + return fmt.Errorf("chain selector must be set") + } + _, err := chain_selectors.ChainIdFromSelector(cs) + if err != nil { + return fmt.Errorf("invalid chain selector: %d - %w", cs, err) + } + + } + return nil +} diff --git a/deployment/ccip/changeset/prerequisites_test.go b/deployment/ccip/changeset/prerequisites_test.go new file mode 100644 index 00000000000..94d5c8d0581 --- /dev/null +++ b/deployment/ccip/changeset/prerequisites_test.go @@ -0,0 +1,37 @@ +package changeset + +import ( + "testing" + + "github.com/stretchr/testify/require" + "go.uber.org/zap/zapcore" + + ccipdeployment "github.com/smartcontractkit/chainlink/deployment/ccip" + "github.com/smartcontractkit/chainlink/deployment/environment/memory" + "github.com/smartcontractkit/chainlink/v2/core/logger" +) + +func TestDeployPrerequisites(t *testing.T) { + t.Parallel() + lggr := logger.TestLogger(t) + e := memory.NewMemoryEnvironment(t, lggr, zapcore.InfoLevel, memory.MemoryEnvironmentConfig{ + Bootstraps: 1, + Chains: 2, + Nodes: 4, + }) + newChain := e.AllChainSelectors()[0] + cfg := DeployPrerequisiteConfig{ + ChainSelectors: []uint64{newChain}, + } + output, err := DeployPrerequisites(e, cfg) + require.NoError(t, err) + err = e.ExistingAddresses.Merge(output.AddressBook) + require.NoError(t, err) + state, err := ccipdeployment.LoadOnchainState(e) + require.NoError(t, err) + require.NotNil(t, state.Chains[newChain].LinkToken) + require.NotNil(t, state.Chains[newChain].Weth9) + require.NotNil(t, state.Chains[newChain].TokenAdminRegistry) + require.NotNil(t, state.Chains[newChain].RegistryModule) + require.NotNil(t, state.Chains[newChain].Router) +} diff --git a/deployment/ccip/changeset/save_existing.go b/deployment/ccip/changeset/save_existing.go new file mode 100644 index 00000000000..8995fdf7f4c --- /dev/null +++ b/deployment/ccip/changeset/save_existing.go @@ -0,0 +1,68 @@ +package changeset + +import ( + "fmt" + + "github.com/ethereum/go-ethereum/common" + "github.com/pkg/errors" + "github.com/smartcontractkit/ccip-owner-contracts/pkg/proposal/timelock" + chain_selectors "github.com/smartcontractkit/chain-selectors" + + "github.com/smartcontractkit/chainlink/deployment" +) + +var ( + _ deployment.ChangeSet[ExistingContractsConfig] = SaveExistingContracts +) + +type Contract struct { + Address common.Address + TypeAndVersion deployment.TypeAndVersion + ChainSelector uint64 +} + +type ExistingContractsConfig struct { + ExistingContracts []Contract +} + +func (cfg ExistingContractsConfig) Validate() error { + for _, ec := range cfg.ExistingContracts { + if ec.ChainSelector == 0 { + return fmt.Errorf("chain selectors must be set") + } + _, err := chain_selectors.ChainIdFromSelector(ec.ChainSelector) + if err != nil { + return fmt.Errorf("invalid chain selector: %d - %w", ec.ChainSelector, err) + } + if ec.Address == (common.Address{}) { + return fmt.Errorf("address must be set") + } + if ec.TypeAndVersion.Type == "" { + return fmt.Errorf("type must be set") + } + if val, err := ec.TypeAndVersion.Version.Value(); err != nil || val == "" { + return fmt.Errorf("version must be set") + } + } + return nil +} + +func SaveExistingContracts(env deployment.Environment, cfg ExistingContractsConfig) (deployment.ChangesetOutput, error) { + err := cfg.Validate() + if err != nil { + return deployment.ChangesetOutput{}, errors.Wrapf(deployment.ErrInvalidConfig, "%v", err) + } + ab := deployment.NewMemoryAddressBook() + for _, ec := range cfg.ExistingContracts { + err = ab.Save(ec.ChainSelector, ec.Address.String(), ec.TypeAndVersion) + if err != nil { + env.Logger.Errorw("Failed to save existing contract", "err", err, "addressBook", ab) + return deployment.ChangesetOutput{}, fmt.Errorf("failed to save existing contract: %w", err) + } + } + return deployment.ChangesetOutput{ + Proposals: []timelock.MCMSWithTimelockProposal{}, + AddressBook: ab, + JobSpecs: nil, + }, nil +} diff --git a/deployment/ccip/changeset/save_existing_test.go b/deployment/ccip/changeset/save_existing_test.go new file mode 100644 index 00000000000..5f09c13b272 --- /dev/null +++ b/deployment/ccip/changeset/save_existing_test.go @@ -0,0 +1,69 @@ +package changeset + +import ( + "math/big" + "testing" + + "github.com/ethereum/go-ethereum/common" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zapcore" + + "github.com/smartcontractkit/chainlink/deployment" + ccipdeployment "github.com/smartcontractkit/chainlink/deployment/ccip" + "github.com/smartcontractkit/chainlink/deployment/environment/memory" + "github.com/smartcontractkit/chainlink/v2/core/logger" +) + +func TestSaveExisting(t *testing.T) { + t.Parallel() + lggr := logger.TestLogger(t) + e := memory.NewMemoryEnvironment(t, lggr, zapcore.InfoLevel, memory.MemoryEnvironmentConfig{ + Bootstraps: 1, + Chains: 2, + Nodes: 4, + }) + chains := e.AllChainSelectors() + chain1 := chains[0] + chain2 := chains[1] + cfg := ExistingContractsConfig{ + ExistingContracts: []Contract{ + { + Address: common.BigToAddress(big.NewInt(1)), + TypeAndVersion: deployment.NewTypeAndVersion(ccipdeployment.LinkToken, deployment.Version1_0_0), + ChainSelector: chain1, + }, + { + Address: common.BigToAddress(big.NewInt(2)), + TypeAndVersion: deployment.NewTypeAndVersion(ccipdeployment.WETH9, deployment.Version1_0_0), + ChainSelector: chain1, + }, + { + Address: common.BigToAddress(big.NewInt(3)), + TypeAndVersion: deployment.NewTypeAndVersion(ccipdeployment.TokenAdminRegistry, deployment.Version1_5_0), + ChainSelector: chain1, + }, + { + Address: common.BigToAddress(big.NewInt(4)), + TypeAndVersion: deployment.NewTypeAndVersion(ccipdeployment.RegistryModule, deployment.Version1_5_0), + ChainSelector: chain2, + }, + { + Address: common.BigToAddress(big.NewInt(5)), + TypeAndVersion: deployment.NewTypeAndVersion(ccipdeployment.Router, deployment.Version1_2_0), + ChainSelector: chain2, + }, + }, + } + + output, err := SaveExistingContracts(e, cfg) + require.NoError(t, err) + err = e.ExistingAddresses.Merge(output.AddressBook) + require.NoError(t, err) + state, err := ccipdeployment.LoadOnchainState(e) + require.NoError(t, err) + require.Equal(t, state.Chains[chain1].LinkToken.Address(), common.BigToAddress(big.NewInt(1))) + require.Equal(t, state.Chains[chain1].Weth9.Address(), common.BigToAddress(big.NewInt(2))) + require.Equal(t, state.Chains[chain1].TokenAdminRegistry.Address(), common.BigToAddress(big.NewInt(3))) + require.Equal(t, state.Chains[chain2].RegistryModule.Address(), common.BigToAddress(big.NewInt(4))) + require.Equal(t, state.Chains[chain2].Router.Address(), common.BigToAddress(big.NewInt(5))) +} diff --git a/deployment/ccip/consts.go b/deployment/ccip/consts.go index e9b7a9f2cec..48466bcef46 100644 --- a/deployment/ccip/consts.go +++ b/deployment/ccip/consts.go @@ -5,6 +5,7 @@ type TokenSymbol string const ( LinkSymbol TokenSymbol = "LINK" WethSymbol TokenSymbol = "WETH" + USDCSymbol TokenSymbol = "USDC" LinkDecimals = 18 WethDecimals = 18 ) diff --git a/deployment/ccip/deploy.go b/deployment/ccip/deploy.go index 77df3aab60f..83e233b71bb 100644 --- a/deployment/ccip/deploy.go +++ b/deployment/ccip/deploy.go @@ -7,36 +7,34 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/core/types" + "github.com/pkg/errors" "github.com/smartcontractkit/ccip-owner-contracts/pkg/config" owner_helpers "github.com/smartcontractkit/ccip-owner-contracts/pkg/gethwrappers" - + cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" + "github.com/smartcontractkit/chainlink-ccip/pluginconfig" + commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" "github.com/smartcontractkit/chainlink-common/pkg/logger" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/fee_quoter" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/registry_module_owner_custom" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/rmn_home" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/aggregator_v3_interface" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/shared/generated/erc20" - "github.com/smartcontractkit/chainlink/deployment" - - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/burn_mint_token_pool" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/ccip_home" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/fee_quoter" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/maybe_revert_message_receiver" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/mock_rmn_contract" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/nonce_manager" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/offramp" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/onramp" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/registry_module_owner_custom" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/rmn_home" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/rmn_proxy_contract" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/rmn_remote" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/router" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/token_admin_registry" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/weth9" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/capabilities_registry" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/shared/generated/burn_mint_erc677" ) var ( + MockRMN deployment.ContractType = "MockRMN" RMNRemote deployment.ContractType = "RMNRemote" LinkToken deployment.ContractType = "LinkToken" ARMProxy deployment.ContractType = "ARMProxy" @@ -60,69 +58,226 @@ var ( CapabilitiesRegistry deployment.ContractType = "CapabilitiesRegistry" PriceFeed deployment.ContractType = "PriceFeed" // Note test router maps to a regular router contract. - TestRouter deployment.ContractType = "TestRouter" - CCIPReceiver deployment.ContractType = "CCIPReceiver" - BurnMintToken deployment.ContractType = "BurnMintToken" - BurnMintTokenPool deployment.ContractType = "BurnMintTokenPool" + TestRouter deployment.ContractType = "TestRouter" + CCIPReceiver deployment.ContractType = "CCIPReceiver" + BurnMintToken deployment.ContractType = "BurnMintToken" + BurnMintTokenPool deployment.ContractType = "BurnMintTokenPool" + USDCToken deployment.ContractType = "USDCToken" + USDCMockTransmitter deployment.ContractType = "USDCMockTransmitter" + USDCTokenMessenger deployment.ContractType = "USDCTokenMessenger" + USDCTokenPool deployment.ContractType = "USDCTokenPool" ) -type Contracts interface { - *capabilities_registry.CapabilitiesRegistry | - *rmn_proxy_contract.RMNProxyContract | - *ccip_home.CCIPHome | - *rmn_home.RMNHome | - *nonce_manager.NonceManager | - *fee_quoter.FeeQuoter | - *router.Router | - *token_admin_registry.TokenAdminRegistry | - *registry_module_owner_custom.RegistryModuleOwnerCustom | - *weth9.WETH9 | - *rmn_remote.RMNRemote | - *owner_helpers.ManyChainMultiSig | - *owner_helpers.RBACTimelock | - *offramp.OffRamp | - *onramp.OnRamp | - *burn_mint_erc677.BurnMintERC677 | - *burn_mint_token_pool.BurnMintTokenPool | - *maybe_revert_message_receiver.MaybeRevertMessageReceiver | - *aggregator_v3_interface.AggregatorV3Interface | - *erc20.ERC20 -} - -type ContractDeploy[C Contracts] struct { - // We just keep all the deploy return values - // since some will be empty if there's an error. - Address common.Address - Contract C - Tx *types.Transaction - Tv deployment.TypeAndVersion - Err error +func DeployPrerequisiteChainContracts(e deployment.Environment, ab deployment.AddressBook, selectors []uint64) error { + state, err := LoadOnchainState(e) + if err != nil { + e.Logger.Errorw("Failed to load existing onchain state", "err") + return err + } + for _, sel := range selectors { + chain := e.Chains[sel] + err = DeployPrerequisiteContracts(e, ab, state, chain) + if err != nil { + return errors.Wrapf(err, "failed to deploy prerequisite contracts for chain %d", sel) + } + } + return nil } -// TODO: pull up to general deployment pkg somehow -// without exposing all product specific contracts? -func deployContract[C Contracts]( - lggr logger.Logger, - chain deployment.Chain, - addressBook deployment.AddressBook, - deploy func(chain deployment.Chain) ContractDeploy[C], -) (*ContractDeploy[C], error) { - contractDeploy := deploy(chain) - if contractDeploy.Err != nil { - lggr.Errorw("Failed to deploy contract", "err", contractDeploy.Err) - return nil, contractDeploy.Err - } - _, err := chain.Confirm(contractDeploy.Tx) - if err != nil { - lggr.Errorw("Failed to confirm deployment", "err", err) - return nil, err +// DeployPrerequisiteContracts deploys the contracts that can be ported from previous CCIP version to the new one. +// This is only required for staging and test environments where the contracts are not already deployed. +func DeployPrerequisiteContracts(e deployment.Environment, ab deployment.AddressBook, state CCIPOnChainState, chain deployment.Chain) error { + lggr := e.Logger + chainState, chainExists := state.Chains[chain.Selector] + var weth9Contract *weth9.WETH9 + var linkTokenContract *burn_mint_erc677.BurnMintERC677 + var tokenAdminReg *token_admin_registry.TokenAdminRegistry + var registryModule *registry_module_owner_custom.RegistryModuleOwnerCustom + var rmnProxy *rmn_proxy_contract.RMNProxyContract + var r *router.Router + if chainExists { + weth9Contract = chainState.Weth9 + linkTokenContract = chainState.LinkToken + tokenAdminReg = chainState.TokenAdminRegistry + registryModule = chainState.RegistryModule + rmnProxy = chainState.RMNProxyExisting + r = chainState.Router + } + if rmnProxy == nil { + // we want to replicate the mainnet scenario where RMNProxy is already deployed with some existing RMN + // This will need us to use two different RMNProxy contracts + // 1. RMNProxyNew with RMNRemote - ( deployed later in chain contracts) + // 2. RMNProxyExisting with mockRMN - ( deployed here, replicating the behavior of existing RMNProxy with already set RMN) + rmn, err := deployment.DeployContract(lggr, chain, ab, + func(chain deployment.Chain) deployment.ContractDeploy[*mock_rmn_contract.MockRMNContract] { + rmnAddr, tx2, rmn, err2 := mock_rmn_contract.DeployMockRMNContract( + chain.DeployerKey, + chain.Client, + ) + return deployment.ContractDeploy[*mock_rmn_contract.MockRMNContract]{ + rmnAddr, rmn, tx2, deployment.NewTypeAndVersion(MockRMN, deployment.Version1_0_0), err2, + } + }) + if err != nil { + lggr.Errorw("Failed to deploy mock RMN", "err", err) + return err + } + lggr.Infow("deployed mock RMN", "addr", rmn.Address) + rmnProxyContract, err := deployment.DeployContract(lggr, chain, ab, + func(chain deployment.Chain) deployment.ContractDeploy[*rmn_proxy_contract.RMNProxyContract] { + rmnProxyAddr, tx2, rmnProxy, err2 := rmn_proxy_contract.DeployRMNProxyContract( + chain.DeployerKey, + chain.Client, + rmn.Address, + ) + return deployment.ContractDeploy[*rmn_proxy_contract.RMNProxyContract]{ + rmnProxyAddr, rmnProxy, tx2, deployment.NewTypeAndVersion(ARMProxy, deployment.Version1_0_0), err2, + } + }) + if err != nil { + lggr.Errorw("Failed to deploy RMNProxyNew", "err", err) + return err + } + lggr.Infow("deployed RMNProxyNew", "addr", rmnProxyContract.Address) + rmnProxy = rmnProxyContract.Contract + } + if tokenAdminReg == nil { + tokenAdminRegistry, err := deployment.DeployContract(e.Logger, chain, ab, + func(chain deployment.Chain) deployment.ContractDeploy[*token_admin_registry.TokenAdminRegistry] { + tokenAdminRegistryAddr, tx2, tokenAdminRegistry, err2 := token_admin_registry.DeployTokenAdminRegistry( + chain.DeployerKey, + chain.Client) + return deployment.ContractDeploy[*token_admin_registry.TokenAdminRegistry]{ + tokenAdminRegistryAddr, tokenAdminRegistry, tx2, deployment.NewTypeAndVersion(TokenAdminRegistry, deployment.Version1_5_0), err2, + } + }) + if err != nil { + e.Logger.Errorw("Failed to deploy token admin registry", "err", err) + return err + } + e.Logger.Infow("deployed tokenAdminRegistry", "addr", tokenAdminRegistry) + tokenAdminReg = tokenAdminRegistry.Contract + } else { + e.Logger.Infow("tokenAdminRegistry already deployed", "addr", tokenAdminReg.Address) + } + if registryModule == nil { + customRegistryModule, err := deployment.DeployContract(e.Logger, chain, ab, + func(chain deployment.Chain) deployment.ContractDeploy[*registry_module_owner_custom.RegistryModuleOwnerCustom] { + regModAddr, tx2, regMod, err2 := registry_module_owner_custom.DeployRegistryModuleOwnerCustom( + chain.DeployerKey, + chain.Client, + tokenAdminReg.Address()) + return deployment.ContractDeploy[*registry_module_owner_custom.RegistryModuleOwnerCustom]{ + regModAddr, regMod, tx2, deployment.NewTypeAndVersion(RegistryModule, deployment.Version1_5_0), err2, + } + }) + if err != nil { + e.Logger.Errorw("Failed to deploy custom registry module", "err", err) + return err + } + e.Logger.Infow("deployed custom registry module", "addr", customRegistryModule) + registryModule = customRegistryModule.Contract + } else { + e.Logger.Infow("custom registry module already deployed", "addr", registryModule.Address) } - err = addressBook.Save(chain.Selector, contractDeploy.Address.String(), contractDeploy.Tv) + isRegistryAdded, err := tokenAdminReg.IsRegistryModule(nil, registryModule.Address()) if err != nil { - lggr.Errorw("Failed to save contract address", "err", err) - return nil, err + e.Logger.Errorw("Failed to check if registry module is added on token admin registry", "err", err) + return fmt.Errorf("failed to check if registry module is added on token admin registry: %w", err) + } + if !isRegistryAdded { + tx, err := tokenAdminReg.AddRegistryModule(chain.DeployerKey, registryModule.Address()) + if err != nil { + e.Logger.Errorw("Failed to assign registry module on token admin registry", "err", err) + return fmt.Errorf("failed to assign registry module on token admin registry: %w", err) + } + + _, err = chain.Confirm(tx) + if err != nil { + e.Logger.Errorw("Failed to confirm assign registry module on token admin registry", "err", err) + return fmt.Errorf("failed to confirm assign registry module on token admin registry: %w", err) + } + e.Logger.Infow("assigned registry module on token admin registry") + } + if weth9Contract == nil { + weth, err := deployment.DeployContract(lggr, chain, ab, + func(chain deployment.Chain) deployment.ContractDeploy[*weth9.WETH9] { + weth9Addr, tx2, weth9c, err2 := weth9.DeployWETH9( + chain.DeployerKey, + chain.Client, + ) + return deployment.ContractDeploy[*weth9.WETH9]{ + weth9Addr, weth9c, tx2, deployment.NewTypeAndVersion(WETH9, deployment.Version1_0_0), err2, + } + }) + if err != nil { + lggr.Errorw("Failed to deploy weth9", "err", err) + return err + } + lggr.Infow("deployed weth9", "addr", weth.Address) + weth9Contract = weth.Contract + } else { + lggr.Infow("weth9 already deployed", "addr", weth9Contract.Address) + } + if linkTokenContract == nil { + linkToken, err := deployment.DeployContract(lggr, chain, ab, + func(chain deployment.Chain) deployment.ContractDeploy[*burn_mint_erc677.BurnMintERC677] { + linkTokenAddr, tx2, linkToken, err2 := burn_mint_erc677.DeployBurnMintERC677( + chain.DeployerKey, + chain.Client, + "Link Token", + "LINK", + uint8(18), + big.NewInt(0).Mul(big.NewInt(1e9), big.NewInt(1e18)), + ) + return deployment.ContractDeploy[*burn_mint_erc677.BurnMintERC677]{ + linkTokenAddr, linkToken, tx2, deployment.NewTypeAndVersion(LinkToken, deployment.Version1_0_0), err2, + } + }) + if err != nil { + lggr.Errorw("Failed to deploy linkToken", "err", err) + return err + } + lggr.Infow("deployed linkToken", "addr", linkToken.Address) + linkTokenContract = linkToken.Contract + } else { + lggr.Infow("linkToken already deployed", "addr", linkTokenContract.Address) + } + // if router is not already deployed, we deploy it + if r == nil { + routerContract, err := deployment.DeployContract(e.Logger, chain, ab, + func(chain deployment.Chain) deployment.ContractDeploy[*router.Router] { + routerAddr, tx2, routerC, err2 := router.DeployRouter( + chain.DeployerKey, + chain.Client, + weth9Contract.Address(), + rmnProxy.Address(), + ) + return deployment.ContractDeploy[*router.Router]{ + routerAddr, routerC, tx2, deployment.NewTypeAndVersion(Router, deployment.Version1_2_0), err2, + } + }) + if err != nil { + e.Logger.Errorw("Failed to deploy router", "err", err) + return err + } + e.Logger.Infow("deployed router", "addr", routerContract.Address) + r = routerContract.Contract + } else { + e.Logger.Infow("router already deployed", "addr", chainState.Router.Address) } - return &contractDeploy, nil + return nil +} + +type USDCConfig struct { + Enabled bool + USDCAttestationConfig +} + +type USDCAttestationConfig struct { + API string + APITimeout *commonconfig.Duration + APIInterval *commonconfig.Duration } type DeployCCIPContractConfig struct { @@ -133,6 +288,7 @@ type DeployCCIPContractConfig struct { // I believe it makes sense to have the same signers across all chains // since that's the point MCMS. MCMSConfig MCMSConfig + USDCConfig USDCConfig // For setting OCR configuration OCRSecrets deployment.OCRSecrets } @@ -194,6 +350,7 @@ func DeployCCIPContracts(e deployment.Environment, ab deployment.AddressBook, c return fmt.Errorf("rmn home not found") } + usdcConfiguration := make(map[cciptypes.ChainSelector]pluginconfig.USDCCCTPTokenConfig) for _, chainSel := range c.ChainsToDeploy { chain, ok := e.Chains[chainSel] if !ok { @@ -202,13 +359,34 @@ func DeployCCIPContracts(e deployment.Environment, ab deployment.AddressBook, c if existingState.Chains[chainSel].LinkToken == nil || existingState.Chains[chainSel].Weth9 == nil { return fmt.Errorf("fee tokens not found for chain %d", chainSel) } - err = DeployChainContracts(e, chain, ab, FeeTokenContracts{ - LinkToken: existingState.Chains[chainSel].LinkToken, - Weth9: existingState.Chains[chainSel].Weth9, - }, c.MCMSConfig, rmnHome) + err = DeployChainContracts(e, chain, ab, c.MCMSConfig, rmnHome) if err != nil { return err } + + if c.USDCConfig.Enabled { + token, pool, messenger, transmitter, err1 := DeployUSDC(e.Logger, chain, ab, existingState.Chains[chainSel]) + if err1 != nil { + return err1 + } + e.Logger.Infow("Deployed USDC contracts", + "chainSelector", chainSel, + "token", token.Address(), + "pool", pool.Address(), + "transmitter", transmitter.Address(), + "messenger", messenger.Address(), + ) + + usdcConfiguration[cciptypes.ChainSelector(chainSel)] = pluginconfig.USDCCCTPTokenConfig{ + SourcePoolAddress: pool.Address().Hex(), + SourceMessageTransmitterAddr: transmitter.Address().Hex(), + } + } + } + + for _, chainSel := range c.ChainsToDeploy { + chain, _ := e.Chains[chainSel] + chainAddresses, err := ab.AddressesForChain(chain.Selector) if err != nil { e.Logger.Errorw("Failed to get chain addresses", "err", err) @@ -232,6 +410,19 @@ func DeployCCIPContracts(e deployment.Environment, ab deployment.AddressBook, c if err != nil { return err } + var tokenDataObserversConf []pluginconfig.TokenDataObserverConfig + if c.USDCConfig.Enabled { + tokenDataObserversConf = []pluginconfig.TokenDataObserverConfig{{ + Type: pluginconfig.USDCCCTPHandlerType, + Version: "1.0", + USDCCCTPObserverConfig: &pluginconfig.USDCCCTPObserverConfig{ + Tokens: usdcConfiguration, + AttestationAPI: c.USDCConfig.API, + AttestationAPITimeout: c.USDCConfig.APITimeout, + AttestationAPIInterval: c.USDCConfig.APIInterval, + }, + }} + } // For each chain, we create a DON on the home chain (2 OCR instances) if err := AddDON( e.Logger, @@ -245,6 +436,7 @@ func DeployCCIPContracts(e deployment.Environment, ab deployment.AddressBook, c chain, e.Chains[c.HomeChainSel], nodes.NonBootstraps(), + tokenDataObserversConf, ); err != nil { e.Logger.Errorw("Failed to add DON", "err", err) return err @@ -268,15 +460,15 @@ func DeployMCMSWithConfig( chain deployment.Chain, ab deployment.AddressBook, mcmConfig config.Config, -) (*ContractDeploy[*owner_helpers.ManyChainMultiSig], error) { +) (*deployment.ContractDeploy[*owner_helpers.ManyChainMultiSig], error) { groupQuorums, groupParents, signerAddresses, signerGroups := mcmConfig.ExtractSetConfigInputs() - mcm, err := deployContract(lggr, chain, ab, - func(chain deployment.Chain) ContractDeploy[*owner_helpers.ManyChainMultiSig] { + mcm, err := deployment.DeployContract(lggr, chain, ab, + func(chain deployment.Chain) deployment.ContractDeploy[*owner_helpers.ManyChainMultiSig] { mcmAddr, tx, mcm, err2 := owner_helpers.DeployManyChainMultiSig( chain.DeployerKey, chain.Client, ) - return ContractDeploy[*owner_helpers.ManyChainMultiSig]{ + return deployment.ContractDeploy[*owner_helpers.ManyChainMultiSig]{ mcmAddr, mcm, tx, deployment.NewTypeAndVersion(contractType, deployment.Version1_0_0), err2, } }) @@ -299,11 +491,11 @@ func DeployMCMSWithConfig( } type MCMSContracts struct { - Admin *ContractDeploy[*owner_helpers.ManyChainMultiSig] - Canceller *ContractDeploy[*owner_helpers.ManyChainMultiSig] - Bypasser *ContractDeploy[*owner_helpers.ManyChainMultiSig] - Proposer *ContractDeploy[*owner_helpers.ManyChainMultiSig] - Timelock *ContractDeploy[*owner_helpers.RBACTimelock] + Admin *deployment.ContractDeploy[*owner_helpers.ManyChainMultiSig] + Canceller *deployment.ContractDeploy[*owner_helpers.ManyChainMultiSig] + Bypasser *deployment.ContractDeploy[*owner_helpers.ManyChainMultiSig] + Proposer *deployment.ContractDeploy[*owner_helpers.ManyChainMultiSig] + Timelock *deployment.ContractDeploy[*owner_helpers.RBACTimelock] } // DeployMCMSContracts deploys the MCMS contracts for the given configuration @@ -331,8 +523,8 @@ func DeployMCMSContracts( return nil, err } - timelock, err := deployContract(lggr, chain, ab, - func(chain deployment.Chain) ContractDeploy[*owner_helpers.RBACTimelock] { + timelock, err := deployment.DeployContract(lggr, chain, ab, + func(chain deployment.Chain) deployment.ContractDeploy[*owner_helpers.RBACTimelock] { timelock, tx2, cc, err2 := owner_helpers.DeployRBACTimelock( chain.DeployerKey, chain.Client, @@ -343,7 +535,7 @@ func DeployMCMSContracts( []common.Address{canceller.Address}, // cancellers []common.Address{bypasser.Address}, // bypassers ) - return ContractDeploy[*owner_helpers.RBACTimelock]{ + return deployment.ContractDeploy[*owner_helpers.RBACTimelock]{ timelock, cc, tx2, deployment.NewTypeAndVersion(RBACTimelock, deployment.Version1_0_0), err2, } }) @@ -361,70 +553,10 @@ func DeployMCMSContracts( }, nil } -func DeployFeeTokensToChains(lggr logger.Logger, ab deployment.AddressBook, chains map[uint64]deployment.Chain) error { - for _, chain := range chains { - _, err := DeployFeeTokens(lggr, chain, ab) - if err != nil { - return err - } - } - return nil -} - -// DeployFeeTokens deploys link and weth9. This is _usually_ for test environments only, -// real environments they tend to already exist, but sometimes we still have to deploy them to real chains. -func DeployFeeTokens(lggr logger.Logger, chain deployment.Chain, ab deployment.AddressBook) (FeeTokenContracts, error) { - weth9, err := deployContract(lggr, chain, ab, - func(chain deployment.Chain) ContractDeploy[*weth9.WETH9] { - weth9Addr, tx2, weth9c, err2 := weth9.DeployWETH9( - chain.DeployerKey, - chain.Client, - ) - return ContractDeploy[*weth9.WETH9]{ - weth9Addr, weth9c, tx2, deployment.NewTypeAndVersion(WETH9, deployment.Version1_0_0), err2, - } - }) - if err != nil { - lggr.Errorw("Failed to deploy weth9", "err", err) - return FeeTokenContracts{}, err - } - lggr.Infow("deployed weth9", "addr", weth9.Address) - - linkToken, err := deployContract(lggr, chain, ab, - func(chain deployment.Chain) ContractDeploy[*burn_mint_erc677.BurnMintERC677] { - linkTokenAddr, tx2, linkToken, err2 := burn_mint_erc677.DeployBurnMintERC677( - chain.DeployerKey, - chain.Client, - "Link Token", - "LINK", - uint8(18), - big.NewInt(0).Mul(big.NewInt(1e9), big.NewInt(1e18)), - ) - return ContractDeploy[*burn_mint_erc677.BurnMintERC677]{ - linkTokenAddr, linkToken, tx2, deployment.NewTypeAndVersion(LinkToken, deployment.Version1_0_0), err2, - } - }) - if err != nil { - lggr.Errorw("Failed to deploy linkToken", "err", err) - return FeeTokenContracts{}, err - } - lggr.Infow("deployed linkToken", "addr", linkToken.Address) - return FeeTokenContracts{ - LinkToken: linkToken.Contract, - Weth9: weth9.Contract, - }, nil -} - -type FeeTokenContracts struct { - LinkToken *burn_mint_erc677.BurnMintERC677 - Weth9 *weth9.WETH9 -} - func DeployChainContracts( e deployment.Environment, chain deployment.Chain, ab deployment.AddressBook, - contractConfig FeeTokenContracts, mcmsConfig MCMSConfig, rmnHome *rmn_home.RMNHome, ) error { @@ -432,41 +564,77 @@ func DeployChainContracts( if err != nil { return err } - ccipReceiver, err := deployContract(e.Logger, chain, ab, - func(chain deployment.Chain) ContractDeploy[*maybe_revert_message_receiver.MaybeRevertMessageReceiver] { - receiverAddr, tx, receiver, err2 := maybe_revert_message_receiver.DeployMaybeRevertMessageReceiver( - chain.DeployerKey, - chain.Client, - false, - ) - return ContractDeploy[*maybe_revert_message_receiver.MaybeRevertMessageReceiver]{ - receiverAddr, receiver, tx, deployment.NewTypeAndVersion(CCIPReceiver, deployment.Version1_0_0), err2, - } - }) + // check for existing contracts + state, err := LoadOnchainState(e) if err != nil { - e.Logger.Errorw("Failed to deploy receiver", "err", err) + e.Logger.Errorw("Failed to load existing onchain state", "err") return err } - e.Logger.Infow("deployed receiver", "addr", ccipReceiver.Address) - - // TODO: Correctly configure RMN remote. - rmnRemote, err := deployContract(e.Logger, chain, ab, - func(chain deployment.Chain) ContractDeploy[*rmn_remote.RMNRemote] { - rmnRemoteAddr, tx, rmnRemote, err2 := rmn_remote.DeployRMNRemote( - chain.DeployerKey, - chain.Client, - chain.Selector, - ) - return ContractDeploy[*rmn_remote.RMNRemote]{ - rmnRemoteAddr, rmnRemote, tx, deployment.NewTypeAndVersion(RMNRemote, deployment.Version1_6_0_dev), err2, - } - }) - if err != nil { - e.Logger.Errorw("Failed to deploy RMNRemote", "err", err) - return err + chainState, chainExists := state.Chains[chain.Selector] + if !chainExists { + return fmt.Errorf("chain %d not found in existing state, deploy the prerequisites first", chain.Selector) + } + if chainState.Weth9 == nil { + return fmt.Errorf("weth9 not found for chain %d, deploy the prerequisites first", chain.Selector) + } + weth9Contract := chainState.Weth9 + if chainState.LinkToken == nil { + return fmt.Errorf("link token not found for chain %d, deploy the prerequisites first", chain.Selector) + } + linkTokenContract := chainState.LinkToken + if chainState.TokenAdminRegistry == nil { + return fmt.Errorf("token admin registry not found for chain %d, deploy the prerequisites first", chain.Selector) + } + tokenAdminReg := chainState.TokenAdminRegistry + if chainState.RegistryModule == nil { + return fmt.Errorf("registry module not found for chain %d, deploy the prerequisites first", chain.Selector) + } + if chainState.Router == nil { + return fmt.Errorf("router not found for chain %d, deploy the prerequisites first", chain.Selector) + } + if chainState.Receiver == nil { + ccipReceiver, err := deployment.DeployContract(e.Logger, chain, ab, + func(chain deployment.Chain) deployment.ContractDeploy[*maybe_revert_message_receiver.MaybeRevertMessageReceiver] { + receiverAddr, tx, receiver, err2 := maybe_revert_message_receiver.DeployMaybeRevertMessageReceiver( + chain.DeployerKey, + chain.Client, + false, + ) + return deployment.ContractDeploy[*maybe_revert_message_receiver.MaybeRevertMessageReceiver]{ + receiverAddr, receiver, tx, deployment.NewTypeAndVersion(CCIPReceiver, deployment.Version1_0_0), err2, + } + }) + if err != nil { + e.Logger.Errorw("Failed to deploy receiver", "err", err) + return err + } + e.Logger.Infow("deployed receiver", "addr", ccipReceiver.Address) + } else { + e.Logger.Infow("receiver already deployed", "addr", chainState.Receiver.Address) + } + rmnRemoteContract := chainState.RMNRemote + if chainState.RMNRemote == nil { + // TODO: Correctly configure RMN remote. + rmnRemote, err := deployment.DeployContract(e.Logger, chain, ab, + func(chain deployment.Chain) deployment.ContractDeploy[*rmn_remote.RMNRemote] { + rmnRemoteAddr, tx, rmnRemote, err2 := rmn_remote.DeployRMNRemote( + chain.DeployerKey, + chain.Client, + chain.Selector, + ) + return deployment.ContractDeploy[*rmn_remote.RMNRemote]{ + rmnRemoteAddr, rmnRemote, tx, deployment.NewTypeAndVersion(RMNRemote, deployment.Version1_6_0_dev), err2, + } + }) + if err != nil { + e.Logger.Errorw("Failed to deploy RMNRemote", "err", err) + return err + } + e.Logger.Infow("deployed RMNRemote", "addr", rmnRemote.Address) + rmnRemoteContract = rmnRemote.Contract + } else { + e.Logger.Infow("rmn remote already deployed", "addr", chainState.RMNRemote.Address) } - e.Logger.Infow("deployed RMNRemote", "addr", rmnRemote.Address) - activeDigest, err := rmnHome.GetActiveDigest(&bind.CallOpts{}) if err != nil { e.Logger.Errorw("Failed to get active digest", "err", err) @@ -474,7 +642,7 @@ func DeployChainContracts( } e.Logger.Infow("setting active home digest to rmn remote", "digest", activeDigest) - tx, err := rmnRemote.Contract.SetConfig(chain.DeployerKey, rmn_remote.RMNRemoteConfig{ + tx, err := rmnRemoteContract.SetConfig(chain.DeployerKey, rmn_remote.RMNRemoteConfig{ RmnHomeContractConfigDigest: activeDigest, Signers: []rmn_remote.RMNRemoteSigner{ {NodeIndex: 0, OnchainPublicKey: common.Address{1}}, @@ -486,225 +654,194 @@ func DeployChainContracts( return err } - rmnProxy, err := deployContract(e.Logger, chain, ab, - func(chain deployment.Chain) ContractDeploy[*rmn_proxy_contract.RMNProxyContract] { - rmnProxyAddr, tx2, rmnProxy, err2 := rmn_proxy_contract.DeployRMNProxyContract( - chain.DeployerKey, - chain.Client, - rmnRemote.Address, - ) - return ContractDeploy[*rmn_proxy_contract.RMNProxyContract]{ - rmnProxyAddr, rmnProxy, tx2, deployment.NewTypeAndVersion(ARMProxy, deployment.Version1_0_0), err2, - } - }) - if err != nil { - e.Logger.Errorw("Failed to deploy rmnProxy", "err", err) - return err - } - e.Logger.Infow("deployed rmnProxy", "addr", rmnProxy.Address) - - routerContract, err := deployContract(e.Logger, chain, ab, - func(chain deployment.Chain) ContractDeploy[*router.Router] { - routerAddr, tx2, routerC, err2 := router.DeployRouter( - chain.DeployerKey, - chain.Client, - contractConfig.Weth9.Address(), - rmnProxy.Address, - ) - return ContractDeploy[*router.Router]{ - routerAddr, routerC, tx2, deployment.NewTypeAndVersion(Router, deployment.Version1_2_0), err2, - } - }) - if err != nil { - e.Logger.Errorw("Failed to deploy router", "err", err) - return err - } - e.Logger.Infow("deployed router", "addr", routerContract.Address) - - testRouterContract, err := deployContract(e.Logger, chain, ab, - func(chain deployment.Chain) ContractDeploy[*router.Router] { - routerAddr, tx2, routerC, err2 := router.DeployRouter( - chain.DeployerKey, - chain.Client, - contractConfig.Weth9.Address(), - rmnProxy.Address, - ) - return ContractDeploy[*router.Router]{ - routerAddr, routerC, tx2, deployment.NewTypeAndVersion(TestRouter, deployment.Version1_2_0), err2, - } - }) - if err != nil { - e.Logger.Errorw("Failed to deploy test router", "err", err) - return err - } - e.Logger.Infow("deployed test router", "addr", testRouterContract.Address) - - tokenAdminRegistry, err := deployContract(e.Logger, chain, ab, - func(chain deployment.Chain) ContractDeploy[*token_admin_registry.TokenAdminRegistry] { - tokenAdminRegistryAddr, tx2, tokenAdminRegistry, err2 := token_admin_registry.DeployTokenAdminRegistry( - chain.DeployerKey, - chain.Client) - return ContractDeploy[*token_admin_registry.TokenAdminRegistry]{ - tokenAdminRegistryAddr, tokenAdminRegistry, tx2, deployment.NewTypeAndVersion(TokenAdminRegistry, deployment.Version1_5_0), err2, - } - }) - if err != nil { - e.Logger.Errorw("Failed to deploy token admin registry", "err", err) - return err - } - e.Logger.Infow("deployed tokenAdminRegistry", "addr", tokenAdminRegistry) - - customRegistryModule, err := deployContract(e.Logger, chain, ab, - func(chain deployment.Chain) ContractDeploy[*registry_module_owner_custom.RegistryModuleOwnerCustom] { - regModAddr, tx2, regMod, err2 := registry_module_owner_custom.DeployRegistryModuleOwnerCustom( - chain.DeployerKey, - chain.Client, - tokenAdminRegistry.Address) - return ContractDeploy[*registry_module_owner_custom.RegistryModuleOwnerCustom]{ - regModAddr, regMod, tx2, deployment.NewTypeAndVersion(RegistryModule, deployment.Version1_5_0), err2, - } - }) - if err != nil { - e.Logger.Errorw("Failed to deploy custom registry module", "err", err) - return err - } - e.Logger.Infow("deployed custom registry module", "addr", tokenAdminRegistry) - - tx, err = tokenAdminRegistry.Contract.AddRegistryModule(chain.DeployerKey, customRegistryModule.Address) - if err != nil { - e.Logger.Errorw("Failed to assign registry module on token admin registry", "err", err) - return fmt.Errorf("failed to assign registry module on token admin registry: %w", err) - } - - _, err = chain.Confirm(tx) - if err != nil { - e.Logger.Errorw("Failed to confirm assign registry module on token admin registry", "err", err) - return fmt.Errorf("failed to confirm assign registry module on token admin registry: %w", err) - } - - e.Logger.Infow("assigned registry module on token admin registry") - - nonceManager, err := deployContract(e.Logger, chain, ab, - func(chain deployment.Chain) ContractDeploy[*nonce_manager.NonceManager] { - nonceManagerAddr, tx2, nonceManager, err2 := nonce_manager.DeployNonceManager( - chain.DeployerKey, - chain.Client, - []common.Address{}, // Need to add onRamp after - ) - return ContractDeploy[*nonce_manager.NonceManager]{ - nonceManagerAddr, nonceManager, tx2, deployment.NewTypeAndVersion(NonceManager, deployment.Version1_6_0_dev), err2, - } - }) - if err != nil { - e.Logger.Errorw("Failed to deploy nonce manager", "err", err) - return err - } - e.Logger.Infow("Deployed nonce manager", "addr", nonceManager.Address) - - feeQuoter, err := deployContract(e.Logger, chain, ab, - func(chain deployment.Chain) ContractDeploy[*fee_quoter.FeeQuoter] { - prAddr, tx2, pr, err2 := fee_quoter.DeployFeeQuoter( - chain.DeployerKey, - chain.Client, - fee_quoter.FeeQuoterStaticConfig{ - MaxFeeJuelsPerMsg: big.NewInt(0).Mul(big.NewInt(2e2), big.NewInt(1e18)), - LinkToken: contractConfig.LinkToken.Address(), - TokenPriceStalenessThreshold: uint32(24 * 60 * 60), - }, - []common.Address{mcmsContracts.Timelock.Address}, // timelock should be able to update, ramps added after - []common.Address{contractConfig.Weth9.Address(), contractConfig.LinkToken.Address()}, // fee tokens - []fee_quoter.FeeQuoterTokenPriceFeedUpdate{}, - []fee_quoter.FeeQuoterTokenTransferFeeConfigArgs{}, // TODO: tokens - []fee_quoter.FeeQuoterPremiumMultiplierWeiPerEthArgs{ - { - PremiumMultiplierWeiPerEth: 9e17, // 0.9 ETH - Token: contractConfig.LinkToken.Address(), + // we deploy a new RMNProxy so that RMNRemote can be tested first before pointing it to the main Existing RMNProxy + // To differentiate between the two RMNProxies, we will deploy new one with Version1_6_0_dev + rmnProxyContract := chainState.RMNProxyNew + if chainState.RMNProxyNew == nil { + // we deploy a new rmnproxy contract to test RMNRemote + rmnProxy, err := deployment.DeployContract(e.Logger, chain, ab, + func(chain deployment.Chain) deployment.ContractDeploy[*rmn_proxy_contract.RMNProxyContract] { + rmnProxyAddr, tx, rmnProxy, err2 := rmn_proxy_contract.DeployRMNProxyContract( + chain.DeployerKey, + chain.Client, + rmnRemoteContract.Address(), + ) + return deployment.ContractDeploy[*rmn_proxy_contract.RMNProxyContract]{ + rmnProxyAddr, rmnProxy, tx, deployment.NewTypeAndVersion(ARMProxy, deployment.Version1_6_0_dev), err2, + } + }) + if err != nil { + e.Logger.Errorw("Failed to deploy RMNProxyNew", "err", err) + return err + } + e.Logger.Infow("deployed new RMNProxyNew", "addr", rmnProxy.Address) + rmnProxyContract = rmnProxy.Contract + } else { + e.Logger.Infow("rmn proxy already deployed", "addr", chainState.RMNProxyNew.Address) + } + if chainState.TestRouter == nil { + testRouterContract, err := deployment.DeployContract(e.Logger, chain, ab, + func(chain deployment.Chain) deployment.ContractDeploy[*router.Router] { + routerAddr, tx2, routerC, err2 := router.DeployRouter( + chain.DeployerKey, + chain.Client, + weth9Contract.Address(), + rmnProxyContract.Address(), + ) + return deployment.ContractDeploy[*router.Router]{ + routerAddr, routerC, tx2, deployment.NewTypeAndVersion(TestRouter, deployment.Version1_2_0), err2, + } + }) + if err != nil { + e.Logger.Errorw("Failed to deploy test router", "err", err) + return err + } + e.Logger.Infow("deployed test router", "addr", testRouterContract.Address) + } else { + e.Logger.Infow("test router already deployed", "addr", chainState.TestRouter.Address) + } + + nmContract := chainState.NonceManager + if chainState.NonceManager == nil { + nonceManager, err := deployment.DeployContract(e.Logger, chain, ab, + func(chain deployment.Chain) deployment.ContractDeploy[*nonce_manager.NonceManager] { + nonceManagerAddr, tx2, nonceManager, err2 := nonce_manager.DeployNonceManager( + chain.DeployerKey, + chain.Client, + []common.Address{}, // Need to add onRamp after + ) + return deployment.ContractDeploy[*nonce_manager.NonceManager]{ + nonceManagerAddr, nonceManager, tx2, deployment.NewTypeAndVersion(NonceManager, deployment.Version1_6_0_dev), err2, + } + }) + if err != nil { + e.Logger.Errorw("Failed to deploy nonce manager", "err", err) + return err + } + e.Logger.Infow("Deployed nonce manager", "addr", nonceManager.Address) + nmContract = nonceManager.Contract + } else { + e.Logger.Infow("nonce manager already deployed", "addr", chainState.NonceManager.Address) + } + feeQuoterContract := chainState.FeeQuoter + if chainState.FeeQuoter == nil { + feeQuoter, err := deployment.DeployContract(e.Logger, chain, ab, + func(chain deployment.Chain) deployment.ContractDeploy[*fee_quoter.FeeQuoter] { + prAddr, tx2, pr, err2 := fee_quoter.DeployFeeQuoter( + chain.DeployerKey, + chain.Client, + fee_quoter.FeeQuoterStaticConfig{ + MaxFeeJuelsPerMsg: big.NewInt(0).Mul(big.NewInt(2e2), big.NewInt(1e18)), + LinkToken: linkTokenContract.Address(), + TokenPriceStalenessThreshold: uint32(24 * 60 * 60), }, - { - PremiumMultiplierWeiPerEth: 1e18, - Token: contractConfig.Weth9.Address(), + []common.Address{mcmsContracts.Timelock.Address}, // timelock should be able to update, ramps added after + []common.Address{weth9Contract.Address(), linkTokenContract.Address()}, // fee tokens + []fee_quoter.FeeQuoterTokenPriceFeedUpdate{}, + []fee_quoter.FeeQuoterTokenTransferFeeConfigArgs{}, // TODO: tokens + []fee_quoter.FeeQuoterPremiumMultiplierWeiPerEthArgs{ + { + PremiumMultiplierWeiPerEth: 9e17, // 0.9 ETH + Token: linkTokenContract.Address(), + }, + { + PremiumMultiplierWeiPerEth: 1e18, + Token: weth9Contract.Address(), + }, }, - }, - []fee_quoter.FeeQuoterDestChainConfigArgs{}, - ) - return ContractDeploy[*fee_quoter.FeeQuoter]{ - prAddr, pr, tx2, deployment.NewTypeAndVersion(FeeQuoter, deployment.Version1_6_0_dev), err2, - } - }) - if err != nil { - e.Logger.Errorw("Failed to deploy fee quoter", "err", err) - return err - } - e.Logger.Infow("Deployed fee quoter", "addr", feeQuoter.Address) - - onRamp, err := deployContract(e.Logger, chain, ab, - func(chain deployment.Chain) ContractDeploy[*onramp.OnRamp] { - onRampAddr, tx2, onRamp, err2 := onramp.DeployOnRamp( - chain.DeployerKey, - chain.Client, - onramp.OnRampStaticConfig{ - ChainSelector: chain.Selector, - RmnRemote: rmnProxy.Address, - NonceManager: nonceManager.Address, - TokenAdminRegistry: tokenAdminRegistry.Address, - }, - onramp.OnRampDynamicConfig{ - FeeQuoter: feeQuoter.Address, - FeeAggregator: common.HexToAddress("0x1"), // TODO real fee aggregator - }, - []onramp.OnRampDestChainConfigArgs{}, - ) - return ContractDeploy[*onramp.OnRamp]{ - onRampAddr, onRamp, tx2, deployment.NewTypeAndVersion(OnRamp, deployment.Version1_6_0_dev), err2, - } - }) - if err != nil { - e.Logger.Errorw("Failed to deploy onramp", "err", err) - return err - } - e.Logger.Infow("Deployed onramp", "addr", onRamp.Address) - - offRamp, err := deployContract(e.Logger, chain, ab, - func(chain deployment.Chain) ContractDeploy[*offramp.OffRamp] { - offRampAddr, tx2, offRamp, err2 := offramp.DeployOffRamp( - chain.DeployerKey, - chain.Client, - offramp.OffRampStaticConfig{ - ChainSelector: chain.Selector, - RmnRemote: rmnProxy.Address, - NonceManager: nonceManager.Address, - TokenAdminRegistry: tokenAdminRegistry.Address, - }, - offramp.OffRampDynamicConfig{ - FeeQuoter: feeQuoter.Address, - PermissionLessExecutionThresholdSeconds: uint32(86400), - IsRMNVerificationDisabled: true, - }, - []offramp.OffRampSourceChainConfigArgs{}, - ) - return ContractDeploy[*offramp.OffRamp]{ - offRampAddr, offRamp, tx2, deployment.NewTypeAndVersion(OffRamp, deployment.Version1_6_0_dev), err2, - } - }) - if err != nil { - e.Logger.Errorw("Failed to deploy offramp", "err", err) - return err + []fee_quoter.FeeQuoterDestChainConfigArgs{}, + ) + return deployment.ContractDeploy[*fee_quoter.FeeQuoter]{ + prAddr, pr, tx2, deployment.NewTypeAndVersion(FeeQuoter, deployment.Version1_6_0_dev), err2, + } + }) + if err != nil { + e.Logger.Errorw("Failed to deploy fee quoter", "err", err) + return err + } + e.Logger.Infow("Deployed fee quoter", "addr", feeQuoter.Address) + feeQuoterContract = feeQuoter.Contract + } else { + e.Logger.Infow("fee quoter already deployed", "addr", chainState.FeeQuoter.Address) + } + onRampContract := chainState.OnRamp + if onRampContract == nil { + onRamp, err := deployment.DeployContract(e.Logger, chain, ab, + func(chain deployment.Chain) deployment.ContractDeploy[*onramp.OnRamp] { + onRampAddr, tx2, onRamp, err2 := onramp.DeployOnRamp( + chain.DeployerKey, + chain.Client, + onramp.OnRampStaticConfig{ + ChainSelector: chain.Selector, + RmnRemote: rmnProxyContract.Address(), + NonceManager: nmContract.Address(), + TokenAdminRegistry: tokenAdminReg.Address(), + }, + onramp.OnRampDynamicConfig{ + FeeQuoter: feeQuoterContract.Address(), + FeeAggregator: common.HexToAddress("0x1"), // TODO real fee aggregator + }, + []onramp.OnRampDestChainConfigArgs{}, + ) + return deployment.ContractDeploy[*onramp.OnRamp]{ + onRampAddr, onRamp, tx2, deployment.NewTypeAndVersion(OnRamp, deployment.Version1_6_0_dev), err2, + } + }) + if err != nil { + e.Logger.Errorw("Failed to deploy onramp", "err", err) + return err + } + e.Logger.Infow("Deployed onramp", "addr", onRamp.Address) + onRampContract = onRamp.Contract + } else { + e.Logger.Infow("onramp already deployed", "addr", chainState.OnRamp.Address) + } + offRampContract := chainState.OffRamp + if offRampContract == nil { + offRamp, err := deployment.DeployContract(e.Logger, chain, ab, + func(chain deployment.Chain) deployment.ContractDeploy[*offramp.OffRamp] { + offRampAddr, tx2, offRamp, err2 := offramp.DeployOffRamp( + chain.DeployerKey, + chain.Client, + offramp.OffRampStaticConfig{ + ChainSelector: chain.Selector, + RmnRemote: rmnProxyContract.Address(), + NonceManager: nmContract.Address(), + TokenAdminRegistry: tokenAdminReg.Address(), + }, + offramp.OffRampDynamicConfig{ + FeeQuoter: feeQuoterContract.Address(), + PermissionLessExecutionThresholdSeconds: uint32(86400), + IsRMNVerificationDisabled: true, + }, + []offramp.OffRampSourceChainConfigArgs{}, + ) + return deployment.ContractDeploy[*offramp.OffRamp]{ + Address: offRampAddr, Contract: offRamp, Tx: tx2, Tv: deployment.NewTypeAndVersion(OffRamp, deployment.Version1_6_0_dev), Err: err2, + } + }) + if err != nil { + e.Logger.Errorw("Failed to deploy offramp", "err", err) + return err + } + e.Logger.Infow("Deployed offramp", "addr", offRamp.Address) + offRampContract = offRamp.Contract + } else { + e.Logger.Infow("offramp already deployed", "addr", chainState.OffRamp.Address) } - e.Logger.Infow("Deployed offramp", "addr", offRamp.Address) - // Basic wiring is always needed. - tx, err = feeQuoter.Contract.ApplyAuthorizedCallerUpdates(chain.DeployerKey, fee_quoter.AuthorizedCallersAuthorizedCallerArgs{ + tx, err = feeQuoterContract.ApplyAuthorizedCallerUpdates(chain.DeployerKey, fee_quoter.AuthorizedCallersAuthorizedCallerArgs{ // TODO: We enable the deployer initially to set prices // Should be removed after. - AddedCallers: []common.Address{offRamp.Contract.Address(), chain.DeployerKey.From}, + AddedCallers: []common.Address{offRampContract.Address(), chain.DeployerKey.From}, }) if _, err := deployment.ConfirmIfNoError(chain, tx, err); err != nil { e.Logger.Errorw("Failed to confirm fee quoter authorized caller update", "err", err) return err } - tx, err = nonceManager.Contract.ApplyAuthorizedCallerUpdates(chain.DeployerKey, nonce_manager.AuthorizedCallersAuthorizedCallerArgs{ - AddedCallers: []common.Address{offRamp.Contract.Address(), onRamp.Contract.Address()}, + tx, err = nmContract.ApplyAuthorizedCallerUpdates(chain.DeployerKey, nonce_manager.AuthorizedCallersAuthorizedCallerArgs{ + AddedCallers: []common.Address{offRampContract.Address(), onRampContract.Address()}, }) if _, err := deployment.ConfirmIfNoError(chain, tx, err); err != nil { e.Logger.Errorw("Failed to update nonce manager with ramps", "err", err) diff --git a/deployment/ccip/deploy_home_chain.go b/deployment/ccip/deploy_home_chain.go index c9c88d35328..9c7c65bc9dc 100644 --- a/deployment/ccip/deploy_home_chain.go +++ b/deployment/ccip/deploy_home_chain.go @@ -87,30 +87,30 @@ func MustABIEncode(abiString string, args ...interface{}) []byte { } // DeployCapReg deploys the CapabilitiesRegistry contract if it is not already deployed -// and returns a ContractDeploy struct with the address and contract instance. +// and returns a deployment.ContractDeploy struct with the address and contract instance. func DeployCapReg( lggr logger.Logger, state CCIPOnChainState, ab deployment.AddressBook, chain deployment.Chain, -) (*ContractDeploy[*capabilities_registry.CapabilitiesRegistry], error) { +) (*deployment.ContractDeploy[*capabilities_registry.CapabilitiesRegistry], error) { homeChainState, exists := state.Chains[chain.Selector] if exists { cr := homeChainState.CapabilityRegistry if cr != nil { lggr.Infow("Found CapabilitiesRegistry in chain state", "address", cr.Address().String()) - return &ContractDeploy[*capabilities_registry.CapabilitiesRegistry]{ + return &deployment.ContractDeploy[*capabilities_registry.CapabilitiesRegistry]{ Address: cr.Address(), Contract: cr, Tv: deployment.NewTypeAndVersion(CapabilitiesRegistry, deployment.Version1_0_0), }, nil } } - capReg, err := deployContract(lggr, chain, ab, - func(chain deployment.Chain) ContractDeploy[*capabilities_registry.CapabilitiesRegistry] { + capReg, err := deployment.DeployContract(lggr, chain, ab, + func(chain deployment.Chain) deployment.ContractDeploy[*capabilities_registry.CapabilitiesRegistry] { crAddr, tx, cr, err2 := capabilities_registry.DeployCapabilitiesRegistry( chain.DeployerKey, chain.Client, ) - return ContractDeploy[*capabilities_registry.CapabilitiesRegistry]{ + return deployment.ContractDeploy[*capabilities_registry.CapabilitiesRegistry]{ Address: crAddr, Contract: cr, Tv: deployment.NewTypeAndVersion(CapabilitiesRegistry, deployment.Version1_0_0), Tx: tx, Err: err2, } }) @@ -130,7 +130,7 @@ func DeployHomeChain( rmnHomeDynamic rmn_home.RMNHomeDynamicConfig, nodeOps []capabilities_registry.CapabilitiesRegistryNodeOperator, nodeP2PIDsPerNodeOpAdmin map[string][][32]byte, -) (*ContractDeploy[*capabilities_registry.CapabilitiesRegistry], error) { +) (*deployment.ContractDeploy[*capabilities_registry.CapabilitiesRegistry], error) { // load existing state state, err := LoadOnchainState(e) if err != nil { @@ -143,15 +143,15 @@ func DeployHomeChain( } lggr.Infow("deployed/connected to capreg", "addr", capReg.Address) - ccipHome, err := deployContract( + ccipHome, err := deployment.DeployContract( lggr, chain, ab, - func(chain deployment.Chain) ContractDeploy[*ccip_home.CCIPHome] { + func(chain deployment.Chain) deployment.ContractDeploy[*ccip_home.CCIPHome] { ccAddr, tx, cc, err2 := ccip_home.DeployCCIPHome( chain.DeployerKey, chain.Client, capReg.Address, ) - return ContractDeploy[*ccip_home.CCIPHome]{ + return deployment.ContractDeploy[*ccip_home.CCIPHome]{ Address: ccAddr, Tv: deployment.NewTypeAndVersion(CCIPHome, deployment.Version1_6_0_dev), Tx: tx, Err: err2, Contract: cc, } }) @@ -161,14 +161,14 @@ func DeployHomeChain( } lggr.Infow("deployed CCIPHome", "addr", ccipHome.Address) - rmnHome, err := deployContract( + rmnHome, err := deployment.DeployContract( lggr, chain, ab, - func(chain deployment.Chain) ContractDeploy[*rmn_home.RMNHome] { + func(chain deployment.Chain) deployment.ContractDeploy[*rmn_home.RMNHome] { rmnAddr, tx, rmn, err2 := rmn_home.DeployRMNHome( chain.DeployerKey, chain.Client, ) - return ContractDeploy[*rmn_home.RMNHome]{ + return deployment.ContractDeploy[*rmn_home.RMNHome]{ Address: rmnAddr, Tv: deployment.NewTypeAndVersion(RMNHome, deployment.Version1_6_0_dev), Tx: tx, Err: err2, Contract: rmn, } }, @@ -395,6 +395,7 @@ func BuildOCR3ConfigForCCIPHome( tokenInfo map[ccipocr3.UnknownEncodedAddress]pluginconfig.TokenInfo, nodes deployment.Nodes, rmnHomeAddress common.Address, + configs []pluginconfig.TokenDataObserverConfig, ) (map[cctypes.PluginType]ccip_home.CCIPHomeOCR3Config, error) { p2pIDs := nodes.PeerIDs() // Get OCR3 Config from helper @@ -438,7 +439,7 @@ func BuildOCR3ConfigForCCIPHome( InflightCacheExpiry: *commonconfig.MustNewDuration(InflightCacheExpiry), RootSnoozeTime: *commonconfig.MustNewDuration(RootSnoozeTime), BatchingStrategyID: BatchingStrategyID, - TokenDataObservers: []pluginconfig.TokenDataObserverConfig{}, + TokenDataObservers: configs, }) } if err2 != nil { @@ -969,8 +970,10 @@ func AddDON( dest deployment.Chain, home deployment.Chain, nodes deployment.Nodes, + tokenConfigs []pluginconfig.TokenDataObserverConfig, ) error { - ocrConfigs, err := BuildOCR3ConfigForCCIPHome(ocrSecrets, offRamp, dest, feedChainSel, tokenInfo, nodes, rmnHomeAddress) + ocrConfigs, err := BuildOCR3ConfigForCCIPHome( + ocrSecrets, offRamp, dest, feedChainSel, tokenInfo, nodes, rmnHomeAddress, tokenConfigs) if err != nil { return err } diff --git a/deployment/ccip/deploy_test.go b/deployment/ccip/deploy_test.go index 63aeacb4bdf..dc1927261d1 100644 --- a/deployment/ccip/deploy_test.go +++ b/deployment/ccip/deploy_test.go @@ -10,7 +10,6 @@ import ( "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/environment/memory" - "github.com/smartcontractkit/chainlink/v2/core/logger" ) @@ -23,7 +22,7 @@ func TestDeployCCIPContracts(t *testing.T) { }) // Deploy all the CCIP contracts. homeChainSel, feedChainSel := allocateCCIPChainSelectors(e.Chains) - _ = DeployTestContracts(t, lggr, e.ExistingAddresses, homeChainSel, feedChainSel, e.Chains) + _ = DeployTestContracts(t, lggr, e.ExistingAddresses, homeChainSel, feedChainSel, e.Chains, MockLinkPrice, MockWethPrice) nodes, err := deployment.NodeInfo(e.NodeIDs, e.Offchain) require.NoError(t, err) @@ -45,6 +44,11 @@ func TestDeployCCIPContracts(t *testing.T) { require.NotNil(t, s.Chains[feedChainSel].USDFeeds) newAddresses := deployment.NewMemoryAddressBook() + err = DeployPrerequisiteChainContracts(e, newAddresses, e.AllChainSelectors()) + require.NoError(t, err) + require.NoError(t, e.ExistingAddresses.Merge(newAddresses)) + + newAddresses = deployment.NewMemoryAddressBook() err = DeployCCIPContracts(e, newAddresses, DeployCCIPContractConfig{ HomeChainSel: homeChainSel, FeedChainSel: feedChainSel, diff --git a/deployment/ccip/state.go b/deployment/ccip/state.go index 650f46d2b3a..dcbe52524cf 100644 --- a/deployment/ccip/state.go +++ b/deployment/ccip/state.go @@ -2,6 +2,9 @@ package ccipdeployment import ( "fmt" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/mock_usdc_token_messenger" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/mock_usdc_token_transmitter" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/usdc_token_pool" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" @@ -17,6 +20,7 @@ import ( common_v1_0 "github.com/smartcontractkit/chainlink/deployment/common/view/v1_0" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/ccip_config" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/commit_store" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/mock_rmn_contract" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/registry_module_owner_custom" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/rmn_home" @@ -45,7 +49,8 @@ type CCIPChainState struct { OnRamp *onramp.OnRamp OffRamp *offramp.OffRamp FeeQuoter *fee_quoter.FeeQuoter - RMNProxy *rmn_proxy_contract.RMNProxyContract + RMNProxyNew *rmn_proxy_contract.RMNProxyContract + RMNProxyExisting *rmn_proxy_contract.RMNProxyContract NonceManager *nonce_manager.NonceManager TokenAdminRegistry *token_admin_registry.TokenAdminRegistry RegistryModule *registry_module_owner_custom.RegistryModuleOwnerCustom @@ -53,6 +58,7 @@ type CCIPChainState struct { CommitStore *commit_store.CommitStore Weth9 *weth9.WETH9 RMNRemote *rmn_remote.RMNRemote + MockRMN *mock_rmn_contract.MockRMNContract // TODO: May need to support older link too LinkToken *burn_mint_erc677.BurnMintERC677 // Map between token Descriptor (e.g. LinkSymbol, WethSymbol) @@ -77,8 +83,11 @@ type CCIPChainState struct { CCIPConfig *ccip_config.CCIPConfig // Test contracts - Receiver *maybe_revert_message_receiver.MaybeRevertMessageReceiver - TestRouter *router.Router + Receiver *maybe_revert_message_receiver.MaybeRevertMessageReceiver + TestRouter *router.Router + USDCTokenPool *usdc_token_pool.USDCTokenPool + MockUSDCTransmitter *mock_usdc_token_transmitter.MockE2EUSDCTransmitter + MockUSDCTokenMessenger *mock_usdc_token_messenger.MockE2EUSDCTokenMessenger } func (c CCIPChainState) GenerateView() (view.ChainView, error) { @@ -150,12 +159,12 @@ func (c CCIPChainState) GenerateView() (view.ChainView, error) { chainView.CommitStore[c.CommitStore.Address().Hex()] = commitStoreView } - if c.RMNProxy != nil { - rmnProxyView, err := v1_0.GenerateRMNProxyView(c.RMNProxy) + if c.RMNProxyNew != nil { + rmnProxyView, err := v1_0.GenerateRMNProxyView(c.RMNProxyNew) if err != nil { return chainView, err } - chainView.RMNProxy[c.RMNProxy.Address().Hex()] = rmnProxyView + chainView.RMNProxy[c.RMNProxyNew.Address().Hex()] = rmnProxyView } if c.CapabilityRegistry != nil { capRegView, err := common_v1_0.GenerateCapabilityRegistryView(c.CapabilityRegistry) @@ -284,7 +293,25 @@ func LoadChainState(chain deployment.Chain, addresses map[string]deployment.Type if err != nil { return state, err } - state.RMNProxy = armProxy + state.RMNProxyExisting = armProxy + case deployment.NewTypeAndVersion(ARMProxy, deployment.Version1_6_0_dev).String(): + armProxy, err := rmn_proxy_contract.NewRMNProxyContract(common.HexToAddress(address), chain.Client) + if err != nil { + return state, err + } + state.RMNProxyNew = armProxy + case deployment.NewTypeAndVersion(ARMProxy, deployment.Version1_6_0_dev).String(): + armProxy, err := rmn_proxy_contract.NewRMNProxyContract(common.HexToAddress(address), chain.Client) + if err != nil { + return state, err + } + state.RMNProxyNew = armProxy + case deployment.NewTypeAndVersion(MockRMN, deployment.Version1_0_0).String(): + mockRMN, err := mock_rmn_contract.NewMockRMNContract(common.HexToAddress(address), chain.Client) + if err != nil { + return state, err + } + state.MockRMN = mockRMN case deployment.NewTypeAndVersion(RMNRemote, deployment.Version1_6_0_dev).String(): rmnRemote, err := rmn_remote.NewRMNRemote(common.HexToAddress(address), chain.Client) if err != nil { @@ -351,6 +378,32 @@ func LoadChainState(chain deployment.Chain, addresses map[string]deployment.Type return state, err } state.LinkToken = lt + case deployment.NewTypeAndVersion(USDCToken, deployment.Version1_0_0).String(): + ut, err := burn_mint_erc677.NewBurnMintERC677(common.HexToAddress(address), chain.Client) + if err != nil { + return state, err + } + state.BurnMintTokens677 = map[TokenSymbol]*burn_mint_erc677.BurnMintERC677{ + USDCSymbol: ut, + } + case deployment.NewTypeAndVersion(USDCTokenPool, deployment.Version1_0_0).String(): + utp, err := usdc_token_pool.NewUSDCTokenPool(common.HexToAddress(address), chain.Client) + if err != nil { + return state, err + } + state.USDCTokenPool = utp + case deployment.NewTypeAndVersion(USDCMockTransmitter, deployment.Version1_0_0).String(): + umt, err := mock_usdc_token_transmitter.NewMockE2EUSDCTransmitter(common.HexToAddress(address), chain.Client) + if err != nil { + return state, err + } + state.MockUSDCTransmitter = umt + case deployment.NewTypeAndVersion(USDCTokenMessenger, deployment.Version1_0_0).String(): + utm, err := mock_usdc_token_messenger.NewMockE2EUSDCTokenMessenger(common.HexToAddress(address), chain.Client) + if err != nil { + return state, err + } + state.MockUSDCTokenMessenger = utm case deployment.NewTypeAndVersion(CCIPHome, deployment.Version1_6_0_dev).String(): ccipHome, err := ccip_home.NewCCIPHome(common.HexToAddress(address), chain.Client) if err != nil { diff --git a/deployment/ccip/test_assertions.go b/deployment/ccip/test_assertions.go index 64d1eb8571c..0c15c8b95ed 100644 --- a/deployment/ccip/test_assertions.go +++ b/deployment/ccip/test_assertions.go @@ -27,6 +27,7 @@ func ConfirmGasPriceUpdatedForAll( e deployment.Environment, state CCIPOnChainState, startBlocks map[uint64]*uint64, + gasPrice *big.Int, ) { var wg errgroup.Group for src, srcChain := range e.Chains { @@ -46,6 +47,7 @@ func ConfirmGasPriceUpdatedForAll( dstChain, state.Chains[srcChain.Selector].FeeQuoter, *startBlock, + gasPrice, ) }) } @@ -58,6 +60,7 @@ func ConfirmGasPriceUpdated( dest deployment.Chain, srcFeeQuoter *fee_quoter.FeeQuoter, startBlock uint64, + gasPrice *big.Int, ) error { it, err := srcFeeQuoter.FilterUsdPerUnitGasUpdated(&bind.FilterOpts{ Context: context.Background(), @@ -67,7 +70,7 @@ func ConfirmGasPriceUpdated( require.NoError(t, err) require.Truef(t, it.Next(), "No gas price update event found on chain %d, fee quoter %s", dest.Selector, srcFeeQuoter.Address().String()) - require.NotEqualf(t, InitialGasPrice, it.Event.Value, "Gas price not updated on chain %d, fee quoter %s", + require.NotEqualf(t, gasPrice, it.Event.Value, "Gas price not updated on chain %d, fee quoter %s", dest.Selector, srcFeeQuoter.Address().String()) return nil } @@ -77,6 +80,8 @@ func ConfirmTokenPriceUpdatedForAll( e deployment.Environment, state CCIPOnChainState, startBlocks map[uint64]*uint64, + linkPrice *big.Int, + wethPrice *big.Int, ) { var wg errgroup.Group for _, chain := range e.Chains { @@ -89,8 +94,8 @@ func ConfirmTokenPriceUpdatedForAll( linkAddress := state.Chains[chain.Selector].LinkToken.Address() wethAddress := state.Chains[chain.Selector].Weth9.Address() tokenToPrice := make(map[common.Address]*big.Int) - tokenToPrice[linkAddress] = InitialLinkPrice - tokenToPrice[wethAddress] = InitialWethPrice + tokenToPrice[linkAddress] = linkPrice + tokenToPrice[wethAddress] = wethPrice return ConfirmTokenPriceUpdated( t, chain, diff --git a/deployment/ccip/test_helpers.go b/deployment/ccip/test_helpers.go index f12a475bc2f..d682a72eddc 100644 --- a/deployment/ccip/test_helpers.go +++ b/deployment/ccip/test_helpers.go @@ -9,41 +9,36 @@ import ( "time" mapset "github.com/deckarep/golang-set/v2" - "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/core/types" "github.com/pkg/errors" - cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" - commonutils "github.com/smartcontractkit/chainlink-common/pkg/utils" - "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/testcontext" - - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/shared/generated/burn_mint_erc677" - - "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" "go.uber.org/multierr" "go.uber.org/zap/zapcore" chainsel "github.com/smartcontractkit/chain-selectors" - + "github.com/smartcontractkit/chainlink-ccip/pkg/reader" + cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" + "github.com/smartcontractkit/chainlink-common/pkg/logger" + commonutils "github.com/smartcontractkit/chainlink-common/pkg/utils" jobv1 "github.com/smartcontractkit/chainlink-protos/job-distributor/v1/job" + "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/testcontext" "github.com/smartcontractkit/chainlink/deployment" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/mock_ethusd_aggregator_wrapper" - - "github.com/smartcontractkit/chainlink/deployment/environment/memory" - - "github.com/smartcontractkit/chainlink-common/pkg/logger" - "github.com/smartcontractkit/chainlink/deployment/environment/devenv" + "github.com/smartcontractkit/chainlink/deployment/environment/memory" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/burn_mint_token_pool" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/mock_v3_aggregator_contract" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/onramp" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/router" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/usdc_token_pool" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/aggregator_v3_interface" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/mock_ethusd_aggregator_wrapper" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/shared/generated/burn_mint_erc677" ) const ( @@ -118,6 +113,8 @@ func DeployTestContracts(t *testing.T, homeChainSel, feedChainSel uint64, chains map[uint64]deployment.Chain, + linkPrice *big.Int, + wethPrice *big.Int, ) deployment.CapabilityRegistryConfig { capReg, err := DeployCapReg(lggr, // deploying cap reg for the first time on a blank chain state @@ -125,9 +122,7 @@ func DeployTestContracts(t *testing.T, Chains: make(map[uint64]CCIPChainState), }, ab, chains[homeChainSel]) require.NoError(t, err) - _, err = DeployFeeds(lggr, ab, chains[feedChainSel]) - require.NoError(t, err) - err = DeployFeeTokensToChains(lggr, ab, chains) + _, err = DeployFeeds(lggr, ab, chains[feedChainSel], linkPrice, wethPrice) require.NoError(t, err) evmChainID, err := chainsel.ChainIdFromSelector(homeChainSel) require.NoError(t, err) @@ -166,7 +161,13 @@ func allocateCCIPChainSelectors(chains map[uint64]deployment.Chain) (homeChainSe // NewMemoryEnvironment creates a new CCIP environment // with capreg, fee tokens, feeds and nodes set up. -func NewMemoryEnvironment(t *testing.T, lggr logger.Logger, numChains int, numNodes int) DeployedEnv { +func NewMemoryEnvironment( + t *testing.T, + lggr logger.Logger, + numChains int, + numNodes int, + linkPrice *big.Int, + wethPrice *big.Int) DeployedEnv { require.GreaterOrEqual(t, numChains, 2, "numChains must be at least 2 for home and feed chains") require.GreaterOrEqual(t, numNodes, 4, "numNodes must be at least 4") ctx := testcontext.Get(t) @@ -176,7 +177,7 @@ func NewMemoryEnvironment(t *testing.T, lggr logger.Logger, numChains int, numNo require.NoError(t, err) ab := deployment.NewMemoryAddressBook() - crConfig := DeployTestContracts(t, lggr, ab, homeChainSel, feedSel, chains) + crConfig := DeployTestContracts(t, lggr, ab, homeChainSel, feedSel, chains, linkPrice, wethPrice) nodes := memory.NewNodes(t, zapcore.InfoLevel, chains, numNodes, 1, crConfig) for _, node := range nodes { require.NoError(t, node.App.Start(ctx)) @@ -209,7 +210,19 @@ func NewMemoryEnvironment(t *testing.T, lggr logger.Logger, numChains int, numNo // NewMemoryEnvironmentWithJobs creates a new CCIP environment // with capreg, fee tokens, feeds, nodes and jobs set up. func NewMemoryEnvironmentWithJobs(t *testing.T, lggr logger.Logger, numChains int, numNodes int) DeployedEnv { - e := NewMemoryEnvironment(t, lggr, numChains, numNodes) + e := NewMemoryEnvironment(t, lggr, numChains, numNodes, MockLinkPrice, MockWethPrice) + e.SetupJobs(t) + return e +} + +func NewMemoryEnvironmentWithJobsAndPrices( + t *testing.T, + lggr logger.Logger, + numChains int, + numNodes int, + linkPrice *big.Int, + wethPrice *big.Int) DeployedEnv { + e := NewMemoryEnvironment(t, lggr, numChains, numNodes, linkPrice, wethPrice) e.SetupJobs(t) return e } @@ -262,7 +275,7 @@ func TestSendRequest( src, dest uint64, testRouter bool, evm2AnyMessage router.ClientEVM2AnyMessage, -) (seqNum uint64) { +) (msgSentEvent *onramp.OnRampCCIPMessageSent) { t.Logf("Sending CCIP request from chain selector %d to chain selector %d", src, dest) tx, blockNum, err := CCIPSendRequest( @@ -280,12 +293,16 @@ func TestSendRequest( }, []uint64{dest}, []uint64{}) require.NoError(t, err) require.True(t, it.Next()) - seqNum = it.Event.Message.Header.SequenceNumber - nonce := it.Event.Message.Header.Nonce - sender := it.Event.Message.Sender - t.Logf("CCIP message sent from chain selector %d to chain selector %d tx %s seqNum %d nonce %d sender %s", - src, dest, tx.Hash().String(), seqNum, nonce, sender.String()) - return seqNum + t.Logf("CCIP message (id %x) sent from chain selector %d to chain selector %d tx %s seqNum %d nonce %d sender %s", + it.Event.Message.Header.MessageId[:], + src, + dest, + tx.Hash().String(), + it.Event.SequenceNumber, + it.Event.Message.Header.Nonce, + it.Event.Message.Sender.String(), + ) + return it.Event } // MakeEVMExtraArgsV2 creates the extra args for the EVM2Any message that is destined @@ -319,7 +336,7 @@ func AddLanesForAll(e deployment.Environment, state CCIPOnChainState) error { for source := range e.Chains { for dest := range e.Chains { if source != dest { - err := AddLane(e, state, source, dest) + err := AddLaneWithDefaultPrices(e, state, source, dest) if err != nil { return err } @@ -329,6 +346,11 @@ func AddLanesForAll(e deployment.Environment, state CCIPOnChainState) error { return nil } +func ToPackedFee(execFee, daFee *big.Int) *big.Int { + daShifted := new(big.Int).Lsh(daFee, 112) + return new(big.Int).Or(daShifted, execFee) +} + const ( // MockLinkAggregatorDescription This is the description of the MockV3Aggregator.sol contract // nolint:lll @@ -341,7 +363,7 @@ const ( ) var ( - MockLinkPrice = big.NewInt(5e18) + MockLinkPrice = deployment.E18Mult(500) MockWethPrice = big.NewInt(9e8) // MockDescriptionToTokenSymbol maps a mock feed description to token descriptor MockDescriptionToTokenSymbol = map[string]TokenSymbol{ @@ -358,31 +380,37 @@ var ( } ) -func DeployFeeds(lggr logger.Logger, ab deployment.AddressBook, chain deployment.Chain) (map[string]common.Address, error) { +func DeployFeeds( + lggr logger.Logger, + ab deployment.AddressBook, + chain deployment.Chain, + linkPrice *big.Int, + wethPrice *big.Int, +) (map[string]common.Address, error) { linkTV := deployment.NewTypeAndVersion(PriceFeed, deployment.Version1_0_0) - mockLinkFeed := func(chain deployment.Chain) ContractDeploy[*aggregator_v3_interface.AggregatorV3Interface] { + mockLinkFeed := func(chain deployment.Chain) deployment.ContractDeploy[*aggregator_v3_interface.AggregatorV3Interface] { linkFeed, tx, _, err1 := mock_v3_aggregator_contract.DeployMockV3Aggregator( chain.DeployerKey, chain.Client, - LinkDecimals, // decimals - MockLinkPrice, // initialAnswer + LinkDecimals, // decimals + linkPrice, // initialAnswer ) aggregatorCr, err2 := aggregator_v3_interface.NewAggregatorV3Interface(linkFeed, chain.Client) - return ContractDeploy[*aggregator_v3_interface.AggregatorV3Interface]{ + return deployment.ContractDeploy[*aggregator_v3_interface.AggregatorV3Interface]{ Address: linkFeed, Contract: aggregatorCr, Tv: linkTV, Tx: tx, Err: multierr.Append(err1, err2), } } - mockWethFeed := func(chain deployment.Chain) ContractDeploy[*aggregator_v3_interface.AggregatorV3Interface] { + mockWethFeed := func(chain deployment.Chain) deployment.ContractDeploy[*aggregator_v3_interface.AggregatorV3Interface] { wethFeed, tx, _, err1 := mock_ethusd_aggregator_wrapper.DeployMockETHUSDAggregator( chain.DeployerKey, chain.Client, - MockWethPrice, // initialAnswer + wethPrice, // initialAnswer ) aggregatorCr, err2 := aggregator_v3_interface.NewAggregatorV3Interface(wethFeed, chain.Client) - return ContractDeploy[*aggregator_v3_interface.AggregatorV3Interface]{ + return deployment.ContractDeploy[*aggregator_v3_interface.AggregatorV3Interface]{ Address: wethFeed, Contract: aggregatorCr, Tv: linkTV, Tx: tx, Err: multierr.Append(err1, err2), } } @@ -409,11 +437,11 @@ func deploySingleFeed( lggr logger.Logger, ab deployment.AddressBook, chain deployment.Chain, - deployFunc func(deployment.Chain) ContractDeploy[*aggregator_v3_interface.AggregatorV3Interface], + deployFunc func(deployment.Chain) deployment.ContractDeploy[*aggregator_v3_interface.AggregatorV3Interface], symbol TokenSymbol, ) (common.Address, string, error) { //tokenTV := deployment.NewTypeAndVersion(PriceFeed, deployment.Version1_0_0) - mockTokenFeed, err := deployContract(lggr, chain, ab, deployFunc) + mockTokenFeed, err := deployment.DeployContract(lggr, chain, ab, deployFunc) if err != nil { lggr.Errorw("Failed to deploy token feed", "err", err, "symbol", symbol) return common.Address{}, "", err @@ -440,23 +468,23 @@ func ConfirmRequestOnSourceAndDest(t *testing.T, env deployment.Environment, sta require.NoError(t, err) startBlock := latesthdr.Number.Uint64() fmt.Printf("startblock %d", startBlock) - seqNum := TestSendRequest(t, env, state, sourceCS, destCS, false, router.ClientEVM2AnyMessage{ + msgSentEvent := TestSendRequest(t, env, state, sourceCS, destCS, false, router.ClientEVM2AnyMessage{ Receiver: common.LeftPadBytes(state.Chains[destCS].Receiver.Address().Bytes(), 32), Data: []byte("hello world"), TokenAmounts: nil, FeeToken: common.HexToAddress("0x0"), ExtraArgs: nil, }) - require.Equal(t, expectedSeqNr, seqNum) + require.Equal(t, expectedSeqNr, msgSentEvent.SequenceNumber) - fmt.Printf("Request sent for seqnr %d", seqNum) + fmt.Printf("Request sent for seqnr %d", msgSentEvent.SequenceNumber) require.NoError(t, ConfirmCommitWithExpectedSeqNumRange(t, env.Chains[sourceCS], env.Chains[destCS], state.Chains[destCS].OffRamp, &startBlock, cciptypes.SeqNumRange{ - cciptypes.SeqNum(seqNum), - cciptypes.SeqNum(seqNum), + cciptypes.SeqNum(msgSentEvent.SequenceNumber), + cciptypes.SeqNum(msgSentEvent.SequenceNumber), })) - fmt.Printf("Commit confirmed for seqnr %d", seqNum) + fmt.Printf("Commit confirmed for seqnr %d", msgSentEvent.SequenceNumber) require.NoError( t, commonutils.JustError( @@ -466,7 +494,7 @@ func ConfirmRequestOnSourceAndDest(t *testing.T, env deployment.Environment, sta env.Chains[destCS], state.Chains[destCS].OffRamp, &startBlock, - seqNum, + msgSentEvent.SequenceNumber, ), ), ) @@ -539,18 +567,19 @@ func DeployTransferableToken( } // Add burn/mint permissions - if err := grantMintBurnPermissions(chains[src], srcToken, srcPool.Address()); err != nil { + if err := grantMintBurnPermissions(lggr, chains[src], srcToken, srcPool.Address()); err != nil { return nil, nil, nil, nil, err } - if err := grantMintBurnPermissions(chains[dst], dstToken, dstPool.Address()); err != nil { + if err := grantMintBurnPermissions(lggr, chains[dst], dstToken, dstPool.Address()); err != nil { return nil, nil, nil, nil, err } return srcToken, srcPool, dstToken, dstPool, nil } -func grantMintBurnPermissions(chain deployment.Chain, token *burn_mint_erc677.BurnMintERC677, address common.Address) error { +func grantMintBurnPermissions(lggr logger.Logger, chain deployment.Chain, token *burn_mint_erc677.BurnMintERC677, address common.Address) error { + lggr.Infow("Granting burn permissions", "token", token.Address(), "burner", address) tx, err := token.GrantBurnRole(chain.DeployerKey, address) if err != nil { return err @@ -560,6 +589,7 @@ func grantMintBurnPermissions(chain deployment.Chain, token *burn_mint_erc677.Bu return err } + lggr.Infow("Granting mint permissions", "token", token.Address(), "minter", address) tx, err = token.GrantMintRole(chain.DeployerKey, address) if err != nil { return err @@ -568,6 +598,45 @@ func grantMintBurnPermissions(chain deployment.Chain, token *burn_mint_erc677.Bu return err } +func setUSDCTokenPoolCounterPart( + chain deployment.Chain, + tokenPool *usdc_token_pool.USDCTokenPool, + destChainSelector uint64, + destTokenAddress common.Address, + destTokenPoolAddress common.Address, +) error { + allowedCaller := common.LeftPadBytes(destTokenPoolAddress.Bytes(), 32) + var fixedAddr [32]byte + copy(fixedAddr[:], allowedCaller[:32]) + + domain, _ := reader.AllAvailableDomains()[destChainSelector] + + domains := []usdc_token_pool.USDCTokenPoolDomainUpdate{ + { + AllowedCaller: fixedAddr, + DomainIdentifier: domain, + DestChainSelector: destChainSelector, + Enabled: true, + }, + } + tx, err := tokenPool.SetDomains(chain.DeployerKey, domains) + if err != nil { + return err + } + + _, err = chain.Confirm(tx) + if err != nil { + return err + } + + pool, err := burn_mint_token_pool.NewBurnMintTokenPool(tokenPool.Address(), chain.Client) + if err != nil { + return err + } + + return setTokenPoolCounterPart(chain, pool, destChainSelector, destTokenAddress, destTokenPoolAddress) +} + func setTokenPoolCounterPart( chain deployment.Chain, tokenPool *burn_mint_token_pool.BurnMintTokenPool, @@ -677,8 +746,8 @@ func deployTransferTokenOneEnd( } } - tokenContract, err := deployContract(lggr, chain, addressBook, - func(chain deployment.Chain) ContractDeploy[*burn_mint_erc677.BurnMintERC677] { + tokenContract, err := deployment.DeployContract(lggr, chain, addressBook, + func(chain deployment.Chain) deployment.ContractDeploy[*burn_mint_erc677.BurnMintERC677] { USDCTokenAddr, tx, token, err2 := burn_mint_erc677.DeployBurnMintERC677( chain.DeployerKey, chain.Client, @@ -687,7 +756,7 @@ func deployTransferTokenOneEnd( uint8(18), big.NewInt(0).Mul(big.NewInt(1e9), big.NewInt(1e18)), ) - return ContractDeploy[*burn_mint_erc677.BurnMintERC677]{ + return deployment.ContractDeploy[*burn_mint_erc677.BurnMintERC677]{ USDCTokenAddr, token, tx, deployment.NewTypeAndVersion(BurnMintToken, deployment.Version1_0_0), err2, } }) @@ -705,8 +774,8 @@ func deployTransferTokenOneEnd( return nil, nil, err } - tokenPool, err := deployContract(lggr, chain, addressBook, - func(chain deployment.Chain) ContractDeploy[*burn_mint_token_pool.BurnMintTokenPool] { + tokenPool, err := deployment.DeployContract(lggr, chain, addressBook, + func(chain deployment.Chain) deployment.ContractDeploy[*burn_mint_token_pool.BurnMintTokenPool] { tokenPoolAddress, tx, tokenPoolContract, err2 := burn_mint_token_pool.DeployBurnMintTokenPool( chain.DeployerKey, chain.Client, @@ -715,7 +784,7 @@ func deployTransferTokenOneEnd( common.HexToAddress(rmnAddress), common.HexToAddress(routerAddress), ) - return ContractDeploy[*burn_mint_token_pool.BurnMintTokenPool]{ + return deployment.ContractDeploy[*burn_mint_token_pool.BurnMintTokenPool]{ tokenPoolAddress, tokenPoolContract, tx, deployment.NewTypeAndVersion(BurnMintTokenPool, deployment.Version1_0_0), err2, } }) diff --git a/deployment/ccip/test_usdc_helpers.go b/deployment/ccip/test_usdc_helpers.go new file mode 100644 index 00000000000..787ca328a8e --- /dev/null +++ b/deployment/ccip/test_usdc_helpers.go @@ -0,0 +1,233 @@ +package ccipdeployment + +import ( + "github.com/ethereum/go-ethereum/common" + "github.com/smartcontractkit/chainlink-ccip/pkg/reader" + "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink/deployment" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/fee_quoter" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/mock_usdc_token_messenger" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/mock_usdc_token_transmitter" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/usdc_token_pool" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/shared/generated/burn_mint_erc677" + "math/big" +) + +func ConfigureUSDCTokenPools( + lggr logger.Logger, + chains map[uint64]deployment.Chain, + src, dst uint64, + state CCIPOnChainState, +) (*burn_mint_erc677.BurnMintERC677, *burn_mint_erc677.BurnMintERC677, error) { + srcToken := state.Chains[src].BurnMintTokens677[USDCSymbol] + dstToken := state.Chains[dst].BurnMintTokens677[USDCSymbol] + srcPool := state.Chains[src].USDCTokenPool + dstPool := state.Chains[dst].USDCTokenPool + + // Attach token pools to registry + if err := attachTokenToTheRegistry(chains[src], state.Chains[src], chains[src].DeployerKey, srcToken.Address(), srcPool.Address()); err != nil { + lggr.Errorw("Failed to attach token to the registry", "err", err, "token", srcToken.Address(), "pool", srcPool.Address()) + return nil, nil, err + } + + if err := attachTokenToTheRegistry(chains[dst], state.Chains[dst], chains[dst].DeployerKey, dstToken.Address(), dstPool.Address()); err != nil { + lggr.Errorw("Failed to attach token to the registry", "err", err, "token", dstToken.Address(), "pool", dstPool.Address()) + return nil, nil, err + } + + // Connect pool to each other + if err := setUSDCTokenPoolCounterPart(chains[src], srcPool, dst, dstToken.Address(), dstPool.Address()); err != nil { + lggr.Errorw("Failed to set counter part", "err", err, "srcPool", srcPool.Address(), "dstPool", dstPool.Address()) + return nil, nil, err + } + + if err := setUSDCTokenPoolCounterPart(chains[dst], dstPool, src, srcToken.Address(), srcPool.Address()); err != nil { + lggr.Errorw("Failed to set counter part", "err", err, "srcPool", dstPool.Address(), "dstPool", srcPool.Address()) + return nil, nil, err + } + + // Add burn/mint permissions for source + for _, addr := range []common.Address{ + srcPool.Address(), + state.Chains[src].MockUSDCTokenMessenger.Address(), + state.Chains[src].MockUSDCTransmitter.Address(), + } { + if err := grantMintBurnPermissions(lggr, chains[src], srcToken, addr); err != nil { + lggr.Errorw("Failed to grant mint/burn permissions", "err", err, "token", srcToken.Address(), "minter", addr) + return nil, nil, err + } + } + + // Add burn/mint permissions for dest + for _, addr := range []common.Address{ + dstPool.Address(), + state.Chains[dst].MockUSDCTokenMessenger.Address(), + state.Chains[dst].MockUSDCTransmitter.Address(), + } { + if err := grantMintBurnPermissions(lggr, chains[dst], dstToken, addr); err != nil { + lggr.Errorw("Failed to grant mint/burn permissions", "err", err, "token", dstToken.Address(), "minter", addr) + return nil, nil, err + } + } + + return srcToken, dstToken, nil +} + +func UpdateFeeQuoterForUSDC( + lggr logger.Logger, + chain deployment.Chain, + state CCIPChainState, + dstChain uint64, + usdcToken *burn_mint_erc677.BurnMintERC677, +) error { + config := []fee_quoter.FeeQuoterTokenTransferFeeConfigArgs{ + { + DestChainSelector: dstChain, + TokenTransferFeeConfigs: []fee_quoter.FeeQuoterTokenTransferFeeConfigSingleTokenArgs{ + { + usdcToken.Address(), + fee_quoter.FeeQuoterTokenTransferFeeConfig{ + MinFeeUSDCents: 50, + MaxFeeUSDCents: 50_000, + DeciBps: 0, + DestGasOverhead: 180_000, + DestBytesOverhead: 640, + IsEnabled: true, + }, + }, + }, + }, + } + + tx, err := state.FeeQuoter.ApplyTokenTransferFeeConfigUpdates( + chain.DeployerKey, + config, + []fee_quoter.FeeQuoterTokenTransferFeeConfigRemoveArgs{}, + ) + if err != nil { + lggr.Errorw("Failed to apply token transfer fee config updates", "err", err, "config", config) + return err + } + + _, err = chain.Confirm(tx) + return err +} + +func DeployUSDC( + lggr logger.Logger, + chain deployment.Chain, + addresses deployment.AddressBook, + state CCIPChainState, +) ( + *burn_mint_erc677.BurnMintERC677, + *usdc_token_pool.USDCTokenPool, + *mock_usdc_token_messenger.MockE2EUSDCTokenMessenger, + *mock_usdc_token_transmitter.MockE2EUSDCTransmitter, + error, +) { + token, err := deployment.DeployContract(lggr, chain, addresses, + func(chain deployment.Chain) deployment.ContractDeploy[*burn_mint_erc677.BurnMintERC677] { + tokenAddress, tx, tokenContract, err2 := burn_mint_erc677.DeployBurnMintERC677( + chain.DeployerKey, + chain.Client, + "USDC Token", + "USDC", + uint8(18), + big.NewInt(0).Mul(big.NewInt(1e9), big.NewInt(1e18)), + ) + return deployment.ContractDeploy[*burn_mint_erc677.BurnMintERC677]{ + Address: tokenAddress, + Contract: tokenContract, + Tx: tx, + Tv: deployment.NewTypeAndVersion(USDCToken, deployment.Version1_0_0), + Err: err2, + } + }) + if err != nil { + lggr.Errorw("Failed to deploy USDC token", "err", err) + return nil, nil, nil, nil, err + } + + tx, err := token.Contract.GrantMintRole(chain.DeployerKey, chain.DeployerKey.From) + if err != nil { + lggr.Errorw("Failed to grant mint role", "token", token.Contract.Address(), "err", err) + return nil, nil, nil, nil, err + } + _, err = chain.Confirm(tx) + if err != nil { + return nil, nil, nil, nil, err + } + + transmitter, err := deployment.DeployContract(lggr, chain, addresses, + func(chain deployment.Chain) deployment.ContractDeploy[*mock_usdc_token_transmitter.MockE2EUSDCTransmitter] { + transmitterAddress, tx, transmitterContract, err2 := mock_usdc_token_transmitter.DeployMockE2EUSDCTransmitter( + chain.DeployerKey, + chain.Client, + 0, + reader.AllAvailableDomains()[chain.Selector], + token.Address, + ) + return deployment.ContractDeploy[*mock_usdc_token_transmitter.MockE2EUSDCTransmitter]{ + Address: transmitterAddress, + Contract: transmitterContract, + Tx: tx, + Tv: deployment.NewTypeAndVersion(USDCMockTransmitter, deployment.Version1_0_0), + Err: err2, + } + }) + if err != nil { + lggr.Errorw("Failed to deploy mock USDC transmitter", "err", err) + return nil, nil, nil, nil, err + } + + lggr.Infow("deployed mock USDC transmitter", "addr", transmitter.Address) + + messenger, err := deployment.DeployContract(lggr, chain, addresses, + func(chain deployment.Chain) deployment.ContractDeploy[*mock_usdc_token_messenger.MockE2EUSDCTokenMessenger] { + messengerAddress, tx, messengerContract, err2 := mock_usdc_token_messenger.DeployMockE2EUSDCTokenMessenger( + chain.DeployerKey, + chain.Client, + 0, + transmitter.Address, + ) + return deployment.ContractDeploy[*mock_usdc_token_messenger.MockE2EUSDCTokenMessenger]{ + Address: messengerAddress, + Contract: messengerContract, + Tx: tx, + Tv: deployment.NewTypeAndVersion(USDCTokenMessenger, deployment.Version1_0_0), + Err: err2, + } + }) + if err != nil { + lggr.Errorw("Failed to deploy USDC token messenger", "err", err) + return nil, nil, nil, nil, err + } + lggr.Infow("deployed mock USDC token messenger", "addr", messenger.Address) + + tokenPool, err := deployment.DeployContract(lggr, chain, addresses, + func(chain deployment.Chain) deployment.ContractDeploy[*usdc_token_pool.USDCTokenPool] { + tokenPoolAddress, tx, tokenPoolContract, err2 := usdc_token_pool.DeployUSDCTokenPool( + chain.DeployerKey, + chain.Client, + messenger.Address, + token.Address, + []common.Address{}, + state.RMNProxyExisting.Address(), + state.Router.Address(), + ) + return deployment.ContractDeploy[*usdc_token_pool.USDCTokenPool]{ + Address: tokenPoolAddress, + Contract: tokenPoolContract, + Tx: tx, + Tv: deployment.NewTypeAndVersion(USDCTokenPool, deployment.Version1_0_0), + Err: err2, + } + }) + if err != nil { + lggr.Errorw("Failed to deploy USDC token pool", "err", err) + return nil, nil, nil, nil, err + } + lggr.Infow("deployed USDC token pool", "addr", tokenPool.Address) + + return token.Contract, tokenPool.Contract, messenger.Contract, transmitter.Contract, nil +} diff --git a/deployment/environment.go b/deployment/environment.go index 104db4c5c37..5d4e782b0fe 100644 --- a/deployment/environment.go +++ b/deployment/environment.go @@ -14,6 +14,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rpc" chain_selectors "github.com/smartcontractkit/chain-selectors" + "github.com/smartcontractkit/chainlink-testing-framework/lib/docker/test_env" types2 "github.com/smartcontractkit/libocr/offchainreporting2/types" types3 "github.com/smartcontractkit/libocr/offchainreporting2plus/types" "google.golang.org/grpc" @@ -75,6 +76,7 @@ type Environment struct { Chains map[uint64]Chain NodeIDs []string Offchain OffchainClient + MockAdapter *test_env.Killgrave } func NewEnvironment( diff --git a/deployment/go.mod b/deployment/go.mod index 7c00eb2e15d..f0d579efe45 100644 --- a/deployment/go.mod +++ b/deployment/go.mod @@ -22,7 +22,7 @@ require ( github.com/sethvargo/go-retry v0.2.4 github.com/smartcontractkit/ccip-owner-contracts v0.0.0-20240926212305-a6deabdfce86 github.com/smartcontractkit/chain-selectors v1.0.29 - github.com/smartcontractkit/chainlink-ccip v0.0.0-20241112095015-3e85d9f1898b + github.com/smartcontractkit/chainlink-ccip v0.0.0-20241118091009-43c2b4804cec github.com/smartcontractkit/chainlink-common v0.3.1-0.20241114134822-aadff98ef068 github.com/smartcontractkit/chainlink-protos/job-distributor v0.4.0 github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.13 @@ -533,4 +533,5 @@ replace ( github.com/btcsuite/btcd/btcec/v2 => github.com/btcsuite/btcd/btcec/v2 v2.3.2 // replicating the replace directive on cosmos SDK github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 + github.com/sourcegraph/sourcegraph/lib => github.com/sourcegraph/sourcegraph-public-snapshot/lib v0.0.0-20240822153003-c864f15af264 ) diff --git a/deployment/go.sum b/deployment/go.sum index 6ab8676c4c1..d6ae7d68ebe 100644 --- a/deployment/go.sum +++ b/deployment/go.sum @@ -1382,8 +1382,8 @@ github.com/smartcontractkit/chain-selectors v1.0.29 h1:aZ9+OoUSMn4nqnissHtDvDoKR github.com/smartcontractkit/chain-selectors v1.0.29/go.mod h1:xsKM0aN3YGcQKTPRPDDtPx2l4mlTN1Djmg0VVXV40b8= github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgBc2xpDKBco/Q4h4ydl6+UUU= github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20241112095015-3e85d9f1898b h1:4kmZtaQ4fXwduHnw9xk5VmiIOW4nHg/Mx6iidlZJt5o= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20241112095015-3e85d9f1898b/go.mod h1:4adKaHNaxFsRvV/lYfqtbsWyyvIPUMLR0FdOJN/ljis= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20241118091009-43c2b4804cec h1:5vS1k8Qn09p8SQ3JzvS8iy4Pve7s3aVq+UPIdl74smY= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20241118091009-43c2b4804cec/go.mod h1:4adKaHNaxFsRvV/lYfqtbsWyyvIPUMLR0FdOJN/ljis= github.com/smartcontractkit/chainlink-common v0.3.1-0.20241114134822-aadff98ef068 h1:2llRW4Tn9W/EZp2XvXclQ9IjeTBwwxVPrrqaerX+vCE= github.com/smartcontractkit/chainlink-common v0.3.1-0.20241114134822-aadff98ef068/go.mod h1:ny87uTW6hLjCTLiBqBRNFEhETSXhHWevYlPclT5lSco= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20241017133723-5277829bd53f h1:BwrIaQIx5Iy6eT+DfLhFfK2XqjxRm74mVdlX8gbu4dw= diff --git a/deployment/helpers.go b/deployment/helpers.go index 420e9e03f06..1f0dc3064d6 100644 --- a/deployment/helpers.go +++ b/deployment/helpers.go @@ -15,6 +15,8 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/pkg/errors" + + "github.com/smartcontractkit/chainlink-common/pkg/logger" ) // OCRSecrets are used to disseminate a shared secret to OCR nodes @@ -108,3 +110,45 @@ func ParseErrorFromABI(errorString string, contractABI string) (string, error) { } return "", errors.New("error not found in ABI") } + +// ContractDeploy represents the result of an EVM contract deployment +// via an abigen Go binding. It contains all the return values +// as they are useful in different ways. +type ContractDeploy[C any] struct { + Address common.Address // We leave this incase a Go binding doesn't have Address() + Contract C // Expected to be a Go binding + Tx *types.Transaction // Incase the caller needs for example tx hash info for + Tv TypeAndVersion + Err error +} + +// DeployContract deploys an EVM contract and +// records the address in the provided address book +// if the deployment was confirmed onchain. +// Deploying and saving the address is a very common pattern +// so this helps to reduce boilerplate. +// It returns an error if the deployment failed, the tx was not +// confirmed or the address could not be saved. +func DeployContract[C any]( + lggr logger.Logger, + chain Chain, + addressBook AddressBook, + deploy func(chain Chain) ContractDeploy[C], +) (*ContractDeploy[C], error) { + contractDeploy := deploy(chain) + if contractDeploy.Err != nil { + lggr.Errorw("Failed to deploy contract", "err", contractDeploy.Err) + return nil, contractDeploy.Err + } + _, err := chain.Confirm(contractDeploy.Tx) + if err != nil { + lggr.Errorw("Failed to confirm deployment", "err", err) + return nil, err + } + err = addressBook.Save(chain.Selector, contractDeploy.Address.String(), contractDeploy.Tv) + if err != nil { + lggr.Errorw("Failed to save contract address", "err", err) + return nil, err + } + return &contractDeploy, nil +} diff --git a/deployment/keystone/changeset/internal/append_node_capabilities.go b/deployment/keystone/changeset/internal/append_node_capabilities.go index e74d3178ef2..cb28c03c6f5 100644 --- a/deployment/keystone/changeset/internal/append_node_capabilities.go +++ b/deployment/keystone/changeset/internal/append_node_capabilities.go @@ -42,19 +42,19 @@ func AppendNodeCapabilitiesImpl(lggr logger.Logger, req *AppendNodeCapabilitiesR } // for each node, merge the new capabilities with the existing ones and update the node - capsByPeer := make(map[p2pkey.PeerID][]kcr.CapabilitiesRegistryCapability) + updatesByPeer := make(map[p2pkey.PeerID]NodeUpdate) for p2pID, caps := range req.P2pToCapabilities { caps, err := AppendCapabilities(lggr, req.Registry, req.Chain, []p2pkey.PeerID{p2pID}, caps) if err != nil { return nil, fmt.Errorf("failed to append capabilities for p2p %s: %w", p2pID, err) } - capsByPeer[p2pID] = caps[p2pID] + updatesByPeer[p2pID] = NodeUpdate{Capabilities: caps[p2pID]} } updateNodesReq := &UpdateNodesRequest{ - Chain: req.Chain, - Registry: req.Registry, - P2pToCapabilities: capsByPeer, + Chain: req.Chain, + Registry: req.Registry, + P2pToUpdates: updatesByPeer, } resp, err := UpdateNodes(lggr, updateNodesReq) if err != nil { diff --git a/deployment/keystone/changeset/internal/update_node_capabilities.go b/deployment/keystone/changeset/internal/update_node_capabilities.go index c7e2e902437..0420c46f27d 100644 --- a/deployment/keystone/changeset/internal/update_node_capabilities.go +++ b/deployment/keystone/changeset/internal/update_node_capabilities.go @@ -42,10 +42,15 @@ func UpdateNodeCapabilitiesImpl(lggr logger.Logger, req *UpdateNodeCapabilitiesI return nil, fmt.Errorf("failed to add capabilities: %w", err) } + p2pToUpdates := map[p2pkey.PeerID]NodeUpdate{} + for id, caps := range req.P2pToCapabilities { + p2pToUpdates[id] = NodeUpdate{Capabilities: caps} + } + updateNodesReq := &UpdateNodesRequest{ - Chain: req.Chain, - Registry: req.Registry, - P2pToCapabilities: req.P2pToCapabilities, + Chain: req.Chain, + Registry: req.Registry, + P2pToUpdates: p2pToUpdates, } resp, err := UpdateNodes(lggr, updateNodesReq) if err != nil { diff --git a/deployment/keystone/changeset/internal/update_nodes.go b/deployment/keystone/changeset/internal/update_nodes.go index d263623cdc6..b8a08c37e50 100644 --- a/deployment/keystone/changeset/internal/update_nodes.go +++ b/deployment/keystone/changeset/internal/update_nodes.go @@ -2,6 +2,7 @@ package internal import ( "bytes" + "encoding/hex" "errors" "fmt" "sort" @@ -16,15 +17,23 @@ import ( kslib "github.com/smartcontractkit/chainlink/deployment/keystone" ) +type NodeUpdate struct { + EncryptionPublicKey string + NodeOperatorID uint32 + Signer [32]byte + + Capabilities []kcr.CapabilitiesRegistryCapability +} + type UpdateNodesRequest struct { Chain deployment.Chain Registry *kcr.CapabilitiesRegistry - P2pToCapabilities map[p2pkey.PeerID][]kcr.CapabilitiesRegistryCapability + P2pToUpdates map[p2pkey.PeerID]NodeUpdate } func (req *UpdateNodesRequest) NodeParams() ([]kcr.CapabilitiesRegistryNodeParams, error) { - return makeNodeParams(req.Registry, req.P2pToCapabilities) + return makeNodeParams(req.Registry, req.P2pToUpdates) } // P2PSignerEnc represent the key fields in kcr.CapabilitiesRegistryNodeParams @@ -36,19 +45,30 @@ type P2PSignerEnc struct { } func (req *UpdateNodesRequest) Validate() error { - if len(req.P2pToCapabilities) == 0 { + if len(req.P2pToUpdates) == 0 { return errors.New("p2pToCapabilities is empty") } // no duplicate capabilities - for peer, caps := range req.P2pToCapabilities { + for peer, updates := range req.P2pToUpdates { seen := make(map[string]struct{}) - for _, cap := range caps { + for _, cap := range updates.Capabilities { id := kslib.CapabilityID(cap) if _, exists := seen[id]; exists { return fmt.Errorf("duplicate capability %s for %s", id, peer) } seen[id] = struct{}{} } + + if updates.EncryptionPublicKey != "" { + pk, err := hex.DecodeString(updates.EncryptionPublicKey) + if err != nil { + return fmt.Errorf("invalid public key: could not hex decode: %w", err) + } + + if len(pk) != 32 { + return fmt.Errorf("invalid public key: got len %d, need 32", len(pk)) + } + } } if req.Registry == nil { @@ -136,11 +156,11 @@ func AppendCapabilities(lggr logger.Logger, registry *kcr.CapabilitiesRegistry, } func makeNodeParams(registry *kcr.CapabilitiesRegistry, - p2pToCapabilities map[p2pkey.PeerID][]kcr.CapabilitiesRegistryCapability) ([]kcr.CapabilitiesRegistryNodeParams, error) { + p2pToUpdates map[p2pkey.PeerID]NodeUpdate) ([]kcr.CapabilitiesRegistryNodeParams, error) { var out []kcr.CapabilitiesRegistryNodeParams var p2pIds []p2pkey.PeerID - for p2pID := range p2pToCapabilities { + for p2pID := range p2pToUpdates { p2pIds = append(p2pIds, p2pID) } @@ -150,20 +170,46 @@ func makeNodeParams(registry *kcr.CapabilitiesRegistry, return nil, fmt.Errorf("failed to get nodes by p2p ids: %w", err) } for _, node := range nodes { - caps, ok := p2pToCapabilities[node.P2pId] + updates, ok := p2pToUpdates[node.P2pId] if !ok { return nil, fmt.Errorf("capabilities not found for node %s", node.P2pId) } - ids, err := capabilityIds(registry, caps) - if err != nil { - return nil, fmt.Errorf("failed to get capability ids: %w", err) + + ids := node.HashedCapabilityIds + if len(updates.Capabilities) > 0 { + is, err := capabilityIds(registry, updates.Capabilities) + if err != nil { + return nil, fmt.Errorf("failed to get capability ids: %w", err) + } + ids = is + } + + encryptionKey := node.EncryptionPublicKey + if updates.EncryptionPublicKey != "" { + pk, err := hex.DecodeString(updates.EncryptionPublicKey) + if err != nil { + return nil, fmt.Errorf("failed to decode encryption public key: %w", err) + } + encryptionKey = [32]byte(pk) } + + signer := node.Signer + var zero [32]byte + if !bytes.Equal(updates.Signer[:], zero[:]) { + signer = updates.Signer + } + + nodeOperatorID := node.NodeOperatorId + if updates.NodeOperatorID != 0 { + nodeOperatorID = updates.NodeOperatorID + } + out = append(out, kcr.CapabilitiesRegistryNodeParams{ - NodeOperatorId: node.NodeOperatorId, + NodeOperatorId: nodeOperatorID, P2pId: node.P2pId, HashedCapabilityIds: ids, - EncryptionPublicKey: node.EncryptionPublicKey, - Signer: node.Signer, + EncryptionPublicKey: encryptionKey, + Signer: signer, }) } sort.Slice(out, func(i, j int) bool { diff --git a/deployment/keystone/changeset/internal/update_nodes_test.go b/deployment/keystone/changeset/internal/update_nodes_test.go index 5488e5c761d..395f1060465 100644 --- a/deployment/keystone/changeset/internal/update_nodes_test.go +++ b/deployment/keystone/changeset/internal/update_nodes_test.go @@ -2,6 +2,8 @@ package internal_test import ( "bytes" + "crypto/rand" + "encoding/hex" "fmt" "sort" "testing" @@ -24,10 +26,10 @@ import ( func Test_UpdateNodesRequest_validate(t *testing.T) { type fields struct { - p2pToCapabilities map[p2pkey.PeerID][]kcr.CapabilitiesRegistryCapability - nopToNodes map[kcr.CapabilitiesRegistryNodeOperator][]*internal.P2PSignerEnc - chain deployment.Chain - registry *kcr.CapabilitiesRegistry + p2pToUpdates map[p2pkey.PeerID]internal.NodeUpdate + nopToNodes map[kcr.CapabilitiesRegistryNodeOperator][]*internal.P2PSignerEnc + chain deployment.Chain + registry *kcr.CapabilitiesRegistry } tests := []struct { name string @@ -37,10 +39,38 @@ func Test_UpdateNodesRequest_validate(t *testing.T) { { name: "err", fields: fields{ - p2pToCapabilities: map[p2pkey.PeerID][]kcr.CapabilitiesRegistryCapability{}, - nopToNodes: nil, - chain: deployment.Chain{}, - registry: nil, + p2pToUpdates: map[p2pkey.PeerID]internal.NodeUpdate{}, + nopToNodes: nil, + chain: deployment.Chain{}, + registry: nil, + }, + wantErr: true, + }, + { + name: "invalid encryption key -- cannot decode", + fields: fields{ + p2pToUpdates: map[p2pkey.PeerID]internal.NodeUpdate{ + p2pkey.PeerID{}: { + EncryptionPublicKey: "jk", + }, + }, + nopToNodes: nil, + chain: deployment.Chain{}, + registry: nil, + }, + wantErr: true, + }, + { + name: "invalid encryption key -- invalid length", + fields: fields{ + p2pToUpdates: map[p2pkey.PeerID]internal.NodeUpdate{ + testPeerID(t, "peerID_1"): { + EncryptionPublicKey: "aabb", + }, + }, + nopToNodes: nil, + chain: deployment.Chain{}, + registry: nil, }, wantErr: true, }, @@ -48,9 +78,9 @@ func Test_UpdateNodesRequest_validate(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { req := &internal.UpdateNodesRequest{ - P2pToCapabilities: tt.fields.p2pToCapabilities, - Chain: tt.fields.chain, - Registry: tt.fields.registry, + P2pToUpdates: tt.fields.p2pToUpdates, + Chain: tt.fields.chain, + Registry: tt.fields.registry, } if err := req.Validate(); (err != nil) != tt.wantErr { t.Errorf("internal.UpdateNodesRequest.validate() error = %v, wantErr %v", err, tt.wantErr) @@ -59,10 +89,18 @@ func Test_UpdateNodesRequest_validate(t *testing.T) { } } +func newEncryptionKey() [32]byte { + key := make([]byte, 32) + rand.Read(key) + return [32]byte(key) +} + func TestUpdateNodes(t *testing.T) { chain := testChain(t) require.NotNil(t, chain) lggr := logger.Test(t) + newKey := newEncryptionKey() + newKeyStr := hex.EncodeToString(newKey[:]) type args struct { lggr logger.Logger @@ -80,12 +118,14 @@ func TestUpdateNodes(t *testing.T) { args: args{ lggr: lggr, req: &internal.UpdateNodesRequest{ - P2pToCapabilities: map[p2pkey.PeerID][]kcr.CapabilitiesRegistryCapability{ - testPeerID(t, "peerID_1"): []kcr.CapabilitiesRegistryCapability{ - { - LabelledName: "cap1", - Version: "1.0.0", - CapabilityType: 0, + P2pToUpdates: map[p2pkey.PeerID]internal.NodeUpdate{ + testPeerID(t, "peerID_1"): { + Capabilities: []kcr.CapabilitiesRegistryCapability{ + { + LabelledName: "cap1", + Version: "1.0.0", + CapabilityType: 0, + }, }, }, }, @@ -115,23 +155,24 @@ func TestUpdateNodes(t *testing.T) { }, wantErr: false, }, - { name: "one node, two capabilities", args: args{ lggr: lggr, req: &internal.UpdateNodesRequest{ - P2pToCapabilities: map[p2pkey.PeerID][]kcr.CapabilitiesRegistryCapability{ - testPeerID(t, "peerID_1"): []kcr.CapabilitiesRegistryCapability{ - { - LabelledName: "cap1", - Version: "1.0.0", - CapabilityType: 0, - }, - { - LabelledName: "cap2", - Version: "1.0.1", - CapabilityType: 2, + P2pToUpdates: map[p2pkey.PeerID]internal.NodeUpdate{ + testPeerID(t, "peerID_1"): internal.NodeUpdate{ + Capabilities: []kcr.CapabilitiesRegistryCapability{ + { + LabelledName: "cap1", + Version: "1.0.0", + CapabilityType: 0, + }, + { + LabelledName: "cap2", + Version: "1.0.1", + CapabilityType: 2, + }, }, }, }, @@ -173,19 +214,23 @@ func TestUpdateNodes(t *testing.T) { args: args{ lggr: lggr, req: &internal.UpdateNodesRequest{ - P2pToCapabilities: map[p2pkey.PeerID][]kcr.CapabilitiesRegistryCapability{ - testPeerID(t, "peerID_1"): []kcr.CapabilitiesRegistryCapability{ - { - LabelledName: "cap1", - Version: "1.0.0", - CapabilityType: 0, + P2pToUpdates: map[p2pkey.PeerID]internal.NodeUpdate{ + testPeerID(t, "peerID_1"): internal.NodeUpdate{ + Capabilities: []kcr.CapabilitiesRegistryCapability{ + { + LabelledName: "cap1", + Version: "1.0.0", + CapabilityType: 0, + }, }, }, - testPeerID(t, "peerID_2"): []kcr.CapabilitiesRegistryCapability{ - { - LabelledName: "cap1", - Version: "1.0.0", - CapabilityType: 0, + testPeerID(t, "peerID_2"): internal.NodeUpdate{ + Capabilities: []kcr.CapabilitiesRegistryCapability{ + { + LabelledName: "cap1", + Version: "1.0.0", + CapabilityType: 0, + }, }, }, }, @@ -234,19 +279,23 @@ func TestUpdateNodes(t *testing.T) { args: args{ lggr: lggr, req: &internal.UpdateNodesRequest{ - P2pToCapabilities: map[p2pkey.PeerID][]kcr.CapabilitiesRegistryCapability{ - testPeerID(t, "peerID_1"): []kcr.CapabilitiesRegistryCapability{ - { - LabelledName: "cap1", - Version: "1.0.0", - CapabilityType: 0, + P2pToUpdates: map[p2pkey.PeerID]internal.NodeUpdate{ + testPeerID(t, "peerID_1"): internal.NodeUpdate{ + Capabilities: []kcr.CapabilitiesRegistryCapability{ + { + LabelledName: "cap1", + Version: "1.0.0", + CapabilityType: 0, + }, }, }, - testPeerID(t, "peerID_2"): []kcr.CapabilitiesRegistryCapability{ - { - LabelledName: "cap2", - Version: "1.0.1", - CapabilityType: 0, + testPeerID(t, "peerID_2"): internal.NodeUpdate{ + Capabilities: []kcr.CapabilitiesRegistryCapability{ + { + LabelledName: "cap2", + Version: "1.0.1", + CapabilityType: 0, + }, }, }, }, @@ -290,6 +339,111 @@ func TestUpdateNodes(t *testing.T) { }, wantErr: false, }, + { + name: "one node, updated encryption key", + args: args{ + lggr: lggr, + req: &internal.UpdateNodesRequest{ + P2pToUpdates: map[p2pkey.PeerID]internal.NodeUpdate{ + testPeerID(t, "peerID_1"): { + EncryptionPublicKey: newKeyStr, + }, + }, + Chain: chain, + Registry: nil, // set in test to ensure no conflicts + }, + nopsToNodes: map[kcr.CapabilitiesRegistryNodeOperator][]*internal.P2PSignerEnc{ + testNop(t, "nop1"): []*internal.P2PSignerEnc{ + { + P2PKey: testPeerID(t, "peerID_1"), + Signer: [32]byte{0: 1, 1: 2}, + EncryptionPublicKey: [32]byte{0: 1, 1: 2}, + }, + }, + }, + }, + want: &internal.UpdateNodesResponse{ + NodeParams: []kcr.CapabilitiesRegistryNodeParams{ + { + NodeOperatorId: 1, + P2pId: testPeerID(t, "peerID_1"), + Signer: [32]byte{0: 1, 1: 2}, + EncryptionPublicKey: newKey, + }, + }, + }, + wantErr: false, + }, + { + name: "one node, updated signer", + args: args{ + lggr: lggr, + req: &internal.UpdateNodesRequest{ + P2pToUpdates: map[p2pkey.PeerID]internal.NodeUpdate{ + testPeerID(t, "peerID_1"): { + Signer: [32]byte{0: 2, 1: 3}, + }, + }, + Chain: chain, + Registry: nil, // set in test to ensure no conflicts + }, + nopsToNodes: map[kcr.CapabilitiesRegistryNodeOperator][]*internal.P2PSignerEnc{ + testNop(t, "nop1"): []*internal.P2PSignerEnc{ + { + P2PKey: testPeerID(t, "peerID_1"), + Signer: [32]byte{0: 1, 1: 2}, + EncryptionPublicKey: [32]byte{0: 1, 1: 2}, + }, + }, + }, + }, + want: &internal.UpdateNodesResponse{ + NodeParams: []kcr.CapabilitiesRegistryNodeParams{ + { + NodeOperatorId: 1, + P2pId: testPeerID(t, "peerID_1"), + Signer: [32]byte{0: 2, 1: 3}, + EncryptionPublicKey: [32]byte{0: 1, 1: 2}, + }, + }, + }, + wantErr: false, + }, + { + name: "one node, updated nodeOperatorID", + args: args{ + lggr: lggr, + req: &internal.UpdateNodesRequest{ + P2pToUpdates: map[p2pkey.PeerID]internal.NodeUpdate{ + testPeerID(t, "peerID_1"): { + NodeOperatorID: 2, + }, + }, + Chain: chain, + Registry: nil, // set in test to ensure no conflicts + }, + nopsToNodes: map[kcr.CapabilitiesRegistryNodeOperator][]*internal.P2PSignerEnc{ + testNop(t, "nop1"): []*internal.P2PSignerEnc{ + { + P2PKey: testPeerID(t, "peerID_1"), + Signer: [32]byte{0: 1, 1: 2}, + EncryptionPublicKey: [32]byte{0: 1, 1: 2}, + }, + }, + }, + }, + want: &internal.UpdateNodesResponse{ + NodeParams: []kcr.CapabilitiesRegistryNodeParams{ + { + NodeOperatorId: 2, + P2pId: testPeerID(t, "peerID_1"), + Signer: [32]byte{0: 1, 1: 2}, + EncryptionPublicKey: [32]byte{0: 1, 1: 2}, + }, + }, + }, + wantErr: false, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -300,7 +454,7 @@ func TestUpdateNodes(t *testing.T) { CapabilityType: 0, } initMap := make(map[p2pkey.PeerID][]kcr.CapabilitiesRegistryCapability) - for p2pID := range tt.args.req.P2pToCapabilities { + for p2pID := range tt.args.req.P2pToUpdates { initMap[p2pID] = []kcr.CapabilitiesRegistryCapability{phonyCap} } setupResp := kstest.SetupTestRegistry(t, tt.args.lggr, &kstest.SetupTestRegistryRequest{ @@ -311,12 +465,21 @@ func TestUpdateNodes(t *testing.T) { tt.args.req.Registry = setupResp.Registry tt.args.req.Chain = setupResp.Chain + id, err := registry.GetHashedCapabilityId(&bind.CallOpts{}, phonyCap.LabelledName, phonyCap.Version) + require.NoError(t, err) + // register the capabilities that the Update will use expectedUpdatedCaps := make(map[p2pkey.PeerID][]kslib.RegisteredCapability) capCache := kstest.NewCapabiltyCache(t) - for p2p, newCaps := range tt.args.req.P2pToCapabilities { - expectedCaps := capCache.AddCapabilities(tt.args.lggr, tt.args.req.Chain, registry, newCaps) - expectedUpdatedCaps[p2p] = expectedCaps + for p2p, update := range tt.args.req.P2pToUpdates { + if len(update.Capabilities) > 0 { + expectedCaps := capCache.AddCapabilities(tt.args.lggr, tt.args.req.Chain, registry, update.Capabilities) + expectedUpdatedCaps[p2p] = expectedCaps + } else { + expectedUpdatedCaps[p2p] = []kslib.RegisteredCapability{ + {CapabilitiesRegistryCapability: phonyCap, ID: id}, + } + } } got, err := internal.UpdateNodes(tt.args.lggr, tt.args.req) if (err != nil) != tt.wantErr { @@ -328,6 +491,7 @@ func TestUpdateNodes(t *testing.T) { require.Equal(t, expected.NodeOperatorId, p.NodeOperatorId) require.Equal(t, expected.P2pId, p.P2pId) require.Equal(t, expected.Signer, p.Signer) + require.Equal(t, expected.EncryptionPublicKey, p.EncryptionPublicKey) // check the capabilities expectedCaps := expectedUpdatedCaps[p.P2pId] var wantHashedIds [][32]byte @@ -411,9 +575,13 @@ func TestUpdateNodes(t *testing.T) { require.NoError(t, err) var req = &internal.UpdateNodesRequest{ - P2pToCapabilities: p2pToCapabilitiesUpdated, - Chain: chain, - Registry: registry, + P2pToUpdates: map[p2pkey.PeerID]internal.NodeUpdate{ + testPeerID(t, "peerID_1"): internal.NodeUpdate{ + Capabilities: toRegister, + }, + }, + Chain: chain, + Registry: registry, } _, err = internal.UpdateNodes(lggr, req) require.NoError(t, err) diff --git a/deployment/keystone/changeset/update_nodes.go b/deployment/keystone/changeset/update_nodes.go new file mode 100644 index 00000000000..7e436160d2e --- /dev/null +++ b/deployment/keystone/changeset/update_nodes.go @@ -0,0 +1,24 @@ +package changeset + +import ( + "fmt" + + "github.com/smartcontractkit/chainlink/deployment" + "github.com/smartcontractkit/chainlink/deployment/keystone/changeset/internal" +) + +var _ deployment.ChangeSet[*UpdateNodesRequest] = UpdateNodes + +type UpdateNodesRequest = internal.UpdateNodesRequest +type NodeUpdate = internal.NodeUpdate + +// UpdateNodes updates the a set of nodes. +// This a complex action in practice that involves registering missing capabilities, adding the nodes, and updating +// the capabilities of the DON +func UpdateNodes(env deployment.Environment, req *UpdateNodesRequest) (deployment.ChangesetOutput, error) { + _, err := internal.UpdateNodes(env.Logger, req) + if err != nil { + return deployment.ChangesetOutput{}, fmt.Errorf("failed to update don: %w", err) + } + return deployment.ChangesetOutput{}, nil +} diff --git a/go.mod b/go.mod index 13af3b0cc83..30358f8c920 100644 --- a/go.mod +++ b/go.mod @@ -76,7 +76,7 @@ require ( github.com/shopspring/decimal v1.4.0 github.com/smartcontractkit/chain-selectors v1.0.29 github.com/smartcontractkit/chainlink-automation v0.8.1 - github.com/smartcontractkit/chainlink-ccip v0.0.0-20241112095015-3e85d9f1898b + github.com/smartcontractkit/chainlink-ccip v0.0.0-20241118091009-43c2b4804cec github.com/smartcontractkit/chainlink-common v0.3.1-0.20241114134822-aadff98ef068 github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20241017133723-5277829bd53f github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20241018134907-a00ba3729b5e diff --git a/go.sum b/go.sum index f8e73fe7286..c57c88a9957 100644 --- a/go.sum +++ b/go.sum @@ -1076,8 +1076,8 @@ github.com/smartcontractkit/chain-selectors v1.0.29 h1:aZ9+OoUSMn4nqnissHtDvDoKR github.com/smartcontractkit/chain-selectors v1.0.29/go.mod h1:xsKM0aN3YGcQKTPRPDDtPx2l4mlTN1Djmg0VVXV40b8= github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgBc2xpDKBco/Q4h4ydl6+UUU= github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20241112095015-3e85d9f1898b h1:4kmZtaQ4fXwduHnw9xk5VmiIOW4nHg/Mx6iidlZJt5o= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20241112095015-3e85d9f1898b/go.mod h1:4adKaHNaxFsRvV/lYfqtbsWyyvIPUMLR0FdOJN/ljis= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20241118091009-43c2b4804cec h1:5vS1k8Qn09p8SQ3JzvS8iy4Pve7s3aVq+UPIdl74smY= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20241118091009-43c2b4804cec/go.mod h1:4adKaHNaxFsRvV/lYfqtbsWyyvIPUMLR0FdOJN/ljis= github.com/smartcontractkit/chainlink-common v0.3.1-0.20241114134822-aadff98ef068 h1:2llRW4Tn9W/EZp2XvXclQ9IjeTBwwxVPrrqaerX+vCE= github.com/smartcontractkit/chainlink-common v0.3.1-0.20241114134822-aadff98ef068/go.mod h1:ny87uTW6hLjCTLiBqBRNFEhETSXhHWevYlPclT5lSco= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20241017133723-5277829bd53f h1:BwrIaQIx5Iy6eT+DfLhFfK2XqjxRm74mVdlX8gbu4dw= diff --git a/integration-tests/ccip-tests/testsetups/test_helpers.go b/integration-tests/ccip-tests/testsetups/test_helpers.go index 4de5d0988a2..246584be7d5 100644 --- a/integration-tests/ccip-tests/testsetups/test_helpers.go +++ b/integration-tests/ccip-tests/testsetups/test_helpers.go @@ -69,7 +69,16 @@ func (d DeployedLocalDevEnvironment) RestartChainlinkNodes(t *testing.T) error { return errGrp.Wait() } -func NewLocalDevEnvironment(t *testing.T, lggr logger.Logger) (ccipdeployment.DeployedEnv, *test_env.CLClusterTestEnv, testconfig.TestConfig) { +func NewLocalDevEnvironmentWithDefaultPrice( + t *testing.T, + lggr logger.Logger) (ccipdeployment.DeployedEnv, *test_env.CLClusterTestEnv, testconfig.TestConfig) { + return NewLocalDevEnvironment(t, lggr, ccipdeployment.MockLinkPrice, ccipdeployment.MockWethPrice) +} + +func NewLocalDevEnvironment( + t *testing.T, + lggr logger.Logger, + linkPrice, wethPrice *big.Int) (ccipdeployment.DeployedEnv, *test_env.CLClusterTestEnv, testconfig.TestConfig) { ctx := testcontext.Get(t) // create a local docker environment with simulated chains and job-distributor // we cannot create the chainlink nodes yet as we need to deploy the capability registry first @@ -88,7 +97,7 @@ func NewLocalDevEnvironment(t *testing.T, lggr logger.Logger) (ccipdeployment.De require.NoError(t, err) ab := deployment.NewMemoryAddressBook() - crConfig := ccipdeployment.DeployTestContracts(t, lggr, ab, homeChainSel, feedSel, chains) + crConfig := ccipdeployment.DeployTestContracts(t, lggr, ab, homeChainSel, feedSel, chains, linkPrice, wethPrice) // start the chainlink nodes with the CR address err = StartChainlinkNodes(t, envConfig, @@ -99,6 +108,7 @@ func NewLocalDevEnvironment(t *testing.T, lggr logger.Logger) (ccipdeployment.De require.NoError(t, err) require.NotNil(t, e) e.ExistingAddresses = ab + e.MockAdapter = testEnv.MockAdapter envNodes, err := deployment.NodeInfo(e.NodeIDs, e.Offchain) require.NoError(t, err) @@ -128,7 +138,7 @@ func NewLocalDevEnvironmentWithRMN( lggr logger.Logger, numRmnNodes int, ) (ccipdeployment.DeployedEnv, devenv.RMNCluster) { - tenv, dockerenv, _ := NewLocalDevEnvironment(t, lggr) + tenv, dockerenv, _ := NewLocalDevEnvironmentWithDefaultPrice(t, lggr) state, err := ccipdeployment.LoadOnchainState(tenv.Env) require.NoError(t, err) @@ -291,6 +301,7 @@ func CreateDockerEnv(t *testing.T) ( builder := test_env.NewCLTestEnvBuilder(). WithTestConfig(&cfg). WithTestInstance(t). + WithMockAdapter(). WithJobDistributor(cfg.CCIP.JobDistributorConfig). WithStandardCleanup() diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 7314829f31c..5d9782a591d 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -36,7 +36,7 @@ require ( github.com/slack-go/slack v0.15.0 github.com/smartcontractkit/chain-selectors v1.0.29 github.com/smartcontractkit/chainlink-automation v0.8.1 - github.com/smartcontractkit/chainlink-ccip v0.0.0-20241112095015-3e85d9f1898b + github.com/smartcontractkit/chainlink-ccip v0.0.0-20241118091009-43c2b4804cec github.com/smartcontractkit/chainlink-common v0.3.1-0.20241114134822-aadff98ef068 github.com/smartcontractkit/chainlink-protos/job-distributor v0.4.0 github.com/smartcontractkit/chainlink-testing-framework/havoc v1.50.2 diff --git a/integration-tests/go.sum b/integration-tests/go.sum index c1d3f4f03b1..72a48138df1 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1403,8 +1403,8 @@ github.com/smartcontractkit/chain-selectors v1.0.29 h1:aZ9+OoUSMn4nqnissHtDvDoKR github.com/smartcontractkit/chain-selectors v1.0.29/go.mod h1:xsKM0aN3YGcQKTPRPDDtPx2l4mlTN1Djmg0VVXV40b8= github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgBc2xpDKBco/Q4h4ydl6+UUU= github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20241112095015-3e85d9f1898b h1:4kmZtaQ4fXwduHnw9xk5VmiIOW4nHg/Mx6iidlZJt5o= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20241112095015-3e85d9f1898b/go.mod h1:4adKaHNaxFsRvV/lYfqtbsWyyvIPUMLR0FdOJN/ljis= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20241118091009-43c2b4804cec h1:5vS1k8Qn09p8SQ3JzvS8iy4Pve7s3aVq+UPIdl74smY= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20241118091009-43c2b4804cec/go.mod h1:4adKaHNaxFsRvV/lYfqtbsWyyvIPUMLR0FdOJN/ljis= github.com/smartcontractkit/chainlink-common v0.3.1-0.20241114134822-aadff98ef068 h1:2llRW4Tn9W/EZp2XvXclQ9IjeTBwwxVPrrqaerX+vCE= github.com/smartcontractkit/chainlink-common v0.3.1-0.20241114134822-aadff98ef068/go.mod h1:ny87uTW6hLjCTLiBqBRNFEhETSXhHWevYlPclT5lSco= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20241017133723-5277829bd53f h1:BwrIaQIx5Iy6eT+DfLhFfK2XqjxRm74mVdlX8gbu4dw= diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index e65a218c78c..dd284638c28 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -65,7 +65,7 @@ require ( github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect - github.com/smartcontractkit/chainlink-ccip v0.0.0-20241112095015-3e85d9f1898b // indirect + github.com/smartcontractkit/chainlink-ccip v0.0.0-20241118091009-43c2b4804cec // indirect github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20241017133723-5277829bd53f // indirect github.com/smartcontractkit/chainlink-testing-framework/havoc v1.50.2 // indirect github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 // indirect diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index cb498e6a883..30a4a2c963e 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -1392,8 +1392,8 @@ github.com/smartcontractkit/chain-selectors v1.0.29 h1:aZ9+OoUSMn4nqnissHtDvDoKR github.com/smartcontractkit/chain-selectors v1.0.29/go.mod h1:xsKM0aN3YGcQKTPRPDDtPx2l4mlTN1Djmg0VVXV40b8= github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgBc2xpDKBco/Q4h4ydl6+UUU= github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20241112095015-3e85d9f1898b h1:4kmZtaQ4fXwduHnw9xk5VmiIOW4nHg/Mx6iidlZJt5o= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20241112095015-3e85d9f1898b/go.mod h1:4adKaHNaxFsRvV/lYfqtbsWyyvIPUMLR0FdOJN/ljis= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20241118091009-43c2b4804cec h1:5vS1k8Qn09p8SQ3JzvS8iy4Pve7s3aVq+UPIdl74smY= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20241118091009-43c2b4804cec/go.mod h1:4adKaHNaxFsRvV/lYfqtbsWyyvIPUMLR0FdOJN/ljis= github.com/smartcontractkit/chainlink-common v0.3.1-0.20241114134822-aadff98ef068 h1:2llRW4Tn9W/EZp2XvXclQ9IjeTBwwxVPrrqaerX+vCE= github.com/smartcontractkit/chainlink-common v0.3.1-0.20241114134822-aadff98ef068/go.mod h1:ny87uTW6hLjCTLiBqBRNFEhETSXhHWevYlPclT5lSco= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20241017133723-5277829bd53f h1:BwrIaQIx5Iy6eT+DfLhFfK2XqjxRm74mVdlX8gbu4dw= diff --git a/integration-tests/smoke/ccip_messaging_test.go b/integration-tests/smoke/ccip_messaging_test.go index 55309598c8c..4aa9ba34229 100644 --- a/integration-tests/smoke/ccip_messaging_test.go +++ b/integration-tests/smoke/ccip_messaging_test.go @@ -1,6 +1,9 @@ package smoke import ( + "context" + "fmt" + "math/big" "testing" "time" @@ -9,13 +12,17 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/exp/maps" + "github.com/smartcontractkit/chainlink-common/pkg/hashutil" + "github.com/smartcontractkit/chainlink-common/pkg/merklemulti" "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" jobv1 "github.com/smartcontractkit/chainlink-protos/job-distributor/v1/job" + "github.com/smartcontractkit/chainlink/deployment" ccdeploy "github.com/smartcontractkit/chainlink/deployment/ccip" - ccipdeployment "github.com/smartcontractkit/chainlink/deployment/ccip" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset" "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/testsetups" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/offramp" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/onramp" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/router" "github.com/smartcontractkit/chainlink/v2/core/logger" ) @@ -23,8 +30,8 @@ import ( type testCaseSetup struct { t *testing.T sender []byte - deployedEnv ccipdeployment.DeployedEnv - onchainState ccipdeployment.CCIPOnChainState + deployedEnv ccdeploy.DeployedEnv + onchainState ccdeploy.CCIPOnChainState sourceChain, destChain uint64 } @@ -35,15 +42,16 @@ type messagingTestCase struct { } type messagingTestCaseOutput struct { - replayed bool - nonce uint64 + replayed bool + nonce uint64 + msgSentEvent *onramp.OnRampCCIPMessageSent } func Test_CCIPMessaging(t *testing.T) { // Setup 2 chains and a single lane. lggr := logger.TestLogger(t) ctx := ccdeploy.Context(t) - e, _, _ := testsetups.NewLocalDevEnvironment(t, lggr) + e, _, _ := testsetups.NewLocalDevEnvironmentWithDefaultPrice(t, lggr) state, err := ccdeploy.LoadOnchainState(e.Env) require.NoError(t, err) @@ -58,10 +66,15 @@ func Test_CCIPMessaging(t *testing.T) { ", source chain selector:", sourceChain, ", dest chain selector:", destChain, ) + output, err := changeset.DeployPrerequisites(e.Env, changeset.DeployPrerequisiteConfig{ + ChainSelectors: e.Env.AllChainSelectors(), + }) + require.NoError(t, err) + require.NoError(t, e.Env.ExistingAddresses.Merge(output.AddressBook)) - tokenConfig := ccipdeployment.NewTestTokenConfig(state.Chains[e.FeedChainSel].USDFeeds) + tokenConfig := ccdeploy.NewTestTokenConfig(state.Chains[e.FeedChainSel].USDFeeds) // Apply migration - output, err := changeset.InitialDeploy(e.Env, ccdeploy.DeployCCIPContractConfig{ + output, err = changeset.InitialDeploy(e.Env, ccdeploy.DeployCCIPContractConfig{ HomeChainSel: e.HomeChainSel, FeedChainSel: e.FeedChainSel, ChainsToDeploy: allChainSelectors, @@ -92,7 +105,7 @@ func Test_CCIPMessaging(t *testing.T) { } // connect a single lane, source to dest - require.NoError(t, ccipdeployment.AddLane(e.Env, state, sourceChain, destChain)) + require.NoError(t, ccdeploy.AddLaneWithDefaultPrices(e.Env, state, sourceChain, destChain)) var ( replayed bool @@ -117,8 +130,8 @@ func Test_CCIPMessaging(t *testing.T) { }, common.HexToAddress("0xdead"), []byte("hello eoa"), - nil, // default extraArgs - ccipdeployment.EXECUTION_STATE_SUCCESS, // success because offRamp won't call an EOA + nil, // default extraArgs + ccdeploy.EXECUTION_STATE_SUCCESS, // success because offRamp won't call an EOA ) }) @@ -131,12 +144,14 @@ func Test_CCIPMessaging(t *testing.T) { }, state.Chains[destChain].FeeQuoter.Address(), []byte("hello FeeQuoter"), - nil, // default extraArgs - ccipdeployment.EXECUTION_STATE_SUCCESS, // success because offRamp won't call a contract not implementing CCIPReceiver + nil, // default extraArgs + ccdeploy.EXECUTION_STATE_SUCCESS, // success because offRamp won't call a contract not implementing CCIPReceiver ) }) t.Run("message to contract implementing CCIPReceiver", func(t *testing.T) { + latestHead, err := e.Env.Chains[destChain].Client.HeaderByNumber(ctx, nil) + require.NoError(t, err) out = runMessagingTestCase( messagingTestCase{ testCaseSetup: setup, @@ -146,9 +161,12 @@ func Test_CCIPMessaging(t *testing.T) { state.Chains[destChain].Receiver.Address(), []byte("hello CCIPReceiver"), nil, // default extraArgs - ccipdeployment.EXECUTION_STATE_SUCCESS, + ccdeploy.EXECUTION_STATE_SUCCESS, func(t *testing.T) { - iter, err := state.Chains[destChain].Receiver.FilterMessageReceived(nil) + iter, err := state.Chains[destChain].Receiver.FilterMessageReceived(&bind.FilterOpts{ + Context: ctx, + Start: latestHead.Number.Uint64(), + }) require.NoError(t, err) require.True(t, iter.Next()) // MessageReceived doesn't emit the data unfortunately, so can't check that. @@ -157,6 +175,8 @@ func Test_CCIPMessaging(t *testing.T) { }) t.Run("message to contract implementing CCIPReceiver with low exec gas", func(t *testing.T) { + latestHead, err := e.Env.Chains[destChain].Client.HeaderByNumber(ctx, nil) + require.NoError(t, err) out = runMessagingTestCase( messagingTestCase{ testCaseSetup: setup, @@ -165,18 +185,154 @@ func Test_CCIPMessaging(t *testing.T) { }, state.Chains[destChain].Receiver.Address(), []byte("hello CCIPReceiver with low exec gas"), - ccipdeployment.MakeEVMExtraArgsV2(1, false), // 1 gas is too low. - ccipdeployment.EXECUTION_STATE_FAILURE, // state would be failed onchain due to low gas + ccdeploy.MakeEVMExtraArgsV2(1, false), // 1 gas is too low. + ccdeploy.EXECUTION_STATE_FAILURE, // state would be failed onchain due to low gas ) + + manuallyExecute(ctx, t, latestHead.Number.Uint64(), state, destChain, out, sourceChain, e, sender) + + t.Logf("successfully manually executed message %x", + out.msgSentEvent.Message.Header.MessageId) + }) +} + +func manuallyExecute( + ctx context.Context, + t *testing.T, + startBlock uint64, + state ccdeploy.CCIPOnChainState, + destChain uint64, + out messagingTestCaseOutput, + sourceChain uint64, + e ccdeploy.DeployedEnv, + sender []byte, +) { + merkleRoot := getMerkleRoot( + ctx, + t, + state.Chains[destChain].OffRamp, + out.msgSentEvent.SequenceNumber, + startBlock, + ) + messageHash := getMessageHash( + ctx, + t, + state.Chains[destChain].OffRamp, + sourceChain, + out.msgSentEvent.SequenceNumber, + out.msgSentEvent.Message.Header.MessageId, + startBlock, + ) + tree, err := merklemulti.NewTree(hashutil.NewKeccak(), [][32]byte{messageHash}) + require.NoError(t, err) + proof, err := tree.Prove([]int{0}) + require.NoError(t, err) + require.Equal(t, merkleRoot, tree.Root()) + + tx, err := state.Chains[destChain].OffRamp.ManuallyExecute( + e.Env.Chains[destChain].DeployerKey, + []offramp.InternalExecutionReport{ + { + SourceChainSelector: sourceChain, + Messages: []offramp.InternalAny2EVMRampMessage{ + { + Header: offramp.InternalRampMessageHeader{ + MessageId: out.msgSentEvent.Message.Header.MessageId, + SourceChainSelector: sourceChain, + DestChainSelector: destChain, + SequenceNumber: out.msgSentEvent.SequenceNumber, + Nonce: out.msgSentEvent.Message.Header.Nonce, + }, + Sender: sender, + Data: []byte("hello CCIPReceiver with low exec gas"), + Receiver: state.Chains[destChain].Receiver.Address(), + GasLimit: big.NewInt(1), + TokenAmounts: []offramp.InternalAny2EVMTokenTransfer{}, + }, + }, + OffchainTokenData: [][][]byte{ + {}, + }, + Proofs: proof.Hashes, + ProofFlagBits: boolsToBitFlags(proof.SourceFlags), + }, + }, + [][]offramp.OffRampGasLimitOverride{ + { + { + ReceiverExecutionGasLimit: big.NewInt(200_000), + TokenGasOverrides: nil, + }, + }, + }, + ) + _, err = deployment.ConfirmIfNoError(e.Env.Chains[destChain], tx, err) + require.NoError(t, err, "failed to send/confirm manuallyExecute tx") + + newExecutionState, err := state.Chains[destChain].OffRamp.GetExecutionState(&bind.CallOpts{Context: ctx}, sourceChain, out.msgSentEvent.SequenceNumber) + require.NoError(t, err) + require.Equal(t, uint8(ccdeploy.EXECUTION_STATE_SUCCESS), newExecutionState) +} + +func getMerkleRoot( + ctx context.Context, + t *testing.T, + offRamp *offramp.OffRamp, + seqNr, + startBlock uint64, +) (merkleRoot [32]byte) { + iter, err := offRamp.FilterCommitReportAccepted(&bind.FilterOpts{ + Context: ctx, + Start: startBlock, }) + require.NoError(t, err) + for iter.Next() { + for _, mr := range iter.Event.MerkleRoots { + if mr.MinSeqNr >= seqNr || mr.MaxSeqNr <= seqNr { + return mr.MerkleRoot + } + } + } + require.Fail( + t, + fmt.Sprintf("no merkle root found for seq nr %d", seqNr), + ) + return merkleRoot } -func sleepAndReplay(t *testing.T, e ccipdeployment.DeployedEnv, sourceChain, destChain uint64) { +func getMessageHash( + ctx context.Context, + t *testing.T, + offRamp *offramp.OffRamp, + sourceChainSelector, + seqNr uint64, + msgID [32]byte, + startBlock uint64, +) (messageHash [32]byte) { + iter, err := offRamp.FilterExecutionStateChanged( + &bind.FilterOpts{ + Context: ctx, + Start: startBlock, + }, + []uint64{sourceChainSelector}, + []uint64{seqNr}, + [][32]byte{msgID}, + ) + require.NoError(t, err) + require.True(t, iter.Next()) + require.Equal(t, sourceChainSelector, iter.Event.SourceChainSelector) + require.Equal(t, seqNr, iter.Event.SequenceNumber) + require.Equal(t, msgID, iter.Event.MessageId) + + return iter.Event.MessageHash +} + +func sleepAndReplay(t *testing.T, e ccdeploy.DeployedEnv, sourceChain, destChain uint64) { time.Sleep(30 * time.Second) replayBlocks := make(map[uint64]uint64) replayBlocks[sourceChain] = 1 replayBlocks[destChain] = 1 - ccipdeployment.ReplayLogs(t, e.Env.Offchain, replayBlocks) + ccdeploy.ReplayLogs(t, e.Env.Offchain, replayBlocks) } func runMessagingTestCase( @@ -195,7 +351,7 @@ func runMessagingTestCase( require.Equal(tc.t, tc.nonce, latestNonce) startBlocks := make(map[uint64]*uint64) - seqNum := ccipdeployment.TestSendRequest(tc.t, tc.deployedEnv.Env, tc.onchainState, tc.sourceChain, tc.destChain, false, router.ClientEVM2AnyMessage{ + msgSentEvent := ccdeploy.TestSendRequest(tc.t, tc.deployedEnv.Env, tc.onchainState, tc.sourceChain, tc.destChain, false, router.ClientEVM2AnyMessage{ Receiver: common.LeftPadBytes(receiver.Bytes(), 32), Data: msgData, TokenAmounts: nil, @@ -203,7 +359,8 @@ func runMessagingTestCase( ExtraArgs: extraArgs, }) expectedSeqNum := make(map[uint64]uint64) - expectedSeqNum[tc.destChain] = seqNum + expectedSeqNum[tc.destChain] = msgSentEvent.SequenceNumber + out.msgSentEvent = msgSentEvent // hack if !tc.replayed { @@ -211,17 +368,17 @@ func runMessagingTestCase( out.replayed = true } - ccipdeployment.ConfirmCommitForAllWithExpectedSeqNums(tc.t, tc.deployedEnv.Env, tc.onchainState, expectedSeqNum, startBlocks) - execStates := ccipdeployment.ConfirmExecWithSeqNrForAll(tc.t, tc.deployedEnv.Env, tc.onchainState, expectedSeqNum, startBlocks) + ccdeploy.ConfirmCommitForAllWithExpectedSeqNums(tc.t, tc.deployedEnv.Env, tc.onchainState, expectedSeqNum, startBlocks) + execStates := ccdeploy.ConfirmExecWithSeqNrForAll(tc.t, tc.deployedEnv.Env, tc.onchainState, expectedSeqNum, startBlocks) require.Equalf( tc.t, expectedExecutionState, - execStates[seqNum], + execStates[msgSentEvent.SequenceNumber], "wrong execution state for seq nr %d, expected %d, got %d", - seqNum, + msgSentEvent.SequenceNumber, expectedExecutionState, - execStates[seqNum], + execStates[msgSentEvent.SequenceNumber], ) // check the sender latestNonce on the dest, should be incremented @@ -239,3 +396,14 @@ func runMessagingTestCase( return } + +// boolsToBitFlags transforms a list of boolean flags to a *big.Int encoded number. +func boolsToBitFlags(bools []bool) *big.Int { + encodedFlags := big.NewInt(0) + for i := 0; i < len(bools); i++ { + if bools[i] { + encodedFlags.SetBit(encodedFlags, i, 1) + } + } + return encodedFlags +} diff --git a/integration-tests/smoke/ccip_rmn_test.go b/integration-tests/smoke/ccip_rmn_test.go index d058b3c0e72..7372e10550c 100644 --- a/integration-tests/smoke/ccip_rmn_test.go +++ b/integration-tests/smoke/ccip_rmn_test.go @@ -361,15 +361,15 @@ func runRmnTestCase(t *testing.T, tc rmnTestCase) { toChain := chainSelectors[msg.toChainIdx] for i := 0; i < msg.count; i++ { - seqNum := ccipdeployment.TestSendRequest(t, envWithRMN.Env, onChainState, fromChain, toChain, false, router.ClientEVM2AnyMessage{ + msgSentEvent := ccipdeployment.TestSendRequest(t, envWithRMN.Env, onChainState, fromChain, toChain, false, router.ClientEVM2AnyMessage{ Receiver: common.LeftPadBytes(onChainState.Chains[toChain].Receiver.Address().Bytes(), 32), Data: []byte("hello world"), TokenAmounts: nil, FeeToken: common.HexToAddress("0x0"), ExtraArgs: nil, }) - expectedSeqNum[toChain] = seqNum - t.Logf("Sent message from chain %d to chain %d with seqNum %d", fromChain, toChain, seqNum) + expectedSeqNum[toChain] = msgSentEvent.SequenceNumber + t.Logf("Sent message from chain %d to chain %d with seqNum %d", fromChain, toChain, msgSentEvent.SequenceNumber) } zero := uint64(0) diff --git a/integration-tests/smoke/ccip_test.go b/integration-tests/smoke/ccip_test.go index 5b0ba285527..007a3c37e52 100644 --- a/integration-tests/smoke/ccip_test.go +++ b/integration-tests/smoke/ccip_test.go @@ -7,8 +7,6 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" - "github.com/smartcontractkit/chainlink-ccip/pluginconfig" jobv1 "github.com/smartcontractkit/chainlink-protos/job-distributor/v1/job" "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/testcontext" @@ -21,29 +19,28 @@ import ( ) func TestInitialDeployOnLocal(t *testing.T) { + t.Parallel() lggr := logger.TestLogger(t) ctx := ccdeploy.Context(t) - tenv, _, _ := testsetups.NewLocalDevEnvironment(t, lggr) + tenv, _, _ := testsetups.NewLocalDevEnvironmentWithDefaultPrice(t, lggr) e := tenv.Env state, err := ccdeploy.LoadOnchainState(tenv.Env) require.NoError(t, err) feeds := state.Chains[tenv.FeedChainSel].USDFeeds - tokenConfig := ccdeploy.NewTokenConfig() - tokenConfig.UpsertTokenInfo(ccdeploy.LinkSymbol, - pluginconfig.TokenInfo{ - AggregatorAddress: cciptypes.UnknownEncodedAddress(feeds[ccdeploy.LinkSymbol].Address().String()), - Decimals: ccdeploy.LinkDecimals, - DeviationPPB: cciptypes.NewBigIntFromInt64(1e9), - }, - ) + output, err := changeset.DeployPrerequisites(tenv.Env, changeset.DeployPrerequisiteConfig{ + ChainSelectors: tenv.Env.AllChainSelectors(), + }) + require.NoError(t, err) + require.NoError(t, tenv.Env.ExistingAddresses.Merge(output.AddressBook)) + // Apply migration - output, err := changeset.InitialDeploy(tenv.Env, ccdeploy.DeployCCIPContractConfig{ + output, err = changeset.InitialDeploy(tenv.Env, ccdeploy.DeployCCIPContractConfig{ HomeChainSel: tenv.HomeChainSel, FeedChainSel: tenv.FeedChainSel, ChainsToDeploy: tenv.Env.AllChainSelectors(), - TokenConfig: tokenConfig, + TokenConfig: ccdeploy.NewTestTokenConfig(feeds), MCMSConfig: ccdeploy.NewTestMCMSConfig(t, e), OCRSecrets: deployment.XXXGenerateTestOCRSecrets(), }) @@ -84,14 +81,14 @@ func TestInitialDeployOnLocal(t *testing.T) { require.NoError(t, err) block := latesthdr.Number.Uint64() startBlocks[dest] = &block - seqNum := ccdeploy.TestSendRequest(t, e, state, src, dest, false, router.ClientEVM2AnyMessage{ + msgSentEvent := ccdeploy.TestSendRequest(t, e, state, src, dest, false, router.ClientEVM2AnyMessage{ Receiver: common.LeftPadBytes(state.Chains[dest].Receiver.Address().Bytes(), 32), Data: []byte("hello world"), TokenAmounts: nil, FeeToken: common.HexToAddress("0x0"), ExtraArgs: nil, }) - expectedSeqNum[dest] = seqNum + expectedSeqNum[dest] = msgSentEvent.SequenceNumber } } @@ -114,30 +111,27 @@ func TestInitialDeployOnLocal(t *testing.T) { } func TestTokenTransfer(t *testing.T) { + t.Parallel() lggr := logger.TestLogger(t) ctx := ccdeploy.Context(t) - tenv, _, _ := testsetups.NewLocalDevEnvironment(t, lggr) + tenv, _, _ := testsetups.NewLocalDevEnvironmentWithDefaultPrice(t, lggr) e := tenv.Env state, err := ccdeploy.LoadOnchainState(e) require.NoError(t, err) - feeds := state.Chains[tenv.FeedChainSel].USDFeeds - tokenConfig := ccdeploy.NewTokenConfig() - tokenConfig.UpsertTokenInfo(ccdeploy.LinkSymbol, - pluginconfig.TokenInfo{ - AggregatorAddress: cciptypes.UnknownEncodedAddress(feeds[ccdeploy.LinkSymbol].Address().String()), - Decimals: ccdeploy.LinkDecimals, - DeviationPPB: cciptypes.NewBigIntFromInt64(1e9), - }, - ) + output, err := changeset.DeployPrerequisites(e, changeset.DeployPrerequisiteConfig{ + ChainSelectors: e.AllChainSelectors(), + }) + require.NoError(t, err) + require.NoError(t, e.ExistingAddresses.Merge(output.AddressBook)) // Apply migration - output, err := changeset.InitialDeploy(e, ccdeploy.DeployCCIPContractConfig{ + output, err = changeset.InitialDeploy(e, ccdeploy.DeployCCIPContractConfig{ HomeChainSel: tenv.HomeChainSel, FeedChainSel: tenv.FeedChainSel, ChainsToDeploy: e.AllChainSelectors(), - TokenConfig: tokenConfig, + TokenConfig: ccdeploy.NewTestTokenConfig(state.Chains[tenv.FeedChainSel].USDFeeds), MCMSConfig: ccdeploy.NewTestMCMSConfig(t, e), OCRSecrets: deployment.XXXGenerateTestOCRSecrets(), }) @@ -236,23 +230,23 @@ func TestTokenTransfer(t *testing.T) { feeToken = common.HexToAddress("0x0") ) if src == tenv.HomeChainSel && dest == tenv.FeedChainSel { - seqNum := ccdeploy.TestSendRequest(t, e, state, src, dest, false, router.ClientEVM2AnyMessage{ + msgSentEvent := ccdeploy.TestSendRequest(t, e, state, src, dest, false, router.ClientEVM2AnyMessage{ Receiver: receiver, Data: data, TokenAmounts: tokens[src], FeeToken: feeToken, ExtraArgs: nil, }) - expectedSeqNum[dest] = seqNum + expectedSeqNum[dest] = msgSentEvent.SequenceNumber } else { - seqNum := ccdeploy.TestSendRequest(t, e, state, src, dest, false, router.ClientEVM2AnyMessage{ + msgSentEvent := ccdeploy.TestSendRequest(t, e, state, src, dest, false, router.ClientEVM2AnyMessage{ Receiver: receiver, Data: data, TokenAmounts: nil, FeeToken: feeToken, ExtraArgs: nil, }) - expectedSeqNum[dest] = seqNum + expectedSeqNum[dest] = msgSentEvent.SequenceNumber } } } diff --git a/integration-tests/smoke/ccip_usdc_test.go b/integration-tests/smoke/ccip_usdc_test.go new file mode 100644 index 00000000000..9fb4544d9f6 --- /dev/null +++ b/integration-tests/smoke/ccip_usdc_test.go @@ -0,0 +1,283 @@ +package smoke + +import ( + "math/big" + "net/http" + "net/http/httptest" + "testing" + "time" + + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/stretchr/testify/require" + + "golang.org/x/exp/maps" + + cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" + "github.com/smartcontractkit/chainlink-ccip/pluginconfig" + commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" + jobv1 "github.com/smartcontractkit/chainlink-protos/job-distributor/v1/job" + "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/testcontext" + "github.com/smartcontractkit/chainlink/deployment" + ccdeploy "github.com/smartcontractkit/chainlink/deployment/ccip" + "github.com/smartcontractkit/chainlink/deployment/ccip/changeset" + "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/actions" + "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/testsetups" + + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/router" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/shared/generated/burn_mint_erc677" + "github.com/smartcontractkit/chainlink/v2/core/logger" +) + +func TestUSDCTokenTransfer(t *testing.T) { + lggr := logger.TestLogger(t) + ctx := ccdeploy.Context(t) + tenv, cluster, _ := testsetups.NewLocalDevEnvironmentWithDefaultPrice(t, lggr) + + var endpoint string + // When inmemory env then spin up in memory mock server + if cluster == nil { + server := mockAttestationResponse() + defer server.Close() + endpoint = server.URL + } else { + err := actions.SetMockServerWithUSDCAttestation(tenv.Env.MockAdapter, nil) + require.NoError(t, err) + endpoint = tenv.Env.MockAdapter.InternalEndpoint + } + + e := tenv.Env + state, err := ccdeploy.LoadOnchainState(e) + require.NoError(t, err) + + allChainSelectors := maps.Keys(e.Chains) + sourceChain := allChainSelectors[0] + destChain := allChainSelectors[1] + + feeds := state.Chains[tenv.FeedChainSel].USDFeeds + tokenConfig := ccdeploy.NewTokenConfig() + tokenConfig.UpsertTokenInfo(ccdeploy.LinkSymbol, + pluginconfig.TokenInfo{ + AggregatorAddress: cciptypes.UnknownEncodedAddress(feeds[ccdeploy.LinkSymbol].Address().String()), + Decimals: ccdeploy.LinkDecimals, + DeviationPPB: cciptypes.NewBigIntFromInt64(1e9), + }, + ) + + output, err := changeset.DeployPrerequisites(e, changeset.DeployPrerequisiteConfig{ + ChainSelectors: e.AllChainSelectors(), + }) + require.NoError(t, err) + require.NoError(t, tenv.Env.ExistingAddresses.Merge(output.AddressBook)) + + // Apply migration + output, err = changeset.InitialDeploy(e, ccdeploy.DeployCCIPContractConfig{ + HomeChainSel: tenv.HomeChainSel, + FeedChainSel: tenv.FeedChainSel, + ChainsToDeploy: e.AllChainSelectors(), + TokenConfig: tokenConfig, + MCMSConfig: ccdeploy.NewTestMCMSConfig(t, e), + OCRSecrets: deployment.XXXGenerateTestOCRSecrets(), + USDCConfig: ccdeploy.USDCConfig{ + Enabled: true, + USDCAttestationConfig: ccdeploy.USDCAttestationConfig{ + API: endpoint, + APITimeout: commonconfig.MustNewDuration(time.Second), + APIInterval: commonconfig.MustNewDuration(500 * time.Millisecond), + }, + }, + }) + require.NoError(t, err) + require.NoError(t, e.ExistingAddresses.Merge(output.AddressBook)) + + state, err = ccdeploy.LoadOnchainState(e) + require.NoError(t, err) + + srcUSDC, dstUSDC, err := ccdeploy.ConfigureUSDCTokenPools(lggr, e.Chains, sourceChain, destChain, state) + require.NoError(t, err) + + // Ensure capreg logs are up to date. + ccdeploy.ReplayLogs(t, e.Offchain, tenv.ReplayBlocks) + + // Apply the jobs. + for nodeID, jobs := range output.JobSpecs { + for _, job := range jobs { + // Note these auto-accept + _, err := e.Offchain.ProposeJob(ctx, + &jobv1.ProposeJobRequest{ + NodeId: nodeID, + Spec: job, + }) + require.NoError(t, err) + } + } + + // Add all lanes + require.NoError(t, ccdeploy.AddLanesForAll(e, state)) + + mintAndAllow(t, e, state, map[uint64]*burn_mint_erc677.BurnMintERC677{ + sourceChain: srcUSDC, + destChain: dstUSDC, + }) + + err = ccdeploy.UpdateFeeQuoterForUSDC(lggr, e.Chains[sourceChain], state.Chains[sourceChain], destChain, srcUSDC) + require.NoError(t, err) + + err = ccdeploy.UpdateFeeQuoterForUSDC(lggr, e.Chains[destChain], state.Chains[destChain], sourceChain, dstUSDC) + require.NoError(t, err) + + // MockE2EUSDCTransmitter always mint 1, see MockE2EUSDCTransmitter.sol for more details + tinyOneCoin := new(big.Int).SetUint64(1) + + srcDstTokenMapping := map[common.Address]*burn_mint_erc677.BurnMintERC677{ + srcUSDC.Address(): dstUSDC, + dstUSDC.Address(): srcUSDC, + } + + tcs := []struct { + name string + receiver common.Address + sourceChain uint64 + destChain uint64 + tokens []router.ClientEVMTokenAmount + data []byte + }{ + { + name: "single USDC token transfer to EOA", + receiver: utils.RandomAddress(), + sourceChain: destChain, + destChain: sourceChain, + tokens: []router.ClientEVMTokenAmount{ + { + Token: dstUSDC.Address(), + Amount: tinyOneCoin, + }}, + }, + { + name: "programmable token transfer to valid contract receiver", + receiver: state.Chains[destChain].Receiver.Address(), + sourceChain: sourceChain, + destChain: destChain, + tokens: []router.ClientEVMTokenAmount{ + { + Token: srcUSDC.Address(), + Amount: tinyOneCoin, + }, + }, + data: []byte("hello world"), + }, + } + + for _, tt := range tcs { + t.Run(tt.name, func(t *testing.T) { + initialBalances := map[common.Address]*big.Int{} + for _, token := range tt.tokens { + destToken := srcDstTokenMapping[token.Token] + + initialBalance, err := destToken.BalanceOf(&bind.CallOpts{Context: tests.Context(t)}, tt.receiver) + require.NoError(t, err) + initialBalances[token.Token] = initialBalance + } + + transferAndWaitForSuccess( + t, + e, + state, + tt.sourceChain, + tt.destChain, + tt.tokens, + tt.receiver, + tt.data, + ) + + for _, token := range tt.tokens { + destToken := srcDstTokenMapping[token.Token] + + balance, err := destToken.BalanceOf(&bind.CallOpts{Context: tests.Context(t)}, tt.receiver) + require.NoError(t, err) + require.Equal(t, new(big.Int).Add(initialBalances[token.Token], tinyOneCoin), balance) + } + }) + } +} + +// mintAndAllow mints tokens for deployers and allow router to spend them +func mintAndAllow( + t *testing.T, + e deployment.Environment, + state ccdeploy.CCIPOnChainState, + tokens map[uint64]*burn_mint_erc677.BurnMintERC677, +) { + for chain, token := range tokens { + twoCoins := new(big.Int).Mul(big.NewInt(1e18), big.NewInt(2)) + + tx, err := token.Mint( + e.Chains[chain].DeployerKey, + e.Chains[chain].DeployerKey.From, + new(big.Int).Mul(twoCoins, big.NewInt(10)), + ) + require.NoError(t, err) + _, err = e.Chains[chain].Confirm(tx) + require.NoError(t, err) + + tx, err = token.Approve(e.Chains[chain].DeployerKey, state.Chains[chain].Router.Address(), twoCoins) + require.NoError(t, err) + _, err = e.Chains[chain].Confirm(tx) + require.NoError(t, err) + } +} + +// transferAndWaitForSuccess sends a message from sourceChain to destChain and waits for it to be executed +func transferAndWaitForSuccess( + t *testing.T, + env deployment.Environment, + state ccdeploy.CCIPOnChainState, + sourceChain, destChain uint64, + tokens []router.ClientEVMTokenAmount, + receiver common.Address, + data []byte, +) { + startBlocks := make(map[uint64]*uint64) + expectedSeqNum := make(map[uint64]uint64) + + latesthdr, err := env.Chains[destChain].Client.HeaderByNumber(testcontext.Get(t), nil) + require.NoError(t, err) + block := latesthdr.Number.Uint64() + startBlocks[destChain] = &block + + msgSentEvent := ccdeploy.TestSendRequest(t, env, state, sourceChain, destChain, false, router.ClientEVM2AnyMessage{ + Receiver: common.LeftPadBytes(receiver.Bytes(), 32), + Data: data, + TokenAmounts: tokens, + FeeToken: common.HexToAddress("0x0"), + ExtraArgs: nil, + }) + expectedSeqNum[destChain] = msgSentEvent.SequenceNumber + + // Wait for all commit reports to land. + ccdeploy.ConfirmCommitForAllWithExpectedSeqNums(t, env, state, expectedSeqNum, startBlocks) + + // Wait for all exec reports to land + ccdeploy.ConfirmExecWithSeqNrForAll(t, env, state, expectedSeqNum, startBlocks) +} + +// mockAttestationResponse mocks the USDC attestation server, it returns random Attestation. +// We don't need to return exactly the same attestation, because our Mocked USDC contract doesn't rely on any specific +// value, but instead of that it just checks if the attestation is present. Therefore, it makes the test a bit simpler +// and doesn't require very detailed mocks. Please see tests in chainlink-ccip for detailed tests using real attestations +func mockAttestationResponse() *httptest.Server { + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + response := `{ + "status": "complete", + "attestation": "0x9049623e91719ef2aa63c55f357be2529b0e7122ae552c18aff8db58b4633c4d3920ff03d3a6d1ddf11f06bf64d7fd60d45447ac81f527ba628877dc5ca759651b08ffae25a6d3b1411749765244f0a1c131cbfe04430d687a2e12fd9d2e6dc08e118ad95d94ad832332cf3c4f7a4f3da0baa803b7be024b02db81951c0f0714de1b" + }` + + _, err := w.Write([]byte(response)) + if err != nil { + panic(err) + } + })) + return server +} diff --git a/integration-tests/smoke/fee_boosting_test.go b/integration-tests/smoke/fee_boosting_test.go new file mode 100644 index 00000000000..625200360e8 --- /dev/null +++ b/integration-tests/smoke/fee_boosting_test.go @@ -0,0 +1,158 @@ +package smoke + +import ( + "math/big" + "testing" + "time" + + "github.com/ethereum/go-ethereum/common" + "github.com/test-go/testify/require" + "golang.org/x/exp/maps" + + jobv1 "github.com/smartcontractkit/chainlink-protos/job-distributor/v1/job" + "github.com/smartcontractkit/chainlink/deployment" + ccdeploy "github.com/smartcontractkit/chainlink/deployment/ccip" + "github.com/smartcontractkit/chainlink/deployment/ccip/changeset" + "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/testsetups" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/router" + "github.com/smartcontractkit/chainlink/v2/core/logger" +) + +type feeboostTestCase struct { + t *testing.T + sender []byte + deployedEnv ccdeploy.DeployedEnv + onchainState ccdeploy.CCIPOnChainState + initialPrices ccdeploy.InitialPrices + priceFeedPrices priceFeedPrices + sourceChain, destChain uint64 +} + +type priceFeedPrices struct { + linkPrice *big.Int + wethPrice *big.Int +} + +// TODO: find a way to reuse the same test setup for all tests +func Test_CCIPFeeBoosting(t *testing.T) { + ctx := ccdeploy.Context(t) + + setupTestEnv := func(t *testing.T, numChains int) (ccdeploy.DeployedEnv, ccdeploy.CCIPOnChainState, []uint64) { + e, _, _ := testsetups.NewLocalDevEnvironment( + t, logger.TestLogger(t), + deployment.E18Mult(5), + big.NewInt(9e8)) + + state, err := ccdeploy.LoadOnchainState(e.Env) + require.NoError(t, err) + + allChainSelectors := maps.Keys(e.Env.Chains) + require.Len(t, allChainSelectors, numChains) + + output, err := changeset.DeployPrerequisites(e.Env, changeset.DeployPrerequisiteConfig{ + ChainSelectors: e.Env.AllChainSelectors(), + }) + require.NoError(t, err) + require.NoError(t, e.Env.ExistingAddresses.Merge(output.AddressBook)) + + tokenConfig := ccdeploy.NewTestTokenConfig(state.Chains[e.FeedChainSel].USDFeeds) + // Apply migration + output, err = changeset.InitialDeploy(e.Env, ccdeploy.DeployCCIPContractConfig{ + HomeChainSel: e.HomeChainSel, + FeedChainSel: e.FeedChainSel, + ChainsToDeploy: allChainSelectors, + TokenConfig: tokenConfig, + MCMSConfig: ccdeploy.NewTestMCMSConfig(t, e.Env), + OCRSecrets: deployment.XXXGenerateTestOCRSecrets(), + }) + require.NoError(t, err) + require.NoError(t, e.Env.ExistingAddresses.Merge(output.AddressBook)) + state, err = ccdeploy.LoadOnchainState(e.Env) + require.NoError(t, err) + + // Ensure capreg logs are up to date. + ccdeploy.ReplayLogs(t, e.Env.Offchain, e.ReplayBlocks) + + // Apply the jobs. + for nodeID, jobs := range output.JobSpecs { + for _, job := range jobs { + // Note these auto-accept + _, err := e.Env.Offchain.ProposeJob(ctx, + &jobv1.ProposeJobRequest{ + NodeId: nodeID, + Spec: job, + }) + require.NoError(t, err) + } + } + + return e, state, allChainSelectors + } + + t.Run("boost needed due to WETH price increase (also covering gas price inscrease)", func(t *testing.T) { + e, state, chains := setupTestEnv(t, 2) + runFeeboostTestCase(feeboostTestCase{ + t: t, + sender: common.LeftPadBytes(e.Env.Chains[chains[0]].DeployerKey.From.Bytes(), 32), + deployedEnv: e, + onchainState: state, + initialPrices: ccdeploy.InitialPrices{ + LinkPrice: deployment.E18Mult(5), + WethPrice: deployment.E18Mult(9), + GasPrice: ccdeploy.ToPackedFee(big.NewInt(1.8e11), big.NewInt(0)), + }, + priceFeedPrices: priceFeedPrices{ + linkPrice: deployment.E18Mult(5), + wethPrice: big.NewInt(9.9e8), // increase from 9e8 to 9.9e8 + }, + sourceChain: chains[0], + destChain: chains[1], + }) + }) + + t.Run("boost needed due to LINK price decrease", func(t *testing.T) { + e, state, chains := setupTestEnv(t, 2) + runFeeboostTestCase(feeboostTestCase{ + t: t, + sender: common.LeftPadBytes(e.Env.Chains[chains[0]].DeployerKey.From.Bytes(), 32), + deployedEnv: e, + onchainState: state, + initialPrices: ccdeploy.InitialPrices{ + LinkPrice: deployment.E18Mult(5), + WethPrice: deployment.E18Mult(9), + GasPrice: ccdeploy.ToPackedFee(big.NewInt(1.8e11), big.NewInt(0)), + }, + priceFeedPrices: priceFeedPrices{ + linkPrice: big.NewInt(4.5e18), // decrease from 5e18 to 4.5e18 + wethPrice: big.NewInt(9e8), + }, + sourceChain: chains[0], + destChain: chains[1], + }) + }) +} + +func runFeeboostTestCase(tc feeboostTestCase) { + require.NoError(tc.t, ccdeploy.AddLane(tc.deployedEnv.Env, tc.onchainState, tc.sourceChain, tc.destChain, tc.initialPrices)) + + startBlocks := make(map[uint64]*uint64) + expectedSeqNum := make(map[uint64]uint64) + msgSentEvent := ccdeploy.TestSendRequest(tc.t, tc.deployedEnv.Env, tc.onchainState, tc.sourceChain, tc.destChain, false, router.ClientEVM2AnyMessage{ + Receiver: common.LeftPadBytes(tc.onchainState.Chains[tc.destChain].Receiver.Address().Bytes(), 32), + Data: []byte("message that needs fee boosting"), + TokenAmounts: nil, + FeeToken: common.HexToAddress("0x0"), + ExtraArgs: nil, + }) + expectedSeqNum[tc.destChain] = msgSentEvent.SequenceNumber + + // hack + time.Sleep(30 * time.Second) + replayBlocks := make(map[uint64]uint64) + replayBlocks[tc.sourceChain] = 1 + replayBlocks[tc.destChain] = 1 + ccdeploy.ReplayLogs(tc.t, tc.deployedEnv.Env.Offchain, replayBlocks) + + ccdeploy.ConfirmCommitForAllWithExpectedSeqNums(tc.t, tc.deployedEnv.Env, tc.onchainState, expectedSeqNum, startBlocks) + ccdeploy.ConfirmExecWithSeqNrForAll(tc.t, tc.deployedEnv.Env, tc.onchainState, expectedSeqNum, startBlocks) +} diff --git a/operator_ui/TAG b/operator_ui/TAG index 26d6a040a47..b4622723757 100644 --- a/operator_ui/TAG +++ b/operator_ui/TAG @@ -1 +1 @@ -v0.8.0-7c02aca +v0.8.0-ca7e4da