Repository: run-llama/workflows-py Branch: main Commit: 7ff532530243 Files: 780 Total size: 6.7 MB Directory structure: gitextract_9disofz3/ ├── .agents/ │ └── skills/ │ └── llamactl-qa/ │ └── SKILL.md ├── .changeset/ │ ├── README.md │ └── config.json ├── .dockerignore ├── .gitattributes ├── .github/ │ ├── actions/ │ │ ├── pr-fix-comment/ │ │ │ └── action.yml │ │ └── setup-publish/ │ │ └── action.yml │ └── workflows/ │ ├── bump_llama_index_core.yml │ ├── chart-validate.yaml │ ├── go-ci.yml │ ├── lint.yml │ ├── lockfile.yml │ ├── publish_changesets.yml │ ├── publish_openapi.yml │ ├── sync-docs.yml │ ├── test.yml │ └── update_debugger_assets.yml ├── .gitignore ├── .pre-commit-config.yaml ├── .prettierrc ├── .taplo.toml ├── AGENTS.md ├── CLAUDE.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── architecture-docs/ │ ├── build-api.md │ ├── control-loop.md │ ├── core-overview.md │ ├── overall-architecture.md │ ├── quick-reference.md │ └── server-architecture.md ├── charts/ │ ├── AGENTS.md │ ├── llama-agents/ │ │ ├── .helmignore │ │ ├── CHANGELOG.md │ │ ├── Chart.yaml │ │ ├── README.md │ │ ├── README.md.gotmpl │ │ ├── crds/ │ │ │ ├── deploy.llamaindex.ai_llamadeployments.yaml │ │ │ └── deploy.llamaindex.ai_llamadeploymenttemplates.yaml │ │ ├── package.json │ │ ├── templates/ │ │ │ ├── _helpers.tpl │ │ │ ├── _s3proxy.tpl │ │ │ ├── _secrets.tpl │ │ │ ├── controlplane-hpa.yaml │ │ │ ├── controlplane-s3-secret.yaml │ │ │ ├── deployment.yaml │ │ │ ├── networkpolicy.yaml │ │ │ ├── operator-deployment-template.yaml │ │ │ ├── operator-deployment.yaml │ │ │ ├── operator-hpa.yaml │ │ │ ├── rbac.yaml │ │ │ ├── s3proxy-configmap.yaml │ │ │ ├── s3proxy-secret.yaml │ │ │ ├── service.yaml │ │ │ ├── serviceaccount.yaml │ │ │ └── servicemonitor.yaml │ │ ├── tests/ │ │ │ ├── apps_namespace_test.yaml │ │ │ ├── object_storage_test.yaml │ │ │ ├── operator_image_tag_env_test.yaml │ │ │ ├── s3proxy_test.yaml │ │ │ └── servicemonitor_test.yaml │ │ └── values.yaml │ └── llama-agents-crds/ │ ├── .helmignore │ ├── CHANGELOG.md │ ├── Chart.yaml │ ├── README.md │ ├── files/ │ │ ├── deploy.llamaindex.ai_llamadeployments.yaml │ │ └── deploy.llamaindex.ai_llamadeploymenttemplates.yaml │ ├── package.json │ ├── templates/ │ │ └── crds.yaml │ └── values.yaml ├── docker/ │ ├── Dockerfile │ ├── Dockerfile.mitm-test │ ├── mitm-proxy-test/ │ │ └── entrypoint.sh │ └── operator.Dockerfile ├── docs/ │ ├── api_docs/ │ │ ├── .gitignore │ │ ├── README.md │ │ ├── docs/ │ │ │ ├── api_reference/ │ │ │ │ ├── _static/ │ │ │ │ │ ├── css/ │ │ │ │ │ │ ├── algolia.css │ │ │ │ │ │ └── custom.css │ │ │ │ │ └── js/ │ │ │ │ │ ├── algolia.js │ │ │ │ │ └── leadfeeder.js │ │ │ │ ├── context.md │ │ │ │ ├── decorators.md │ │ │ │ ├── errors.md │ │ │ │ ├── events.md │ │ │ │ ├── handler.md │ │ │ │ ├── index.md │ │ │ │ ├── resource.md │ │ │ │ ├── retry_policy.md │ │ │ │ ├── workflow.md │ │ │ │ └── workflow_server/ │ │ │ │ ├── client.md │ │ │ │ ├── models.md │ │ │ │ └── server.md │ │ │ ├── css/ │ │ │ │ ├── algolia.css │ │ │ │ ├── custom.css │ │ │ │ └── style.css │ │ │ └── javascript/ │ │ │ └── algolia.js │ │ ├── mkdocs.yml │ │ ├── overrides/ │ │ │ ├── main.html │ │ │ └── partials/ │ │ │ ├── copyright.html │ │ │ └── search.html │ │ └── pyproject.toml │ └── src/ │ ├── components/ │ │ ├── Header.astro │ │ ├── HomepageFeatures/ │ │ │ ├── index.js │ │ │ └── styles.module.css │ │ ├── ProtectedContent.jsx │ │ ├── ProtectedTabs.jsx │ │ ├── SiteTitle.astro │ │ ├── llamaExtract.js │ │ ├── llamaParse.js │ │ └── mdx_components.jsx │ ├── content/ │ │ └── docs/ │ │ └── llamaagents/ │ │ ├── _meta.yml │ │ ├── cloud/ │ │ │ ├── _meta.yml │ │ │ ├── agent-data-overview.md │ │ │ ├── builder.md │ │ │ └── click-to-deploy.md │ │ ├── llamactl/ │ │ │ ├── _meta.yml │ │ │ ├── agent-templates.md │ │ │ ├── cd-with-github-actions.md │ │ │ ├── configuration-reference.md │ │ │ ├── getting-started.md │ │ │ ├── ui-build.md │ │ │ ├── ui-hooks.md │ │ │ └── workflow-api.md │ │ ├── llamactl-reference/ │ │ │ ├── _meta.yml │ │ │ ├── commands-auth.md │ │ │ ├── commands-config.md │ │ │ ├── commands-deployments.md │ │ │ ├── commands-environments.md │ │ │ ├── commands-init.md │ │ │ ├── commands-organizations.md │ │ │ ├── commands-pkg.md │ │ │ ├── commands-projects.md │ │ │ └── commands-serve.md │ │ ├── overview.md │ │ └── workflows/ │ │ ├── _meta.yml │ │ ├── async_workflows.md │ │ ├── branches_and_loops.md │ │ ├── client.md │ │ ├── concurrent_execution.md │ │ ├── customizing_entry_exit_points.md │ │ ├── dbos.md │ │ ├── deployment.md │ │ ├── drawing.md │ │ ├── durable_workflows.md │ │ ├── human_in_the_loop.md │ │ ├── index.md │ │ ├── managing_state.md │ │ ├── observability.md │ │ ├── resources.md │ │ ├── retry_steps.md │ │ ├── streaming.mdx │ │ └── unbound_functions.md │ ├── content.config.ts │ └── pages/ │ └── index.astro ├── docs.config.mjs ├── examples/ │ ├── README.md │ ├── agent.ipynb │ ├── client/ │ │ ├── README.md │ │ ├── base/ │ │ │ ├── workflow_client.py │ │ │ └── workflow_server.py │ │ └── human_in_the_loop/ │ │ ├── workflow_client_hitl.py │ │ └── workflow_server_hitl.py │ ├── dbos/ │ │ ├── .gitignore │ │ ├── README.md │ │ ├── _replica.py │ │ ├── docker-compose.yml │ │ ├── durable_workflow.py │ │ ├── idle_release_demo.py │ │ ├── server_quickstart.py │ │ └── server_replicas.py │ ├── docker/ │ │ ├── Dockerfile │ │ ├── README.md │ │ ├── app.py │ │ └── requirements.txt │ ├── document_agents/ │ │ └── finance_triage_agent.ipynb │ ├── document_processing.ipynb │ ├── durable_workflows.ipynb │ ├── eval_driven_prompt_refinement.ipynb │ ├── feature_walkthrough.ipynb │ ├── k8s-otel/ │ │ ├── Dockerfile │ │ ├── README.md │ │ ├── Tiltfile │ │ ├── app.py │ │ ├── k8s/ │ │ │ ├── app.yaml │ │ │ ├── jaeger.yaml │ │ │ ├── kustomization.yaml │ │ │ ├── namespace.yaml │ │ │ ├── otel-collector.yaml │ │ │ ├── phoenix.yaml │ │ │ └── postgres.yaml │ │ ├── kind-config.yaml │ │ └── pyproject.toml │ ├── observability/ │ │ ├── README.md │ │ ├── workflow_context_logging.ipynb │ │ ├── workflows_observability_pt1.ipynb │ │ ├── workflows_observability_pt2.ipynb │ │ ├── workflows_observablitiy_arize_phoenix.ipynb │ │ └── workflows_observablitiy_langfuse.ipynb │ ├── server/ │ │ ├── README.md │ │ ├── fastapi_server_example.ipynb │ │ ├── server.py │ │ ├── server_example.ipynb │ │ └── server_example.py │ ├── state_management_with_vector_databases.ipynb │ ├── streaming_internal_events.ipynb │ └── visualization/ │ └── resource_nodes_example.py ├── operator/ │ ├── .gitignore │ ├── .golangci.yml │ ├── AGENTS.md │ ├── CHANGELOG.md │ ├── Makefile │ ├── Tiltfile │ ├── api/ │ │ └── v1/ │ │ ├── groupversion_info.go │ │ ├── llamadeployment_types.go │ │ ├── llamadeploymenttemplate_types.go │ │ └── zz_generated.deepcopy.go │ ├── cmd/ │ │ └── main.go │ ├── config/ │ │ ├── crd/ │ │ │ ├── bases/ │ │ │ │ ├── deploy.llamaindex.ai_llamadeployments.yaml │ │ │ │ └── deploy.llamaindex.ai_llamadeploymenttemplates.yaml │ │ │ └── kustomizeconfig.yaml │ │ └── rbac/ │ │ └── role.yaml │ ├── dev.py │ ├── go.mod │ ├── go.sum │ ├── internal/ │ │ └── controller/ │ │ ├── apps_namespace_test.go │ │ ├── classify_pod_test.go │ │ ├── image_tag_unit_test.go │ │ ├── lifecycle.go │ │ ├── lifecycle_test.go │ │ ├── llamadeployment_controller_test.go │ │ ├── mapping_unit_test.go │ │ ├── metrics.go │ │ ├── metrics_test.go │ │ ├── reconcile.go │ │ ├── reconcile_test.go │ │ ├── resources.go │ │ ├── resources_build_unit_test.go │ │ ├── resources_security_test.go │ │ ├── suite_test.go │ │ └── test_utils_test.go │ ├── package.json │ └── tilt/ │ ├── .gitignore │ ├── env-to-secret.py │ ├── helm/ │ │ └── values-dev.yaml │ ├── k8s-manifests/ │ │ ├── .gitkeep │ │ ├── backup-encryption-secrets.yaml │ │ ├── kind-gc-cronjob.yaml │ │ ├── object-storage-secrets.yaml │ │ ├── prometheus.yaml │ │ └── seaweedfs.yaml │ └── scripts/ │ └── install-prometheus.sh ├── package.json ├── packages/ │ ├── llama-agents-agentcore/ │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── pyproject.toml │ │ ├── src/ │ │ │ └── llama_agents/ │ │ │ └── agentcore/ │ │ │ ├── __init__.py │ │ │ ├── _runtime_decorator.py │ │ │ ├── _service.py │ │ │ ├── deploy.py │ │ │ ├── entrypoint.py │ │ │ ├── export.py │ │ │ └── main.py │ │ └── tests/ │ │ ├── __init__.py │ │ ├── conftest.py │ │ ├── test_entrypoint.py │ │ ├── test_export.py │ │ └── test_service.py │ ├── llama-agents-appserver/ │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── pyproject.toml │ │ ├── pytest.ini │ │ ├── src/ │ │ │ ├── llama_agents/ │ │ │ │ └── appserver/ │ │ │ │ ├── __init__.py │ │ │ │ ├── app.py │ │ │ │ ├── bootstrap.py │ │ │ │ ├── build.py │ │ │ │ ├── configure_logging.py │ │ │ │ ├── correlation_id.py │ │ │ │ ├── deployment.py │ │ │ │ ├── deployment_config_parser.py │ │ │ │ ├── interrupts.py │ │ │ │ ├── process_utils.py │ │ │ │ ├── py.typed │ │ │ │ ├── routers/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── deployments.py │ │ │ │ │ ├── status.py │ │ │ │ │ └── ui_proxy.py │ │ │ │ ├── settings.py │ │ │ │ ├── stats.py │ │ │ │ ├── types.py │ │ │ │ └── workflow_loader.py │ │ │ └── llama_deploy/ │ │ │ └── appserver/ │ │ │ └── __init__.py │ │ └── tests/ │ │ ├── conftest.py │ │ ├── routers/ │ │ │ ├── test_deployments.py │ │ │ ├── test_ui_proxy.py │ │ │ └── test_ui_proxy_ws.py │ │ ├── test_app.py │ │ ├── test_app_server_start.py │ │ ├── test_bootstrap.py │ │ ├── test_configure_logging.py │ │ ├── test_deployment.py │ │ ├── test_environment_loader.py │ │ ├── test_preflight.py │ │ ├── test_status.py │ │ ├── test_workflow_loader.py │ │ ├── test_workflow_loader_install.py │ │ ├── test_workflow_loader_load_workflows.py │ │ └── test_workflow_loader_streaming.py │ ├── llama-agents-client/ │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── pyproject.toml │ │ ├── src/ │ │ │ └── llama_agents/ │ │ │ └── client/ │ │ │ ├── __init__.py │ │ │ ├── client.py │ │ │ └── protocol/ │ │ │ ├── __init__.py │ │ │ └── serializable_events.py │ │ └── tests/ │ │ ├── client/ │ │ │ ├── client_test_workflows.py │ │ │ └── test_client.py │ │ └── protocol/ │ │ ├── __init__.py │ │ └── test_serializable_events.py │ ├── llama-agents-control-plane/ │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── pyproject.toml │ │ ├── src/ │ │ │ ├── llama_agents/ │ │ │ │ └── control_plane/ │ │ │ │ ├── __init__.py │ │ │ │ ├── backup/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── archive.py │ │ │ │ │ ├── encryption.py │ │ │ │ │ └── storage.py │ │ │ │ ├── build_api/ │ │ │ │ │ ├── build_app.py │ │ │ │ │ ├── build_auth.py │ │ │ │ │ ├── build_gc.py │ │ │ │ │ ├── build_service.py │ │ │ │ │ └── build_storage.py │ │ │ │ ├── code_repo/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── git_server.py │ │ │ │ │ ├── service.py │ │ │ │ │ └── storage.py │ │ │ │ ├── git/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── _git_service.py │ │ │ │ │ ├── _github_auth.py │ │ │ │ │ ├── github_api_client.py │ │ │ │ │ └── github_api_schema.py │ │ │ │ ├── k8s_client.py │ │ │ │ ├── lifecycle.py │ │ │ │ ├── log_config.py │ │ │ │ ├── main.py │ │ │ │ ├── manage_api/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── backup_service.py │ │ │ │ │ ├── backup_v1beta1.py │ │ │ │ │ ├── deployments_service.py │ │ │ │ │ ├── deployments_v1beta1.py │ │ │ │ │ └── manage_app.py │ │ │ │ ├── py.typed │ │ │ │ ├── settings.py │ │ │ │ └── storage.py │ │ │ └── llama_deploy/ │ │ │ └── control_plane/ │ │ │ └── __init__.py │ │ └── tests/ │ │ ├── backup/ │ │ │ ├── __init__.py │ │ │ ├── conftest.py │ │ │ ├── test_archive.py │ │ │ ├── test_backup_roundtrip.py │ │ │ ├── test_backup_service.py │ │ │ ├── test_encryption.py │ │ │ ├── test_schema.py │ │ │ └── test_storage.py │ │ ├── code_repo/ │ │ │ ├── __init__.py │ │ │ ├── conftest.py │ │ │ ├── test_git_server.py │ │ │ └── test_storage.py │ │ ├── deployments/ │ │ │ └── test_deployments_service.py │ │ ├── test_build_app.py │ │ ├── test_build_app_ssrf.py │ │ ├── test_build_gc.py │ │ ├── test_endpoints.py │ │ ├── test_find_deployment_id.py │ │ ├── test_git_service.py │ │ ├── test_k8s_client.py │ │ ├── test_storage.py │ │ └── test_ui_build_path.py │ ├── llama-agents-core/ │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── pyproject.toml │ │ ├── src/ │ │ │ ├── llama_agents/ │ │ │ │ └── core/ │ │ │ │ ├── __init__.py │ │ │ │ ├── _alias.py │ │ │ │ ├── _compat.py │ │ │ │ ├── client/ │ │ │ │ │ ├── manage_client.py │ │ │ │ │ └── ssl_util.py │ │ │ │ ├── config.py │ │ │ │ ├── deployment_config.py │ │ │ │ ├── git/ │ │ │ │ │ └── git_util.py │ │ │ │ ├── iter_utils.py │ │ │ │ ├── path_util.py │ │ │ │ ├── py.typed │ │ │ │ ├── schema/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── backups.py │ │ │ │ │ ├── base.py │ │ │ │ │ ├── deployments.py │ │ │ │ │ ├── git_validation.py │ │ │ │ │ ├── projects.py │ │ │ │ │ └── public.py │ │ │ │ ├── server/ │ │ │ │ │ └── manage_api/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── _abstract_deployments_service.py │ │ │ │ │ ├── _create_deployments_router.py │ │ │ │ │ └── _exceptions.py │ │ │ │ └── ui_build.py │ │ │ └── llama_deploy/ │ │ │ └── core/ │ │ │ └── __init__.py │ │ └── tests/ │ │ ├── client/ │ │ │ └── test_manage_client.py │ │ ├── test_deployment_config.py │ │ ├── test_git_util.py │ │ ├── test_iter_utils.py │ │ ├── test_schema.py │ │ └── test_ssl_util.py │ ├── llama-agents-dbos/ │ │ ├── ARCHITECTURE.md │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── conftest.py │ │ ├── package.json │ │ ├── pyproject.toml │ │ ├── src/ │ │ │ └── llama_agents/ │ │ │ └── dbos/ │ │ │ ├── __init__.py │ │ │ ├── _store/ │ │ │ │ ├── __init__.py │ │ │ │ ├── postgres/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── migrations/ │ │ │ │ │ ├── 0001_init.sql │ │ │ │ │ └── __init__.py │ │ │ │ └── sqlite/ │ │ │ │ ├── __init__.py │ │ │ │ └── migrations/ │ │ │ │ ├── 0001_init.sql │ │ │ │ └── __init__.py │ │ │ ├── executor_lease.py │ │ │ ├── idle_release.py │ │ │ ├── journal/ │ │ │ │ ├── __init__.py │ │ │ │ ├── crud.py │ │ │ │ ├── lifecycle.py │ │ │ │ └── task_journal.py │ │ │ └── runtime.py │ │ └── tests/ │ │ ├── conftest.py │ │ ├── fixtures/ │ │ │ ├── __init__.py │ │ │ ├── replica_server.py │ │ │ ├── runner.py │ │ │ ├── runner_common.py │ │ │ ├── sample_workflows/ │ │ │ │ ├── __init__.py │ │ │ │ ├── chained.py │ │ │ │ ├── concurrent_workers.py │ │ │ │ ├── counter.py │ │ │ │ ├── hitl.py │ │ │ │ ├── parallel.py │ │ │ │ ├── sequential_hitl.py │ │ │ │ ├── slow_fan_out_hitl.py │ │ │ │ ├── streaming_interrupt.py │ │ │ │ ├── streaming_stress.py │ │ │ │ └── three_step_hitl.py │ │ │ └── server_runner.py │ │ ├── test_dbos_cross_process.py │ │ ├── test_dbos_determinism_subprocess.py │ │ ├── test_dbos_idle_release.py │ │ ├── test_dbos_idle_release_e2e.py │ │ ├── test_dbos_runtime.py │ │ ├── test_dbos_server_postgres.py │ │ ├── test_executor_lease.py │ │ ├── test_journal_double_restart_hang.py │ │ ├── test_journal_orphan_determinism.py │ │ ├── test_lifecycle_lock.py │ │ └── test_task_journal.py │ ├── llama-agents-integration-tests/ │ │ ├── README.md │ │ ├── pyproject.toml │ │ ├── src/ │ │ │ └── llama_agents_integration_tests/ │ │ │ ├── __init__.py │ │ │ ├── fake_agent_data.py │ │ │ ├── helpers.py │ │ │ ├── postgres.py │ │ │ └── server_test_utils.py │ │ └── tests/ │ │ ├── conftest.py │ │ ├── test_agent_data_store.py │ │ ├── test_context_store.py │ │ ├── test_error_handling.py │ │ ├── test_event_streaming.py │ │ ├── test_human_in_the_loop.py │ │ ├── test_runtime_matrix.py │ │ ├── test_server_http_matrix.py │ │ ├── test_server_store_matrix.py │ │ └── test_state_store_matrix.py │ ├── llama-agents-server/ │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── pyproject.toml │ │ ├── src/ │ │ │ └── llama_agents/ │ │ │ └── server/ │ │ │ ├── __init__.py │ │ │ ├── __main__.py │ │ │ ├── _api.py │ │ │ ├── _keyed_lock.py │ │ │ ├── _lru_cache.py │ │ │ ├── _pool.py │ │ │ ├── _runtime/ │ │ │ │ ├── __init__.py │ │ │ │ ├── event_interceptor.py │ │ │ │ ├── idle_release_runtime.py │ │ │ │ ├── persistence_runtime.py │ │ │ │ └── server_runtime.py │ │ │ ├── _service.py │ │ │ ├── _store/ │ │ │ │ ├── __init__.py │ │ │ │ ├── abstract_workflow_store.py │ │ │ │ ├── agent_data_client.py │ │ │ │ ├── agent_data_state_store.py │ │ │ │ ├── agent_data_store.py │ │ │ │ ├── memory_workflow_store.py │ │ │ │ ├── migration_utils.py │ │ │ │ ├── postgres/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── migrate.py │ │ │ │ │ └── migrations/ │ │ │ │ │ ├── 0001_init.sql │ │ │ │ │ └── __init__.py │ │ │ │ ├── postgres_state_store.py │ │ │ │ ├── postgres_workflow_store.py │ │ │ │ └── sqlite/ │ │ │ │ ├── __init__.py │ │ │ │ ├── migrate.py │ │ │ │ ├── migrations/ │ │ │ │ │ ├── 0001_init.sql │ │ │ │ │ ├── 0002_extend_handlers.sql │ │ │ │ │ ├── 0003_add_idle_since.sql │ │ │ │ │ ├── 0004_add_ticks.sql │ │ │ │ │ └── __init__.py │ │ │ │ ├── sqlite_state_store.py │ │ │ │ └── sqlite_workflow_store.py │ │ │ ├── py.typed │ │ │ ├── server.py │ │ │ └── static/ │ │ │ └── index.html │ │ └── tests/ │ │ └── server/ │ │ ├── conftest.py │ │ ├── server_test_fixtures.py │ │ ├── test_agent_data_store.py │ │ ├── test_durable_runtime.py │ │ ├── test_error_handling.py │ │ ├── test_event_interceptor.py │ │ ├── test_handler_serialization.py │ │ ├── test_idle_release_live_http.py │ │ ├── test_keyed_lock.py │ │ ├── test_lru_cache.py │ │ ├── test_main.py │ │ ├── test_memory_workflow_store.py │ │ ├── test_migrations.py │ │ ├── test_openapi_schema.py │ │ ├── test_persistent_handler_serialization.py │ │ ├── test_pool.py │ │ ├── test_postgres_migrations.py │ │ ├── test_postgres_state_store.py │ │ ├── test_postgres_workflow_store.py │ │ ├── test_runtime_decorators.py │ │ ├── test_server.py │ │ ├── test_server_endpoints.py │ │ ├── test_server_live_http.py │ │ ├── test_server_runtime.py │ │ ├── test_sqlite_state_store.py │ │ ├── test_sqlite_workflow_store.py │ │ ├── test_sse_heartbeat.py │ │ ├── test_streaming_replay_memory.py │ │ ├── test_workflow_service.py │ │ └── test_workflow_store_events.py │ ├── llama-index-utils-workflow/ │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── pyproject.toml │ │ └── tests/ │ │ ├── conftest.py │ │ └── test_drawing.py │ ├── llama-index-workflows/ │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── pyproject.toml │ │ ├── src/ │ │ │ ├── llama_agents/ │ │ │ │ └── workflows/ │ │ │ │ └── __init__.py │ │ │ └── workflows/ │ │ │ ├── __init__.py │ │ │ ├── _event_summary.py │ │ │ ├── client/ │ │ │ │ └── __init__.py │ │ │ ├── context/ │ │ │ │ ├── __init__.py │ │ │ │ ├── context.py │ │ │ │ ├── context_types.py │ │ │ │ ├── external_context.py │ │ │ │ ├── internal_context.py │ │ │ │ ├── pre_context.py │ │ │ │ ├── py.typed │ │ │ │ ├── serializers.py │ │ │ │ ├── state_store.py │ │ │ │ └── utils.py │ │ │ ├── decorators.py │ │ │ ├── errors.py │ │ │ ├── events.py │ │ │ ├── handler.py │ │ │ ├── plugins/ │ │ │ │ ├── __init__.py │ │ │ │ ├── _context.py │ │ │ │ └── basic.py │ │ │ ├── protocol/ │ │ │ │ └── __init__.py │ │ │ ├── py.typed │ │ │ ├── representation/ │ │ │ │ ├── __init__.py │ │ │ │ ├── build.py │ │ │ │ ├── types.py │ │ │ │ └── validate.py │ │ │ ├── resource.py │ │ │ ├── retry_policy.py │ │ │ ├── runtime/ │ │ │ │ ├── control_loop.py │ │ │ │ ├── runtime_decorators.py │ │ │ │ ├── types/ │ │ │ │ │ ├── commands.py │ │ │ │ │ ├── internal_state.py │ │ │ │ │ ├── named_task.py │ │ │ │ │ ├── plugin.py │ │ │ │ │ ├── results.py │ │ │ │ │ ├── step_function.py │ │ │ │ │ └── ticks.py │ │ │ │ └── verbose.py │ │ │ ├── server/ │ │ │ │ ├── __init__.py │ │ │ │ └── sqlite/ │ │ │ │ └── __init__.py │ │ │ ├── testing/ │ │ │ │ ├── __init__.py │ │ │ │ └── runner.py │ │ │ ├── types.py │ │ │ ├── utils.py │ │ │ └── workflow.py │ │ └── tests/ │ │ ├── __init__.py │ │ ├── conftest.py │ │ ├── context/ │ │ │ ├── __init__.py │ │ │ ├── test_context.py │ │ │ ├── test_context_preservation.py │ │ │ ├── test_serializers.py │ │ │ └── test_utils.py │ │ ├── plugins/ │ │ │ └── __init__.py │ │ ├── runtime/ │ │ │ ├── __init__.py │ │ │ ├── conftest.py │ │ │ ├── test_control_loop.py │ │ │ ├── test_control_loop_transformations.py │ │ │ ├── test_named_task.py │ │ │ ├── test_runtime_lifecycle.py │ │ │ ├── test_state.py │ │ │ ├── test_tick_serialization.py │ │ │ └── test_workflow_set_and_tracking.py │ │ ├── test_annotation_resolution.py │ │ ├── test_catch_error.py │ │ ├── test_child_state_inheritance.py │ │ ├── test_decorator.py │ │ ├── test_event.py │ │ ├── test_event_summary.py │ │ ├── test_graph_validation.py │ │ ├── test_handler.py │ │ ├── test_llama_agents_alias.py │ │ ├── test_nanoid.py │ │ ├── test_representation_utils.py │ │ ├── test_resources.py │ │ ├── test_retry_policy.py │ │ ├── test_retry_tenacity_conformance.py │ │ ├── test_runtime_integration.py │ │ ├── test_spans.py │ │ ├── test_state_manager.py │ │ ├── test_streaming.py │ │ ├── test_testing_utils.py │ │ ├── test_utils.py │ │ ├── test_verbose_decorator.py │ │ ├── test_workflow.py │ │ ├── test_workflow_internal_events.py │ │ ├── test_workflow_naming.py │ │ ├── test_workflow_postponed_annotations.py │ │ └── test_workflow_typed_state.py │ └── llamactl/ │ ├── AGENTS.md │ ├── CHANGELOG.md │ ├── README.md │ ├── package.json │ ├── pyproject.toml │ ├── src/ │ │ ├── llama_agents/ │ │ │ └── cli/ │ │ │ ├── __init__.py │ │ │ ├── app.py │ │ │ ├── apply_yaml.py │ │ │ ├── auth/ │ │ │ │ └── client.py │ │ │ ├── client.py │ │ │ ├── commands/ │ │ │ │ ├── agentcore.py │ │ │ │ ├── aliased_group.py │ │ │ │ ├── auth.py │ │ │ │ ├── completion.py │ │ │ │ ├── config.py │ │ │ │ ├── deployment.py │ │ │ │ ├── dev.py │ │ │ │ ├── environments.py │ │ │ │ ├── init.py │ │ │ │ ├── organizations.py │ │ │ │ ├── pkg.py │ │ │ │ ├── projects.py │ │ │ │ └── serve.py │ │ │ ├── config/ │ │ │ │ ├── _config.py │ │ │ │ ├── _migrations.py │ │ │ │ ├── auth_service.py │ │ │ │ ├── env_service.py │ │ │ │ ├── migrations/ │ │ │ │ │ ├── 0001_init.sql │ │ │ │ │ ├── 0002_add_auth_fields.sql │ │ │ │ │ └── __init__.py │ │ │ │ └── schema.py │ │ │ ├── debug.py │ │ │ ├── display.py │ │ │ ├── env.py │ │ │ ├── env_settings.py │ │ │ ├── interactive.py │ │ │ ├── local_context.py │ │ │ ├── log_format.py │ │ │ ├── options.py │ │ │ ├── output.py │ │ │ ├── param_types.py │ │ │ ├── paths.py │ │ │ ├── pkg/ │ │ │ │ ├── __init__.py │ │ │ │ ├── defaults.py │ │ │ │ ├── options.py │ │ │ │ └── utils.py │ │ │ ├── py.typed │ │ │ ├── render.py │ │ │ ├── scaffold/ │ │ │ │ ├── .codex/ │ │ │ │ │ └── config.toml │ │ │ │ ├── .cursor/ │ │ │ │ │ └── mcp.json │ │ │ │ ├── .mcp.json │ │ │ │ └── AGENTS.md │ │ │ ├── styles.py │ │ │ ├── templates/ │ │ │ │ └── agentcore_entrypoint.py.template │ │ │ ├── templates.py │ │ │ ├── utils/ │ │ │ │ ├── capabilities.py │ │ │ │ ├── env_inject.py │ │ │ │ ├── git_push.py │ │ │ │ ├── redact.py │ │ │ │ ├── retry.py │ │ │ │ └── version.py │ │ │ └── yaml_template.py │ │ └── llama_deploy/ │ │ └── cli/ │ │ └── __init__.py │ └── tests/ │ ├── conftest.py │ ├── test_apply_yaml.py │ ├── test_auth_cli.py │ ├── test_auth_inject.py │ ├── test_auth_login.py │ ├── test_auth_validate.py │ ├── test_cli_imports.py │ ├── test_cli_options.py │ ├── test_client_ssl_integration.py │ ├── test_commands_core.py │ ├── test_completion_commands.py │ ├── test_config.py │ ├── test_config_cli.py │ ├── test_config_extras.py │ ├── test_deployment_update_refs.py │ ├── test_deployments_apply_cmd.py │ ├── test_deployments_editor_cmd.py │ ├── test_deployments_get_output.py │ ├── test_deployments_logs.py │ ├── test_deployments_template_cmd.py │ ├── test_deployments_update.py │ ├── test_dev_commands.py │ ├── test_display.py │ ├── test_env_and_auth_services.py │ ├── test_env_settings.py │ ├── test_environments_cli.py │ ├── test_git_push.py │ ├── test_init_command.py │ ├── test_interactive.py │ ├── test_local_context.py │ ├── test_log_format.py │ ├── test_migrations_concurrency.py │ ├── test_organizations_cli.py │ ├── test_param_types.py │ ├── test_pkg.py │ ├── test_projects_cli.py │ ├── test_redact.py │ ├── test_render.py │ ├── test_retry.py │ ├── test_serve_llama_cloud.py │ ├── test_serve_summary.py │ ├── test_serve_without_git.py │ ├── test_session_utils.py │ └── test_yaml_template.py ├── pnpm-workspace.yaml ├── pyproject.toml ├── scripts/ │ ├── process_manifests.py │ └── sync-docs-to-developer-hub.sh ├── src/ │ └── dev_cli/ │ ├── __init__.py │ ├── changesets.py │ ├── cli.py │ ├── commands/ │ │ ├── __init__.py │ │ ├── changesets_cmd.py │ │ ├── publish_cmd.py │ │ ├── pytest_cmd.py │ │ └── skills_cmd.py │ ├── gha.py │ ├── git_utils.py │ ├── index_html.py │ └── versioning.py └── tests/ └── dev_cli/ ├── conftest.py ├── test_changesets.py ├── test_cli_misc.py └── test_pytest_cmd.py ================================================ FILE CONTENTS ================================================ ================================================ FILE: .agents/skills/llamactl-qa/SKILL.md ================================================ --- name: llamactl-qa description: Plan and run a design-QA / "taste test" of llamactl changes against a real backend. Cooperatively builds a small matrix of cases worth eyeballing, runs them against a chosen backend (test environment by default, local kind+tilt for new API contract changes), and writes a design-review report to `thoughts/shared/qa/`. Use this for changes to `llamactl` commands, output formats, auth, or control-plane API contracts. For UI/template smoke tests, use `llamactl_browser_test` instead. --- # llamactl CLI QA A design QA, not an integration test. The goal is to put the actual rendered output in front of a human reviewer so they can judge whether the design is right — alignment, naming, key ordering, error wording, what's noisy, what's missing. The LLM's job is to set up well-chosen cases and call out what looks off; the human's job is to read the outputs and decide. Two halves. First, a planning pass that turns "I changed X" into a small, sign-off-able matrix of cases worth running. Second, an execution pass that runs them and writes a report whose body is mostly verbatim output plus design-review notes. Every row in the matrix is there because we agreed it covers a real risk or design question in the diff. ## Mode flags Parse these from the user's invocation before doing anything else: - `--auto`, `auto`, `fully auto`, `non-chatty`, or `-f` means run autonomously. Pick the backend, draft the matrix internally, execute it, write the report, and return only the report pointer plus any blocking issue. Do not ask for backend selection or matrix confirmation. - In auto mode, prefer the least risky backend that still exercises the changed surface. Use offline rows for parse/render/local-file behavior, local kind+tilt for new control-plane contracts, and a test environment for read-only checks or safe writes. **Never use production for mutating QA.** Switch to a test environment first. - Auto mode does not relax mutation rules. When creating deployments for QA (e.g., to test edit or delete flows), always create your own throwaway deployments rather than editing existing ones that might be important. Clean them up at the end of the run. ### What this is NOT - **Not an automated integration test.** No `jq has(...)` shape assertions, no `python -c "assert ..."`. If a row reads as "the command works", drop it; if it reads as "let's see the output and judge it", keep it. Real integration tests are a separate task (authoring real pytest cases against the API), not this one. - **Not exhaustive coverage.** 4–8 well-chosen rows. The point is taste, not a regression matrix. - **Not pass/fail.** The report's job is "here's what the surface actually looks like", not "all green". llamactl is churning right now (multi-slice rework: output modes, apply/delete, template/apply-loop). Treat this skill as a living reference. When a run teaches you something about llamactl that isn't in here, edit the skill before closing the task. See "Self-update" at the bottom. ## When to use - Changes to `llamactl` commands (new flags, new output modes, command splits, behavior changes). - Changes to control-plane API contracts that llamactl consumes. - Changes to auth / profile / project resolution. Skip when the change is fully covered by pytest, or when the failure mode is in the UI (use `llamactl_browser_test`). ## Pick a backend 1. **Test environment / test project.** Default for QA that creates or mutates deployments. Use a non-production environment or a dedicated test project so throwaway deployments don't pollute real workspaces. **Never run mutating QA commands against production.** When creating test deployments (to later edit/delete them as part of the QA), create them yourself rather than editing existing deployments that may be important. Pin every command with `--project ` so an active-profile slip can't write into the wrong project. 2. **Local kind + tilt.** When the change is a new API contract (new endpoint, new field, new behavior on the control plane) and you need to exercise it against a control plane that actually has the change. `uv run operator/dev.py up`. See `AGENTS.md` and `operator/AGENTS.md` for setup. Local mode runs with no auth: the `http://localhost:8011` env is preconfigured; switch to it with `llamactl environments use http://localhost:8011` (arg is the API URL, not a name) and a `default` profile is created automatically. No tokens, no `auth login`. Before drafting the matrix, list existing deployments with `kubectl get llamadeployments -A` — there's often something already in the cluster from prior work that you can target with `--project `, saving the cost of a fresh `deployments create`. 3. **Offline only.** For changes that only affect local rendering (template output, help text, error formatting), no backend is needed at all. Run commands that don't hit the API (e.g., `deployments template`, `--help`, non-interactive error paths). Ask the user which backend before drafting the matrix. The answer changes which rows are realistic. Skip this in auto mode and choose from the rules above. ## Test project scaffolds Some QA needs a real on-disk project (anything that reads `cwd` — e.g., `deployments template`, `serve`, `apply -f` once it lands, anything that consults `pyproject.toml`'s `[tool.llamadeploy]` block, the `.env`, or git state). Use `llamactl init` into a temp dir rather than hand-rolling files or reusing your dev tree. ```bash WORK=$(mktemp -d -t llamactl-qa.XXXXXX) uv run llamactl init --no-interactive --template basic --dir "$WORK/app" ``` What you get: - A scaffolded project with `pyproject.toml` ([tool.llamadeploy] block), `.env.template`, `src/`, `tests/`. - An initial git commit (`init` runs `git init` + commit). `is_git_repo` is true; `git_ref` is `main`; no remote. - No `.env` (only `.env.template`). Copy/edit if a row needs `available_secrets` populated: `cp "$WORK/app/.env.template" "$WORK/app/.env"` then append e.g. `OPENAI_API_KEY=test`. - Available templates: `basic-ui`, `showcase`, `document-qa`, `extraction-review`, `classify-extract-sec`, `extract-reconcile-invoice`, `basic`, `document_parsing`, `human_in_the_loop`, `invoice_extraction`, `rag`, `web_scraping`. `basic` is fastest and has no required secrets — use it unless the row needs a template that lists required secrets. For rows that need a non-git directory: `mktemp -d` and don't init. For rows that need a remote: `git -C "$WORK/app" remote add origin https://github.com//qa.git`. Don't push. Run commands from inside the project: `(cd "$WORK/app" && llamactl deployments template)`. Don't `cd` in the parent shell — keeps rows independent. Capture full paths in the report so the reader can recreate. Cleanup is `rm -rf "$WORK"` at the end of the run. Mention it in the report's footer. If a row needs to **commit** changes (e.g., to test git-state-dependent behavior), do it inside the temp tree with a fresh `user.email` / `user.name` so the host's git config doesn't bleed in: ```bash git -C "$WORK/app" -c user.email=qa@example.com -c user.name=qa commit -am "" ``` Don't try to make this temp project deployable to a real backend in the same run as offline QA. If a row needs a server-side deployment to edit or inspect, create a throwaway deployment yourself (e.g., `create -f` with a minimal YAML + `--no-push`) rather than editing an existing deployment that might be important. Clean it up with `deployments delete` at the end of the run. ## llamactl mental model The bits that matter when designing a matrix. **Scoping hierarchy**: environments → profiles → organizations → projects → deployments. An environment is a control-plane URL (e.g., `http://localhost:8011` for local). Each environment can have one or more profiles (authenticated identities). Each profile has an active organization, and each organization contains projects. Deployments live inside projects. `llamactl environments get` shows environments. `llamactl auth get` shows profiles in the active environment. `llamactl environments use ` changes environment. `llamactl projects use [id]` changes the active project within the current profile. A profile is `(env, oauth tokens, active org, active project)`. `--project ` overrides the profile's active project for one call. Before running any QA, check `llamactl environments get` and `llamactl auth get` to confirm you're in the right environment and project — don't assume from a previous session. There are multiple environments with deployments available for testing; use a non-production one for mutating operations. Read commands accept `-o text|json|yaml`. Text is human-facing; json/yaml are assertable. Prefer json for QA — exact-match assertions catch field-rename regressions text formatting hides. Read commands (`deployments get/list/history/logs`, `auth get`, `environments get`) do not need `--no-interactive` when their argument is supplied. The flag is a no-op there post-Slice-A.5 and slated to be removed in the parent plan's Phase 3. Don't pad commands with it. Write/select commands (`deployments delete`, `deployments edit`, `deployments rollback` without `--git-sha`) still branch on the interactive flag — pass `--no-interactive` for those if you don't want a prompt, or supply every required arg. The command surface is moving. Run `--help` on any command you're testing before assuming flag names; don't go from memory. ## Cooperative planning Don't run anything until the user has signed off on the matrix. Skip confirmation in auto mode. 1. Read the diff. `git diff ...HEAD --stat` and targeted reads on the command files. Identify the behavior surface: which subcommands, flags, output formats, endpoints changed. 2. List design questions, not features. One line each. The right question reads as "would the user be happy seeing this output?", not "does the command run". Examples: "Does the `spec:` / `status:` split actually feel right when you eyeball `get -o yaml`?" "Does the plain-table list output stay readable for a deployment whose repo URL is 80 chars?" "Does the no-secrets case render as cleanly as the with-secrets case?" 3. Map questions to a small matrix. One row per case. 4–8 rows is usually right; 12 means you're testing features. 4. Present the matrix inline. Wait for the user to keep, cut, or add rows. In auto mode, keep this matrix internal and run it. Matrix row format. Note "Look for" replaces a pass-fail "Expect" — the reviewer is meant to read the output and judge against these prompts, not check a list of facts. | # | Command | Backend | Look for | Covers | |---|---|---|---|---| | 1 | `deployments get my-app -o yaml --project ` | test-env | spec/status split reads cleanly; field ordering; null vs omitted; PAT presentation | new display model shape | | 2 | `deployments get --project ` | test-env | column choices, alignment, behavior with long repo URLs | plain-table list mode | | 3 | `deployments get my-app --project ` vs default | test-env | does the override actually retarget the project | `--project` override | If a row's "Look for" reads as "the command works", drop it. If it reads as "I'd want to eyeball this", keep it. ## Execution Run rows top to bottom. For each, the goal is to capture the actual output the human reviewer will judge. Capture: - The exact command (including inline env vars). - Exit code and elapsed time (latency is part of UX). - **Verbatim stdout and stderr.** Don't trim, don't summarize, don't paraphrase. The report's body is the output, not your verdict on it. Truncation only when output is genuinely huge (200+ line log dumps); keep head, tail, and a `... lines elided ...` marker. - Your design-review observations as one-line "Notes" — what a thoughtful reviewer would point at. "REPO column is 67 chars wide on a 100-char terminal — leaves no room for two repos to align." "`status.warning: null` reads cleanly; the omitted vs explicit-null asymmetry is visible." "Why are both `display_name` and `name` here when they're equal?" What NOT to do: - **No `jq has(...)` / `python -c "assert ..."` style assertions.** The report is for human judgment, not pass/fail. If you find yourself asserting a key exists, you're in the wrong skill — that's pytest territory. - **Don't pre-judge.** Notes flag things to look at; the reader judges. "Suspicious: `personal_access_token` shown as `********` even when the underlying secret name is also `GITHUB_PAT`" is fine. "Wrong: PAT should be unmasked" is not — that's the reader's call. - **Don't paper over surprises.** If a row produces a stack trace or an unexpected shape, capture it verbatim and call it out in Highlights. Re-running with different flags to make the symptom go away is forbidden; that's the QA finding. For comparison rows (`--project` override, `list` vs `get`, text vs json, with-data vs empty), capture both calls in the same row, side by side. The reader should be able to eyeball the difference without scrolling. Long-running commands (`serve`, `logs --follow`) go in the background with `run_in_background: true`. Stop them before moving on. ### Storing raw transcripts Don't dump `.log` / `.out` / `.err` files into `thoughts/shared/qa/`. The report is the artifact. Embed verbatim outputs in the report with fenced blocks. If a single output is genuinely too large to embed (200+ lines of logs, many-deployment dumps), put it in `thoughts/shared/qa/raw/-/.txt` and link it from the report row. Default to embedding; the subdir is the exception, not the rule. ## Report The report is a design and interaction review surface, not a test result. The reader scrolls through it and forms their own opinion: are columns aligned, is naming consistent, does this command feel right, is the error message clear. Your job is to put the evidence in front of them and flag the design questions worth their attention. Write to `thoughts/shared/qa/-llamactl-.md`. Post a one-or-two-sentence pointer inline plus the file link. The user reads the file, not your inline summary. Template: ```` # llamactl QA: Backend: Profile: () Project: Branch: Commit: ## Design questions for the reviewer <3–6 bullets. These are the things you want the reader's eyes on. Not "all rows passed". Examples: - "Is `spec:` + `status:` the right split, or is the extra indent annoying?" - "REPO column gets pushed off-screen when the URL isn't a github short. Do we want a `--wide` mode or terminal-aware wrapping?" - "`auth get` text mode shows ACTIVE as yes/no — is that legible enough?" - "When secrets are unset, the JSON spec block is just `{display_name, repo_url, deployment_file_path, suspended: false}`. Is `suspended: false` worth showing on a fresh deploy or is it noise?" Lean open-ended. If a question has an obvious answer, it doesn't belong here.> ## Rows ### 1. Command: ``` $ ``` Output (exit=, ): ``` ``` Stderr: ``` ``` Notes: - - ### 2. Command A: ``` $ ``` Output A (exit=): ``` ``` Command B: ``` $ ``` Output B (exit=): ``` ``` Notes: - ... same shape for remaining rows ... ## Followups - - - ```` Rules: - **Show, don't tell.** "Output shows a spec block with editable fields" → no. Paste the YAML. The reader can see the shape. - **Keep verbatim formatting.** Tables in fenced blocks preserve column rendering. Don't reformat or "clean up" output. - **Comparison rows live in one section.** Two adjacent fenced blocks labeled clearly beat two separate rows. - **Notes are observations, not verdicts.** Point at what's interesting; let the reader judge. - **No celebration.** If everything looks reasonable, the report just looks reasonable. Don't add "all green" framing. The inline chat reply is one or two sentences pointing at the file. Don't restate the report. ## Common gotchas - Stale profile. `llamactl auth get` first, every session. A profile pointing at last week's env produces 401s that look like a code bug. - Active project drift. A test that "works on my machine" can fail elsewhere because the active project differs. Pin every row with `--project`. - Non-test project mutation. If you mutate without `--project`, the active profile decides where it lands. Always pin write commands. - Wrong environment for mutations. `llamactl environments get` shows which environment is active. Never run create/edit/delete against production — switch to a test environment first. The active environment persists across sessions, so always verify before running mutating commands. - Editing existing deployments. Don't edit deployments you didn't create — they may be someone's real work. Create throwaway deployments for QA and delete them when done. - TUI/prompt risk on write commands. `deployments delete/edit/rollback` and `create` will prompt when interactive. For QA, supply every required arg or pass `--no-interactive`. Read commands (`get`, `logs`, `history`, `auth get`, `environments get`) don't need the flag. - `tee` ate a row of a multi-line table once during a run. Use shell `>` redirect for QA captures, not `tee`, when you need every line preserved. - `serve` vs tilt. `llamactl serve` runs the appserver locally with no kubernetes. Tilt runs the full cloud stack in kind. Different scopes; pick one. - Don't leak IDs. Deployment and org IDs are fine in your terminal and in `thoughts/`, not fine in a public PR description. Strip or alias them in anything that might leave the repo. - Worktree venv mismatch. When QAing a worktree branch, the parent shell's `VIRTUAL_ENV` often points at the main repo's `.venv` (the worktree-specific one shadows it). `uv run` then warns and ignores the worktree env, silently using a stale binary. Either `unset VIRTUAL_ENV` once at the top of your session, or invoke the worktree's binary directly (`.venv/bin/llamactl`) for QA captures. The worktree binary is the one with the diff under test. ## Self-update llamactl's command surface is moving. When a run teaches you a fact this skill doesn't have, edit it. Triggers for an edit: - A flag name, command path, or output shape was different from what the skill implied. - A failure mode showed up that isn't in "Common gotchas". - A backend setup step (especially local tilt) needed something the skill didn't say. What to add: - New gotchas go to "Common gotchas" as one-line entries. - New mental-model facts go to "llamactl mental model". - Tilt or backend changes go to "Pick a backend". Edit the file at `.agents/skills/llamactl-qa/SKILL.md` (the `.claude/skills/` entry is a symlink into here, maintained by `uv run dev sync-skills`). Keep the voice terse; don't pad. If you're unsure whether the fact is durable or just incidental to one run, leave it out. False additions are worse than missing ones. ================================================ FILE: .changeset/README.md ================================================ # Changesets Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works with multi-package repos, or single-package repos to help you version and publish your code. You can find the full documentation for it [in our repository](https://github.com/changesets/changesets) We have a quick list of common questions to get you started engaging with this project in [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) ================================================ FILE: .changeset/config.json ================================================ { "$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json", "changelog": "@changesets/cli/changelog", "commit": false, "fixed": [], "linked": [], "access": "restricted", "baseBranch": "main", "updateInternalDependencies": "patch" } ================================================ FILE: .dockerignore ================================================ .git .venv __pycache__ node_modules .mypy_cache .pytest_cache .ruff_cache *.egg-info docs .claude .worktree thoughts architecture-docs examples/dbos examples/observability lib openapi.json *.ipynb **/.mypy_cache ================================================ FILE: .gitattributes ================================================ * text=auto eol=lf ================================================ FILE: .github/actions/pr-fix-comment/action.yml ================================================ # SPDX-License-Identifier: MIT name: "Auto-Fix PR Manager" description: "Creates fix PRs and manages PR comments for auto-fix workflows" inputs: app-id: description: "GitHub App ID for authentication" required: false default: "" private-key: description: "GitHub App private key for authentication" required: false default: "" add-paths: description: "Paths to add to the fix PR (newline-separated)" required: true check-name: description: "Human-readable name for the check (e.g., 'Frontend Lint', 'Backend Lint', 'Frontend SDK')" required: true fix-command: description: "Command to run to fix issues (shown in comment, e.g., 'pnpm lint:fix')" required: true fix-branch-name: description: "Branch name for the fix PR. Defaults to 'chore/fix-{check-name-slug}-{pr-number}'" required: false commit-message: description: "Commit message for the fix PR. Defaults to 'chore: auto-fix {check-name} issues'" required: false pr-title: description: "Title for the fix PR. Defaults to 'chore: fix {check-name} for #{pr-number}'" required: false pr-body: description: "Body for the fix PR (markdown). Auto-generated if not provided." required: false comment-marker: description: "Unique marker ID to identify comments. Defaults to slugified check-name." required: false warning-title: description: "Title for the warning comment. Defaults to '{check-name} Fix Required'" required: false warning-body: description: "Body text for the warning comment. Auto-generated if not provided." required: false success-title: description: "Title for the success comment. Defaults to '{check-name} Check Passed'" required: false success-body: description: "Body text for the success comment. Auto-generated if not provided." required: false outputs: fix-pr-number: description: "PR number of the fix PR (if created)" value: ${{ steps.create-pr.outputs.pull-request-number }} fix-pr-url: description: "URL of the fix PR (if created)" value: ${{ steps.create-pr.outputs.pull-request-url }} comment-id: description: "ID of the comment that was created or updated" value: ${{ steps.find-comment.outputs.comment_id }} action-taken: description: "What action was taken: 'created', 'updated-warning', 'updated-success', or 'none'" value: ${{ steps.manage-comment.outputs.action_taken }} runs: using: "composite" steps: - name: Check if PR context id: context shell: bash run: | if [ -n "${{ github.event.pull_request.number }}" ]; then echo "is_pr=true" >> $GITHUB_OUTPUT else echo "is_pr=false" >> $GITHUB_OUTPUT echo "Not a PR context - skipping fix PR creation" fi - name: Check authentication inputs id: auth-check if: steps.context.outputs.is_pr == 'true' shell: bash env: APP_ID: ${{ inputs.app-id }} PRIVATE_KEY: ${{ inputs.private-key }} run: | if [ -n "$APP_ID" ] && [ -n "$PRIVATE_KEY" ]; then echo "has_auth=true" >> $GITHUB_OUTPUT else echo "has_auth=false" >> $GITHUB_OUTPUT echo "Skipping auto-fix: authentication inputs not provided (likely a fork PR)" fi - name: Generate GitHub App token id: app-token if: steps.context.outputs.is_pr == 'true' && steps.auth-check.outputs.has_auth == 'true' uses: actions/create-github-app-token@v1 with: app-id: ${{ inputs.app-id }} private-key: ${{ inputs.private-key }} owner: ${{ github.repository_owner }} - name: Compute defaults id: defaults if: steps.context.outputs.is_pr == 'true' && steps.auth-check.outputs.has_auth == 'true' shell: bash env: CHECK_NAME: ${{ inputs.check-name }} FIX_COMMAND: ${{ inputs.fix-command }} PR_NUMBER: ${{ github.event.pull_request.number }} ADD_PATHS: ${{ inputs.add-paths }} INPUT_FIX_BRANCH: ${{ inputs.fix-branch-name }} INPUT_COMMIT_MSG: ${{ inputs.commit-message }} INPUT_PR_TITLE: ${{ inputs.pr-title }} INPUT_PR_BODY: ${{ inputs.pr-body }} INPUT_COMMENT_MARKER: ${{ inputs.comment-marker }} INPUT_WARNING_TITLE: ${{ inputs.warning-title }} INPUT_WARNING_BODY: ${{ inputs.warning-body }} INPUT_SUCCESS_TITLE: ${{ inputs.success-title }} INPUT_SUCCESS_BODY: ${{ inputs.success-body }} run: | # Create a slug from the check name (e.g., "Frontend Lint" -> "frontend-lint") CHECK_SLUG=$(echo "$CHECK_NAME" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-//' | sed 's/-$//') # Set defaults FIX_BRANCH="${INPUT_FIX_BRANCH:-chore/fix-${CHECK_SLUG}-${PR_NUMBER}}" COMMIT_MSG="${INPUT_COMMIT_MSG:-chore: auto-fix ${CHECK_NAME} issues}" PR_TITLE="${INPUT_PR_TITLE:-chore: fix ${CHECK_NAME} for #${PR_NUMBER}}" COMMENT_MARKER="${INPUT_COMMENT_MARKER:-${CHECK_SLUG}}" WARNING_TITLE="${INPUT_WARNING_TITLE:-${CHECK_NAME} Fix Required}" SUCCESS_TITLE="${INPUT_SUCCESS_TITLE:-${CHECK_NAME} Check Passed}" SUCCESS_BODY="${INPUT_SUCCESS_BODY:-All ${CHECK_NAME} checks passed.}" WARNING_BODY="${INPUT_WARNING_BODY:-Issues were detected that can be auto-fixed. **To fix locally:** Run \`${FIX_COMMAND}\` before committing.}" # Generate PR body if not provided if [ -z "$INPUT_PR_BODY" ]; then PR_BODY="## Summary Auto-fix ${CHECK_NAME} issues. This PR was automatically created because issues were detected that can be auto-fixed. ## Changed files - \`${ADD_PATHS}\` ## How to avoid this Run \`${FIX_COMMAND}\` before committing. --- *Auto-generated for #${PR_NUMBER}*" else PR_BODY="$INPUT_PR_BODY" fi # Write outputs using heredocs for multiline content { echo "fix-branch=${FIX_BRANCH}" echo "commit-message=${COMMIT_MSG}" echo "pr-title=${PR_TITLE}" echo "comment-marker=${COMMENT_MARKER}" echo "warning-title=${WARNING_TITLE}" echo "success-title=${SUCCESS_TITLE}" } >> $GITHUB_OUTPUT # Use heredocs for multiline outputs { echo "pr-body<> $GITHUB_OUTPUT { echo "warning-body<> $GITHUB_OUTPUT { echo "success-body<> $GITHUB_OUTPUT - name: Create PR with changes id: create-pr if: steps.context.outputs.is_pr == 'true' && steps.auth-check.outputs.has_auth == 'true' uses: peter-evans/create-pull-request@v6 with: token: ${{ steps.app-token.outputs.token }} commit-message: ${{ steps.defaults.outputs.commit-message }} title: ${{ steps.defaults.outputs.pr-title }} body: ${{ steps.defaults.outputs.pr-body }} branch: ${{ steps.defaults.outputs.fix-branch }} base: ${{ github.head_ref }} add-paths: ${{ inputs.add-paths }} labels: | chore automated pr delete-branch: true - name: Find existing bot comment id: find-comment if: steps.context.outputs.is_pr == 'true' && steps.auth-check.outputs.has_auth == 'true' shell: bash env: GH_TOKEN: ${{ steps.app-token.outputs.token }} PR_NUMBER: ${{ github.event.pull_request.number }} COMMENT_MARKER: ${{ steps.defaults.outputs.comment-marker }} run: | # Use a unique HTML comment marker to identify our comments # This is much more reliable than searching for text content MARKER="" # Find existing comment by searching for the exact marker COMMENT_ID=$(gh api "repos/${{ github.repository }}/issues/${PR_NUMBER}/comments" \ --jq ".[] | select(.body | startswith(\"${MARKER}\")) | .id" | head -1) echo "comment_id=$COMMENT_ID" >> $GITHUB_OUTPUT echo "marker=$MARKER" >> $GITHUB_OUTPUT - name: Close fix PR if no longer needed if: steps.context.outputs.is_pr == 'true' && steps.auth-check.outputs.has_auth == 'true' && !steps.create-pr.outputs.pull-request-number shell: bash env: GH_TOKEN: ${{ steps.app-token.outputs.token }} FIX_PR_BRANCH: ${{ steps.defaults.outputs.fix-branch }} run: | FIX_PR=$(gh pr list --head "${FIX_PR_BRANCH}" --json number --jq '.[0].number') if [ -n "$FIX_PR" ]; then echo "Closing fix PR #$FIX_PR as changes are no longer needed" gh pr close "$FIX_PR" --delete-branch --comment "Closing this PR as the issue is now resolved in the original PR." fi - name: Manage PR comment id: manage-comment if: steps.context.outputs.is_pr == 'true' && steps.auth-check.outputs.has_auth == 'true' shell: bash env: GH_TOKEN: ${{ steps.app-token.outputs.token }} PR_NUMBER: ${{ github.event.pull_request.number }} EXISTING_COMMENT_ID: ${{ steps.find-comment.outputs.comment_id }} COMMENT_MARKER: ${{ steps.find-comment.outputs.marker }} FIX_PR_CREATED: ${{ steps.create-pr.outputs.pull-request-number != '' }} FIX_PR_URL: ${{ steps.create-pr.outputs.pull-request-url }} WARNING_TITLE: ${{ steps.defaults.outputs.warning-title }} WARNING_BODY: ${{ steps.defaults.outputs.warning-body }} SUCCESS_TITLE: ${{ steps.defaults.outputs.success-title }} SUCCESS_BODY: ${{ steps.defaults.outputs.success-body }} run: | if [ "$FIX_PR_CREATED" = "true" ]; then # Fix PR was created - post or update warning comment COMMENT_BODY="${COMMENT_MARKER} ⚠️ **${WARNING_TITLE}** ${WARNING_BODY} **Action needed:** Merge this PR into your branch: ${FIX_PR_URL}" if [ -n "$EXISTING_COMMENT_ID" ]; then echo "Updating existing comment $EXISTING_COMMENT_ID with warning" gh api "repos/${{ github.repository }}/issues/comments/${EXISTING_COMMENT_ID}" \ -X PATCH -f body="$COMMENT_BODY" echo "action_taken=updated-warning" >> $GITHUB_OUTPUT else echo "Creating new warning comment" gh pr comment "$PR_NUMBER" --body "$COMMENT_BODY" echo "action_taken=created" >> $GITHUB_OUTPUT fi else # No fix PR needed - update existing comment to success (if exists) if [ -n "$EXISTING_COMMENT_ID" ]; then echo "Updating comment to indicate issue is resolved" COMMENT_BODY="${COMMENT_MARKER} ✅ **${SUCCESS_TITLE}** ${SUCCESS_BODY}" gh api "repos/${{ github.repository }}/issues/comments/${EXISTING_COMMENT_ID}" \ -X PATCH -f body="$COMMENT_BODY" echo "action_taken=updated-success" >> $GITHUB_OUTPUT else echo "No action needed - no existing comment and check passed" echo "action_taken=none" >> $GITHUB_OUTPUT fi fi - name: Fail if changes were needed if: steps.context.outputs.is_pr == 'true' && steps.auth-check.outputs.has_auth == 'true' && steps.create-pr.outputs.pull-request-number shell: bash env: FIX_PR_URL: ${{ steps.create-pr.outputs.pull-request-url }} WARNING_TITLE: ${{ steps.defaults.outputs.warning-title }} run: | echo "::error::${WARNING_TITLE}. Please merge the auto-generated PR: ${FIX_PR_URL}" exit 1 ================================================ FILE: .github/actions/setup-publish/action.yml ================================================ name: Setup publish job description: Install Python + uv and download the publish plan artifact. Assumes the repo is already checked out. runs: using: composite steps: - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6 with: python-version: "3.11" - uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7 - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 with: name: publish-plan ================================================ FILE: .github/workflows/bump_llama_index_core.yml ================================================ name: Bump llama-index-core on: repository_dispatch: types: [llama-index-core-release] workflow_dispatch: jobs: bump-dependency: if: github.repository == 'run-llama/llama-agents' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: astral-sh/setup-uv@v6 - run: uv lock --upgrade-package llama-index-core - name: Generate GitHub App token id: app-token uses: actions/create-github-app-token@v1 with: app-id: ${{ secrets.CI_BOT_APP_ID }} private-key: ${{ secrets.CI_BOT_PRIVATE_KEY }} - name: Create Pull Request uses: peter-evans/create-pull-request@v6 with: token: ${{ steps.app-token.outputs.token }} commit-message: "chore: bump llama-index-core" branch: bump-llama-index-core delete-branch: true title: "chore: bump llama-index-core" labels: | dependencies automated ================================================ FILE: .github/workflows/chart-validate.yaml ================================================ name: chart-validate on: push: branches: [main, develop] pull_request: branches: [main, develop] paths: - "charts/llama-agents/**" - ".github/workflows/chart-validate.yaml" workflow_dispatch: {} jobs: validate: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Helm uses: azure/setup-helm@v4 - name: Install helm-unittest plugin run: make -C operator helm-unittest-install - name: Create kind cluster uses: helm/kind-action@v1 - name: Install Prometheus Operator CRDs (for ServiceMonitor validation) run: make -C operator helm-crds-prom-operator - name: Install helm-docs run: | make -C operator helm-docs-install echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH" - name: Verify README is up to date run: make -C operator helm-docs-check - name: Helm lint (default values) run: make -C operator helm-lint - name: Helm lint (dev values) run: make -C operator helm-lint-dev - name: Server-side dry-run apply (default values) run: make -C operator helm-dry-run - name: Server-side dry-run apply (dev values) run: make -C operator helm-dry-run-dev - name: Helm unit tests (if present) run: | if [ -d charts/llama-agents/tests ]; then make -C operator helm-unittest else echo "No helm-unittest tests found; skipping." fi ================================================ FILE: .github/workflows/go-ci.yml ================================================ name: CI on: push: branches: [main, develop] pull_request: branches: [main, develop] paths: - "operator/**" - "docker/operator.Dockerfile" - "scripts/process_manifests.py" jobs: operator-lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Setup Go uses: actions/setup-go@v5 with: go-version: "1.24" cache-dependency-path: ./operator/go.sum - name: golangci-lint uses: golangci/golangci-lint-action@v8 with: version: v2.1 working-directory: ./operator - name: Install uv uses: astral-sh/setup-uv@v6 - name: Verify generated manifests are up to date run: make -C operator operator-manifests-check - name: Clean controller-gen cache run: rm -rf ./operator/bin/controller-gen - name: Run Go tests run: make -C operator operator-test env: GOOS: linux GOARCH: amd64 operator-build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Build operator image (no push) uses: docker/build-push-action@v5 with: context: . file: docker/operator.Dockerfile platforms: linux/amd64 push: false tags: llamaindex/llama-agents-operator:dev cache-from: type=gha,scope=operator-amd64 cache-to: type=gha,mode=min,scope=operator-amd64 ================================================ FILE: .github/workflows/lint.yml ================================================ name: Linting on: push: branches: - main pull_request: jobs: lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Install uv uses: astral-sh/setup-uv@v6 - name: Install dev dependencies run: uv sync --all-extras --all-packages - name: Run pre-commit id: pre-commit continue-on-error: true run: uv run pre-commit run -a - name: Auto-fix PR if needed uses: ./.github/actions/pr-fix-comment with: app-id: ${{ secrets.CI_BOT_APP_ID }} private-key: ${{ secrets.CI_BOT_PRIVATE_KEY }} add-paths: "." check-name: "Lint" fix-command: "uv run pre-commit run -a" - name: Fail if pre-commit failed if: steps.pre-commit.outcome == 'failure' run: exit 1 ================================================ FILE: .github/workflows/lockfile.yml ================================================ name: Lockfile on: push: branches: - main paths: - "**/package.json" - "pnpm-lock.yaml" pull_request: paths: - "**/package.json" - "pnpm-lock.yaml" jobs: check: name: Validate lockfile runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - uses: pnpm/action-setup@v4 - name: Setup Node.js uses: actions/setup-node@v5 with: node-version: "22" - name: Check lockfile is up to date run: pnpm install --frozen-lockfile ================================================ FILE: .github/workflows/publish_changesets.yml ================================================ name: Version Bump and Release on: push: branches: - main - dev concurrency: ${{ github.workflow }}-${{ github.ref }} permissions: contents: write id-token: write packages: write jobs: # --------------------------------------------------------------------------- # Release PR management + publish planning. # # 1. Runs changesets/action to open/update the "version packages" release PR # when there are pending changesets. When that PR merges into main/dev, # the changesets folder is empty on the next push and this step is a # no-op — then we proceed to plan & publish. # 2. Runs `dev changeset-plan` unconditionally. The plan is a reconcile # loop: it diffs current workspace versions against what's already on # PyPI / Docker Hub / the Helm registry and emits actions for the gaps. # An empty plan is normal and results in all downstream jobs no-opping. # --------------------------------------------------------------------------- plan: name: Plan release runs-on: ubuntu-latest environment: release if: github.repository == 'run-llama/llama-agents' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev') outputs: has_work: ${{ steps.plan.outputs.has_work }} pypi: ${{ steps.plan.outputs.pypi }} docker_builds: ${{ steps.plan.outputs.docker_builds }} docker_manifests: ${{ steps.plan.outputs.docker_manifests }} helm: ${{ steps.plan.outputs.helm }} steps: - name: Checkout Repo uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 - uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 - name: Setup Node.js uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5 with: node-version: "22" cache: "pnpm" - name: Setup Python uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6 with: python-version: "3.11" - name: Install uv uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7 - name: Install dependencies run: pnpm install - name: Generate GitHub App token id: app-token uses: actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1 with: app-id: ${{ secrets.CI_BOT_APP_ID }} private-key: ${{ secrets.CI_BOT_PRIVATE_KEY }} - name: Install helm-docs run: | make -C operator helm-docs-install echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH" - name: Create / update Release Pull Request id: changesets uses: changesets/action@6a0a831ff30acef54f2c6aa1cbbc1096b066edaf # v1 with: commit: "chore: version packages" title: "chore: version packages" # Only manage the release PR here. Actual publishing is done by # the fan-out jobs below so docker builds run in parallel on # native amd64 / arm64 runners. version: pnpm -w run version setupGitUser: false commitMode: github-api env: GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} GH_TOKEN: ${{ steps.app-token.outputs.token }} # When there are pending changesets, the step above runs ``pnpm -w # run version`` to build the release PR. With ``commitMode: # github-api`` those edits are committed through the API and left # uncommitted in the local working tree. If we don't reset, the # plan step below scans the mutated tree, emits actions for the # *next* versions, and the downstream publish jobs (which do a # fresh checkout of the branch) then build artifacts for the # previous versions and fail to match the plan. Reset so the plan # reflects what is actually committed on the branch. - name: Reset working tree after changesets action run: git reset --hard HEAD - name: Compute publish plan id: plan run: uv run dev changeset-plan --output publish-plan.json - name: Upload publish plan uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 with: name: publish-plan path: publish-plan.json retention-days: 14 # --------------------------------------------------------------------------- # PyPI: one job per package so the Actions UI shows a checkmark per release. # --------------------------------------------------------------------------- pypi: name: "pypi: ${{ matrix.item.package }}" needs: plan if: needs.plan.outputs.pypi != '[]' runs-on: ubuntu-latest environment: release strategy: fail-fast: false matrix: item: ${{ fromJSON(needs.plan.outputs.pypi) }} steps: - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 - uses: ./.github/actions/setup-publish - run: uv run dev publish-action --plan publish-plan.json --id '${{ matrix.item.id }}' # --------------------------------------------------------------------------- # Docker builds: one job per (image, platform) so amd64 / arm64 build on # native runners in parallel — no QEMU emulation. The manifest job below # stitches the per-arch tags into the final multi-arch tags. # --------------------------------------------------------------------------- docker-build: name: "docker: ${{ matrix.item.package }} (${{ matrix.item.platform }})" needs: plan if: needs.plan.outputs.docker_builds != '[]' runs-on: ${{ matrix.item.platform == 'linux/arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }} environment: release strategy: fail-fast: false matrix: item: ${{ fromJSON(needs.plan.outputs.docker_builds) }} steps: - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 - uses: ./.github/actions/setup-publish - uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3 # Expose ACTIONS_RUNTIME_TOKEN / ACTIONS_CACHE_URL for buildx type=gha cache. - uses: crazy-max/ghaction-github-runtime@3cb05d89e1f492524af3d41a1c98c83bc3025124 # v3 - uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3 with: registry: docker.io username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - run: uv run dev publish-action --plan publish-plan.json --id '${{ matrix.item.id }}' docker-manifest: name: "docker-manifest: ${{ matrix.item.package }}" needs: [plan, docker-build] if: needs.plan.outputs.docker_manifests != '[]' runs-on: ubuntu-latest environment: release strategy: fail-fast: false matrix: item: ${{ fromJSON(needs.plan.outputs.docker_manifests) }} steps: - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 - uses: ./.github/actions/setup-publish - uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3 - uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3 with: registry: docker.io username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - run: uv run dev publish-action --plan publish-plan.json --id '${{ matrix.item.id }}' # --------------------------------------------------------------------------- # Helm: one job per chart. Depends on the manifest job because charts # reference the final image tags and must not be published before them. # --------------------------------------------------------------------------- helm: name: "helm: ${{ matrix.item.package }}" needs: [plan, docker-manifest] if: | always() && needs.plan.result == 'success' && (needs.docker-manifest.result == 'success' || needs.docker-manifest.result == 'skipped') && needs.plan.outputs.helm != '[]' runs-on: ubuntu-latest environment: release strategy: fail-fast: false matrix: item: ${{ fromJSON(needs.plan.outputs.helm) }} steps: - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 - uses: ./.github/actions/setup-publish - uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4 with: version: '3.18.1' - uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3 with: registry: docker.io username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - run: uv run dev publish-action --plan publish-plan.json --id '${{ matrix.item.id }}' # --------------------------------------------------------------------------- # Finalize: create git tags for everything we just published and fire # downstream repository dispatches. Runs only if all publish jobs # succeeded (or were legitimately skipped because there was no work). # --------------------------------------------------------------------------- finalize: name: Finalize release needs: [plan, pypi, docker-build, docker-manifest, helm] if: | always() && needs.plan.result == 'success' && needs.plan.outputs.has_work == 'true' && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') runs-on: ubuntu-latest environment: release steps: - name: Generate GitHub App token id: app-token uses: actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1 with: app-id: ${{ secrets.CI_BOT_APP_ID }} private-key: ${{ secrets.CI_BOT_PRIVATE_KEY }} - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 with: fetch-depth: 0 token: ${{ steps.app-token.outputs.token }} - uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5 with: node-version: "22" cache: "pnpm" # Install the workspace so ``pnpm exec changeset tag`` uses the # @changesets/cli version pinned by pnpm-lock.yaml, with every # transitive dep locked — ``npx``/``pnpm dlx`` would ignore the # lockfile and resolve fresh, which we don't want in the release # path. - run: pnpm install --frozen-lockfile - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 with: name: publish-plan # Use changesets/action in publish mode to (1) tag each package # at its current version, (2) push the tags, and (3) create a # GitHub Release per tag with the CHANGELOG entry as the body. # The ``publish`` script is a no-op beyond ``changeset tag`` — # the fan-out jobs above handle the actual PyPI / Docker / Helm # publishing. The action only parses ``New tag: ...`` lines from # the publish script output to decide which packages to release. - name: Create tags and GitHub releases uses: changesets/action@6a0a831ff30acef54f2c6aa1cbbc1096b066edaf # v1 with: publish: pnpm exec changeset tag setupGitUser: false commitMode: github-api createGithubReleases: true env: GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} GH_TOKEN: ${{ steps.app-token.outputs.token }} - name: Extract published llama-agents-server version if: github.ref == 'refs/heads/main' id: server-version run: | VERSION=$(jq -r '.pypi[] | select(.package == "llama-agents-server") | .version' publish-plan.json) if [ -n "$VERSION" ] && [ "$VERSION" != "null" ]; then echo "version=$VERSION" >> "$GITHUB_OUTPUT" echo "tag=llama-agents-server@v${VERSION}" >> "$GITHUB_OUTPUT" echo "Found llama-agents-server version: $VERSION" else echo "llama-agents-server was not published in this release" fi - name: Trigger OpenAPI publish for llama-agents-server if: github.ref == 'refs/heads/main' && steps.server-version.outputs.version != '' uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3 with: token: ${{ steps.app-token.outputs.token }} event-type: publish-openapi client-payload: '{"tag": "${{ steps.server-version.outputs.tag }}"}' # The default app-token above is scoped to this repo only, so it # can't dispatch to the downstream repo. Mint a second token # scoped to DOWNSTREAM_DISPATCH_REPO for the dispatch call. - name: Parse downstream dispatch repo id: dispatch-repo if: github.ref == 'refs/heads/main' && vars.DOWNSTREAM_DISPATCH_REPO != '' env: DISPATCH_REPO: ${{ vars.DOWNSTREAM_DISPATCH_REPO }} run: | echo "owner=${DISPATCH_REPO%%/*}" >> "$GITHUB_OUTPUT" echo "repo=${DISPATCH_REPO##*/}" >> "$GITHUB_OUTPUT" - name: Generate downstream dispatch token id: dispatch-token if: github.ref == 'refs/heads/main' && vars.DOWNSTREAM_DISPATCH_REPO != '' uses: actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1 with: app-id: ${{ secrets.CI_BOT_APP_ID }} private-key: ${{ secrets.CI_BOT_PRIVATE_KEY }} owner: ${{ steps.dispatch-repo.outputs.owner }} repositories: ${{ steps.dispatch-repo.outputs.repo }} - name: Trigger downstream version bump if: github.ref == 'refs/heads/main' && vars.DOWNSTREAM_DISPATCH_REPO != '' env: GH_TOKEN: ${{ steps.dispatch-token.outputs.token }} DISPATCH_REPO: ${{ vars.DOWNSTREAM_DISPATCH_REPO }} run: | PACKAGES=$(jq -c '[.pypi[] | {name: .package, version: .version}] + [.docker_manifests[] | {name: .image, version: .version}] + [.helm[] | {name: .package, version: .version}]' publish-plan.json) gh api "repos/$DISPATCH_REPO/dispatches" \ --input - <<< "{\"event_type\":\"bump-cloud-llama-deploy\",\"client_payload\":{\"packages\":$PACKAGES}}" ================================================ FILE: .github/workflows/publish_openapi.yml ================================================ name: Publish OpenAPI specification on: workflow_dispatch: inputs: tag: description: "Release tag to update (e.g. llama-agents-server@v0.1.1)" required: true type: string repository_dispatch: types: [publish-openapi] jobs: publish-openapi: if: github.repository == 'run-llama/llama-agents' runs-on: ubuntu-latest permissions: contents: write steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Install uv uses: astral-sh/setup-uv@v6 - name: Resolve target tag id: target run: | if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then TAG="${{ github.event.inputs.tag }}" else TAG="${{ github.event.client_payload.tag }}" fi echo "tag=${TAG}" >> "$GITHUB_OUTPUT" echo "TARGET_TAG=${TAG}" >> "$GITHUB_ENV" - name: Compute release metadata id: metadata run: > uv run dev compute-tag-metadata --tag "${{ env.TARGET_TAG }}" --output "$GITHUB_OUTPUT" - name: Sync dependencies and build OpenAPI spec working-directory: packages/llama-agents-server run: | uv sync uv run hatch run openapi - name: Upload OpenAPI to release uses: softprops/action-gh-release@v2 with: tag_name: ${{ env.TARGET_TAG }} files: packages/llama-agents-server/openapi.json fail_on_unmatched_files: true append_body: false - name: Generate GitHub App token id: app-token uses: actions/create-github-app-token@v1 with: app-id: ${{ secrets.CI_BOT_APP_ID }} private-key: ${{ secrets.CI_BOT_PRIVATE_KEY }} owner: run-llama - name: Trigger SDK update if: > steps.metadata.outputs.change_type != '' && steps.metadata.outputs.change_type != 'none' uses: peter-evans/repository-dispatch@v3 with: token: ${{ steps.app-token.outputs.token }} repository: run-llama/llama-ui event-type: workflows-sdk-update client-payload: >- {"version": "${{ steps.metadata.outputs.semver }}", "openapi_url": "https://github.com/run-llama/llama-agents/releases/download/${{ env.TARGET_TAG }}/openapi.json", "change_type": "${{ steps.metadata.outputs.change_type }}", "change_description": "${{ steps.metadata.outputs.change_description }}"} ================================================ FILE: .github/workflows/sync-docs.yml ================================================ name: Sync Docs to Developer Hub on: push: branches: [main] paths: - "docs/**" workflow_dispatch: jobs: sync-docs: if: github.repository == 'run-llama/llama-agents' runs-on: ubuntu-latest steps: - name: Checkout source repo uses: actions/checkout@v4 - name: Install uv uses: astral-sh/setup-uv@v4 - name: Checkout docs repo uses: actions/checkout@v4 with: repository: run-llama/developers token: ${{ secrets.DEVELOPER_HUB_TOKEN }} path: developer-hub - name: Sync docs run: ./scripts/sync-docs-to-developer-hub.sh developer-hub - name: Commit and push working-directory: developer-hub run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" git add src/content/docs/python/llamaagents/ api-reference/python/workflows/ if git diff --staged --quiet; then echo "No docs changes to sync." exit 0 fi SOURCE_SHA="${GITHUB_SHA::8}" git commit -m "sync: llama-agents docs from run-llama/llama-agents@${SOURCE_SHA}" git push ================================================ FILE: .github/workflows/test.yml ================================================ name: Unit Testing on: pull_request: push: branches: - main env: # Which Python from the matrix will be used to run the coverage check COV_PYTHON_VERSION: 3.14 jobs: test: runs-on: ubuntu-latest strategy: fail-fast: false matrix: python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] package: [ llama-index-workflows, llama-index-utils-workflow, llama-agents-integration-tests, llama-agents-dev, llama-agents-client, llama-agents-server, llama-agents-dbos, llama-agents-core, llama-agents-agentcore, llama-agents-appserver, llama-agents-control-plane, llamactl, ] exclude: # Dev CLI only needs to run on 3.14 - package: llama-agents-dev python-version: "3.10" - package: llama-agents-dev python-version: "3.11" - package: llama-agents-dev python-version: "3.12" - package: llama-agents-dev python-version: "3.13" include: - package: llama-index-workflows package_dir: packages/llama-index-workflows - package: llama-index-utils-workflow package_dir: packages/llama-index-utils-workflow - package: llama-agents-integration-tests package_dir: packages/llama-agents-integration-tests - package: llama-agents-dev package_dir: . - package: llama-agents-client package_dir: packages/llama-agents-client - package: llama-agents-server package_dir: packages/llama-agents-server - package: llama-agents-dbos package_dir: packages/llama-agents-dbos - package: llama-agents-core package_dir: packages/llama-agents-core - package: llama-agents-agentcore package_dir: packages/llama-agents-agentcore - package: llama-agents-appserver package_dir: packages/llama-agents-appserver - package: llama-agents-control-plane package_dir: packages/llama-agents-control-plane - package: llamactl package_dir: packages/llamactl steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Install uv and set the python version uses: astral-sh/setup-uv@v6 with: python-version: ${{ matrix.python-version }} enable-cache: true - name: Run tests if: matrix.python-version != env.COV_PYTHON_VERSION run: | uv sync --python ${{ matrix.python-version }} --all-extras --directory ${{ matrix.package_dir }} uv run --python ${{ matrix.python-version }} --all-extras --directory ${{ matrix.package_dir }} -- pytest - name: Run tests with coverage if: matrix.python-version == env.COV_PYTHON_VERSION run: uv run --all-extras --directory ${{ matrix.package_dir }} -- pytest --cov=src --cov-report=xml - name: Report Coveralls if: matrix.python-version == env.COV_PYTHON_VERSION continue-on-error: true uses: coverallsapp/github-action@v2 with: file: ${{ matrix.package_dir }}/coverage.xml flag-name: ${{ matrix.package }} parallel: true env: COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} test-docker: name: "test docker (3.14 - all packages)" runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Install uv and set the python version uses: astral-sh/setup-uv@v6 with: python-version: "3.14" enable-cache: true - name: Run Docker tests with coverage (append) # Use longer timeout for Docker tests since container startup can take 30-60s in CI run: uv run --all-extras --all-packages dev --timeout=120 -m docker --cov --cov-append --cov-report=xml - name: Report Coveralls continue-on-error: true uses: coverallsapp/github-action@v2 with: file: packages/llama-agents-integration-tests/coverage.xml flag-name: llama-agents-integration-tests parallel: true env: COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} coveralls-finish: needs: [test, test-docker] runs-on: ubuntu-latest if: github.repository == 'run-llama/llama-agents' steps: - name: Finalize Coveralls parallel jobs continue-on-error: true uses: coverallsapp/github-action@v2 with: parallel-finished: true env: COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} ================================================ FILE: .github/workflows/update_debugger_assets.yml ================================================ name: Update Debugger Assets on: repository_dispatch: types: [debugger-assets-update] workflow_dispatch: inputs: js_url: description: "JavaScript URL" required: true css_url: description: "CSS URL" required: true jobs: update-assets: if: github.repository == 'run-llama/llama-agents' runs-on: ubuntu-latest permissions: contents: write pull-requests: write steps: - name: Checkout repository uses: actions/checkout@v4 with: token: ${{ secrets.GITHUB_TOKEN }} - name: Install uv uses: astral-sh/setup-uv@v6 - name: Extract payload data id: payload run: | # Handle both repository_dispatch and workflow_dispatch if [ -n "${{ github.event.inputs.js_url }}" ]; then echo "js_url=${{ github.event.inputs.js_url }}" >> $GITHUB_OUTPUT echo "css_url=${{ github.event.inputs.css_url }}" >> $GITHUB_OUTPUT else echo "js_url=${{ github.event.client_payload.js_url }}" >> $GITHUB_OUTPUT echo "css_url=${{ github.event.client_payload.css_url }}" >> $GITHUB_OUTPUT fi - name: Update index.html run: > uv run dev update-index-html --js-url "${{ steps.payload.outputs.js_url }}" --css-url "${{ steps.payload.outputs.css_url }}" - name: Create changeset for patch version run: | # Use a deterministic filename so multiple updates accumulate into one changelog entry CHANGESET_FILE=".changeset/update-debugger-assets.md" cat > "$CHANGESET_FILE" << 'EOF' --- "llama-agents-server": patch --- Update debugger assets - JavaScript: ${{ steps.payload.outputs.js_url }} - CSS: ${{ steps.payload.outputs.css_url }} EOF echo "Created changeset: $CHANGESET_FILE" - name: Generate GitHub App token id: app-token uses: actions/create-github-app-token@v1 with: app-id: ${{ secrets.CI_BOT_APP_ID }} private-key: ${{ secrets.CI_BOT_PRIVATE_KEY }} - name: Create Pull Request uses: peter-evans/create-pull-request@v6 with: token: ${{ steps.app-token.outputs.token }} commit-message: "chore: update debugger assets" branch: update-debugger-assets delete-branch: true title: "Update debugger assets" body: | ## Update Debugger Assets This PR updates the workflow debugger assets and creates a changeset for a patch version bump. ### Changes - Updated `packages/llama-agents-server/src/llama_agents/server/static/index.html` - JavaScript: ${{ steps.payload.outputs.js_url }} - CSS: ${{ steps.payload.outputs.css_url }} --- *This PR was automatically created by the [update-debugger-assets workflow](https://github.com/${{ github.repository }}/actions/workflows/update_debugger_assets.yml)* labels: | dependencies automated ================================================ FILE: .gitignore ================================================ # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] *$py.class # C extensions *.so # Distribution / packaging .Python build/ develop-eggs/ dist/ downloads/ eggs/ .eggs/ lib/ lib64/ parts/ sdist/ var/ wheels/ share/python-wheels/ *.egg-info/ .installed.cfg *.egg MANIFEST .python-version *.sqlite *.sqlite3 # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest *.spec # Installer logs pip-log.txt pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ .nox/ .coverage .coverage.* .cache nosetests.xml coverage.xml *.cover *.py,cover .hypothesis/ .pytest_cache/ cover/ # Translations *.mo *.pot # Django stuff: *.log local_settings.py db.sqlite3 db.sqlite3-journal # Flask stuff: instance/ .webassets-cache # Scrapy stuff: .scrapy # Sphinx documentation docs/_build/ # PyBuilder .pybuilder/ target/ # Jupyter Notebook .ipynb_checkpoints # IPython profile_default/ ipython_config.py # https://pdm.fming.dev/latest/usage/project/#working-with-version-control .pdm.toml .pdm-python .pdm-build/ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm __pypackages__/ # Celery stuff celerybeat-schedule celerybeat.pid # SageMath parsed files *.sage.py # Environments .env .venv env/ venv/ ENV/ env.bak/ venv.bak/ # Spyder project settings .spyderproject .spyproject # Rope project settings .ropeproject # mkdocs documentation /site # mypy .mypy_cache/ .dmypy.json dmypy.json # Pyre type checker .pyre/ # pytype static type analyzer .pytype/ # Cython debug symbols cython_debug/ # Ruff stuff: .ruff_cache/ # PyPI configuration file .pypirc # IDEs .idea/ .vscode/ .zed/ .claude/ .cursorignore .cursorindexingignore # Generated files openapi.json workflow_all_flows.mermaid node_modules/ .cecli* # Cloned reference repositories llama_index/ # Docs preview .docs-preview/ # Operator / k8s dev operator/bin/ bin/ tilt/k8s-manifests/secrets.yaml ================================================ FILE: .pre-commit-config.yaml ================================================ --- default_language_version: python: python3 repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 hooks: - id: check-byte-order-marker - id: check-merge-conflict - id: check-toml - id: check-yaml args: [--allow-multiple-documents] exclude: "(^charts|^operator)" - id: detect-private-key - id: end-of-file-fixer - id: mixed-line-ending - id: trailing-whitespace - repo: https://github.com/charliermarsh/ruff-pre-commit rev: v0.14.5 hooks: - id: ruff-format - id: ruff-check args: [--fix, --exit-non-zero-on-fix] - repo: local hooks: - id: ty name: ty language: system entry: uv run ty check packages/ pass_filenames: false - repo: https://github.com/DetachHead/basedpyright-pre-commit-mirror rev: 1.31.1 hooks: - id: basedpyright exclude: "scripts/" - repo: https://github.com/codespell-project/codespell rev: v2.3.0 hooks: - id: codespell additional_dependencies: [tomli] exclude: ^examples/|^docs/|pnpm-lock.yaml - repo: https://github.com/pappasam/toml-sort rev: v0.23.1 hooks: - id: toml-sort-fix exclude: ^uv\.lock$ ================================================ FILE: .prettierrc ================================================ { "overrides": [ { "files": ["*.yaml", "*.yml"], "options": { "bracketSpacing": false } } ] } ================================================ FILE: .taplo.toml ================================================ [formatting] align_comments = false reorder_keys = false # Following are to be consistent with toml-sort indent_string = " " array_trailing_comma = false compact_arrays = true compact_inline_tables = true ================================================ FILE: AGENTS.md ================================================ # LlamaIndex Workflows - Claude Development Guide ## Project Overview This is the LlamaIndex Workflows library - an event-driven, async-first framework for orchestrating complex AI applications and multi-step processes. ## Key Technologies - Python 3.9+ - AsyncIO (async/await) - Pydantic for data models - Starlette for web server - Uvicorn for ASGI serving ## Setup - Install uv: `curl -LsSf https://astral.sh/uv/install.sh | sh` - Install deps (dev): `uv sync --all-packages --all-extras` ## Development Commands ### Testing Use the `dev` CLI to run tests: ```bash # Run all package tests uv run dev # Filter by substring match uv run dev -p workflows uv run dev -p server -p client # Pass pytest args after -- uv run dev -- -k test_name ``` For more advanced scenarios, you can always `cd packages/some-package` and use pytest directly. The dev tool just provides additional package level test parallelism, and more curated cross package test output to avoid context bloat. Several packages have Docker integration tests (requires Docker running) marked with `@pytest.mark.docker`. Run them with: ```bash cd packages/ && uv run pytest -m docker -s -n0 ``` ### Linting & Formatting ```bash uv run pre-commit run -a ``` If type checkers (ty, basedpyright) fail with unresolved imports, you likely need all packages installed: `uv sync --all-packages --all-extras` ## Project Structure - `packages/llama-index-workflows/src/workflows/` - Main library code - `packages/llama-index-workflows/src/workflows/server/` - Web server implementation - `packages/llama-index-workflows/tests/` - Test suite - `packages/llama-agents-core/` - Shared schemas and utilities for cloud components - `packages/llama-agents-control-plane/` - Control plane service (K8s management, deployment API) - `packages/llama-agents-appserver/` - Application server (runs workflows in pods) - `packages/llamactl/` - CLI tool for interacting with deployments - `packages/llama-agents-agentcore/` - Agent runtime and deployment logic - `operator/` - Go-based Kubernetes operator (see `operator/AGENTS.md`) - `charts/` - Helm charts (see `charts/AGENTS.md`) - `docker/` - Dockerfiles for container images - `operator/tilt/` - Tilt dev environment support files - `examples/` - Usage examples ## Architecture See `architecture-docs/` for high-level architectural overviews: - [`core-overview.md`](architecture-docs/core-overview.md) — Workflow, Context, Runtime, and event flow - [`control-loop.md`](architecture-docs/control-loop.md) — The reducer-based execution engine - [`server-architecture.md`](architecture-docs/server-architecture.md) — HTTP server, persistence, and runtime decorators - [`overall-architecture.md`](architecture-docs/overall-architecture.md) — Cloud platform architecture (operator, control plane, appserver) - [`build-api.md`](architecture-docs/build-api.md) — Build API for deployment creation - [`quick-reference.md`](architecture-docs/quick-reference.md) — Code navigation guide and key constants The DBOS package has its own architecture doc explaining the distributed model (process boundaries, adapter rules, idle release): - [`packages/llama-agents-dbos/ARCHITECTURE.md`](packages/llama-agents-dbos/ARCHITECTURE.md) ## Key Components - **Workflow** - Main orchestration class - **Context** - State management across workflow steps - **Events** - Event-driven communication between steps - **WorkflowServer** - HTTP server for serving workflows as web services ## Versioning with Changesets ```bash npx changeset # Add a changeset npx changeset status # Check pending changes ``` Changeset descriptions should be a single line in plain English. Keep it short and simple. Do not use conventional-commit prefixes (no `fix(scope):`, `feat(scope):`, etc.). ## Development Environment ```bash uv run operator/dev.py up # Set up kind cluster and start development uv run operator/dev.py down # Clean up deployed resources uv run operator/dev.py down --delete # Delete the kind cluster uv run operator/dev.py status # Show cluster status ``` ## Other Components For Operator/Helm details, see `operator/AGENTS.md` and `charts/AGENTS.md`. ## Notes for Claude - Always run tests after making changes: `uv run dev` - Never use classes for tests, only use pytest functions - Always annotate with types function arguments and return values - The project uses async/await extensively - Context serialization requires specific JSON format for globals ## Autonomous Operation The following rules apply if you are running in an isolated sandbox environment and have tools to commit and push changes to git Make sure to install uv as the package manager. Development commands rely on it. ```bash curl -fsSL https://astral.sh/uv/install.sh | sh ``` Always run tests and pre-commit before committing: ```bash uv run dev uv run pre-commit run -a ``` ## Testing Patterns We use **pytest** with idiomatic pytest patterns. Follow these guidelines: - **No Test Classes**: Do not use test classes to organize tests. Write tests as standalone functions. Achieve organization through descriptive function names (e.g., `test_create_job_with_invalid_input_raises_error`) or by splitting into separate test files. - **Pytest Fixtures**: Use fixtures for setup/teardown and shared test dependencies. Prefer fixtures over manual setup code repeated across tests. - **Prefer Real Objects Over Mocks**: Use simple dataclasses and real objects directly when available rather than mocking them. Only mock external dependencies or things that are truly difficult to instantiate. - **DRY Test Setup**: Do not repeat patches or setup code. Create reusable abstractions—fixtures, helper functions, or module-level constants—that can be shared across tests. Tests can easily be overwhelmed with setup; start from a rich suite of testing utilities to enable many small, expressive tests. - **Simple Testing Utilities**: Testing utilities should be basic—just functions, fixtures, and global variables. Avoid over-engineering test infrastructure. ## Coding Style - Always use `from __future__ import annotations` at the top of each test file. Never use string annotations. - Include the standard SPDX license header at the top of each file: ```python # SPDX-License-Identifier: MIT # Copyright (c) 2026 LlamaIndex Inc. ``` - Comments are useful, but avoid fluff. - Import etiquette - **Do not use inline imports.** This is the default rule. Do not move imports into functions just to make an edit work quickly, avoid a top-level import conflict, or silence a linter/type checker. - Inline imports are allowed only for two accepted conditions: circular import chokepoints and known startup-time deferrals. - Circular import deferrals must have a well-defined chokepoint that owns the inline import burden. Prefer the high-level orchestration module that closes the loop, such as `workflow.py`; keep low-level leaf modules on normal top-level imports. - Startup-time deferrals are only acceptable for known, measured import costs on latency-sensitive surfaces, such as fast CLI startup. Do not invent new startup deferrals casually. - If a change appears to need a new inline import, first look for a normal top-level import, a better module boundary, or an existing chokepoint. Treat adding an inline import as a design exception, not a convenience. - When an inline import is truly warranted, it must carry a short comment explaining the deferral reason: which cycle it breaks, or what startup cost it avoids. No naked inline imports. - Put inline imports at the very beginning of the function that uses them, before other executable logic. - `if TYPE_CHECKING` imports may only be used alongside one of the accepted inline-import patterns above, so the runtime import stays deferred while annotations remain typed. - Do not wrap deferred-only types in string annotations. Use `from __future__ import annotations` instead. - Only add `__init__.py` `__all__` exports when a file is legitimately needed for public library consumption. Module level imports should not be used internally. For the most part you should never do this unless explicitly requested to do so ================================================ FILE: CLAUDE.md ================================================ @AGENTS.md ================================================ FILE: CONTRIBUTING.md ================================================ # Contributing ## Ideas for Contributing Contributions are welcome! We do our best to keep an eye on the issues and PRs and keeping them moving. Never hesitate to open a PR or an issue! Generally, we're looking for: - **New workflow features**: Improvements to the core workflow engine, step decorators, event handling, or context management - **Better error handling and validation**: Enhanced error messages, better validation of workflow configurations, improved debugging capabilities, and better retry mechanisms - **Performance optimizations**: Improvements to workflow execution speed, memory usage, or concurrent processing - **Documentation improvements**: Better examples, tutorials, API documentation, or architectural explanations - **Testing enhancements**: More comprehensive test coverage, performance tests, or integration tests - **Checkpointing and persistence**: Improvements to workflow state management and resumption capabilities - **Resource management**: Better handling of external resources and dependencies - **Bug fixes**: Any issues you've encountered while using the library Ideas beyond the above are welcome! This list is not exhaustive. ## Setup This section assumes you have `uv` installed. When developing locally, development works best with a virtual environment. You can create one with: ```bash uv venv # On MacOS/Linux source .venv/bin/activate # On Windows .venv\Scripts\activate ``` The project is a monorepo with multiple closely related packages. You can install all dependencies with: ```bash uv sync --all-extras --all-packages ``` The `pyproject.toml` files contain the dependencies for each project along with other details like the package name, version, etc. Generally you won't have to edit this file. Linting is done automatically with `pre-commit`. Initialize it with: ```bash uv run pre-commit install ``` ## Run tests Use the `dev` CLI to run tests across packages: ```bash # Run all package tests uv run dev # Filter by substring match uv run dev -p workflows uv run dev -p server -p client # Pass pytest args after -- uv run dev -- -k test_name ``` Generally, all features should be covered by robust tests. If you are adding a new feature or fixing a bug, please add tests for it. ### Manually running linting We use `pre-commit` to run linting and formatting on the codebase. You can run it manually with: ```bash uv run pre-commit run -a ``` The `pre-commit` config is located in the `.pre-commit-config.yaml` file. ## Changesets and Releases Despite being a Python project, we use [Changesets](https://github.com/changesets/changesets) for version management because it provides an excellent workflow for managing releases in a monorepo. Changesets makes it easy to track which packages need version bumps and helps generate changelogs automatically. ### Adding a Changeset When you make a change that should be included in the next release, you need to add a changeset by running the following command (requires Node.js): ```bash npx @changesets/cli ``` This will prompt you to: 1. Select which packages are affected by your changes 2. Choose the version bump type (major, minor, or patch) 3. Write a summary of your changes ### How It Works When a PR with changesets is merged, the changeset bot will: 1. Sync versions from `package.json` to `pyproject.toml` files 2. Update package versions according to the changesets 3. Generate/update CHANGELOG files 4. Create a "Version Packages" PR that can be merged to trigger the release ================================================ FILE: LICENSE ================================================ The MIT License Copyright (c) 2026 LlamaIndex Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ # LlamaAgents [![Unit Testing](https://github.com/run-llama/workflows/actions/workflows/test.yml/badge.svg)](https://github.com/run-llama/workflows/actions/workflows/test.yml) [![Coverage Status](https://coveralls.io/repos/github/run-llama/workflows/badge.svg?branch=main)](https://coveralls.io/github/run-llama/workflows?branch=main) [![GitHub contributors](https://img.shields.io/github/contributors/run-llama/workflows)](https://github.com/run-llama/llama-index-workflows/graphs/contributors) [![PyPI - Downloads](https://img.shields.io/pypi/dm/llama-index-workflows)](https://pypi.org/project/llama-index-workflows/) [![Discord](https://img.shields.io/discord/1059199217496772688)](https://discord.gg/dGcwcsnxhU) [![Twitter](https://img.shields.io/twitter/follow/llama_index)](https://x.com/llama_index) [![Reddit](https://img.shields.io/reddit/subreddit-subscribers/LlamaIndex?style=plastic&logo=reddit&label=r%2FLlamaIndex&labelColor=white)](https://www.reddit.com/r/LlamaIndex/) An open-source framework for building and shipping document-centric agents in Python. Document workflows are messy. You're stitching together OCR, LLMs, structured extraction, classification, custom validation, and human review into pipelines that have to run reliably in production. The steps are slow and the payloads are heavy. A lot of the work is in-process Python: embedding models, image analysis, vision calls, custom heuristics that don't want to be a microservice. Standing up durable orchestration for that kind of workload is a project on its own, so most teams end up shoving the pipeline into a side process nobody else wants to integrate with. LlamaAgents is built on [**Agent Workflows**](https://developers.llamaindex.ai/python/llamaagents/workflows/), an event-driven orchestration library where steps are async Python functions that emit and consume events. Branch, loop, parallelize, persist state, recover from failures, all in plain Python with no DSL. ## Grows with you Document workloads have a wide range of shapes. Sometimes you're parsing five contracts in a notebook to prove a point. Others you're running a million invoices a month behind a customer's firewall, or you're iterating on extraction quality and shipping a new version every day. Agent Workflows is built to follow you across all of that without a rewrite. Start as a function you call from a script. Wrap it in a server when you need an API. Connect a coordination backend when you need durability. Turn on replication when you need to scale. And because it's a library at its core, the same workflow code drops into wherever the work has to actually run: a notebook for prototyping, a FastAPI app for your product, or a customer's locked-down environment when their documents can't leave it. For more ideas of what it can do, take a look at [the examples](https://github.com/run-llama/llama-agents/tree/main/examples). ## Use it as a library The simplest path. `pip install llama-index-workflows`, define your workflow, and `await workflow.run(...)`. It has minimal dependencies and embeds anywhere: scripts, notebooks, servers. Durability is pluggable too: save and resume runs from a file, or connect to a database. ```python from workflows import Workflow, step from workflows.events import StartEvent, StopEvent class HelloWorkflow(Workflow): @step async def greet(self, ev: StartEvent) -> StopEvent: return StopEvent(result=f"Hello, {ev.name}") ``` See the [`llama-index-workflows` package](https://github.com/run-llama/llama-agents/tree/main/packages/llama-index-workflows) for more details. ## Mount it inside an app you already have [`llama-agents-server`](https://developers.llamaindex.ai/python/llamaagents/workflows/deployment/) wraps any workflow as a REST API with streaming, persistence, and human-in-the-loop support. Drop it into an existing Starlette/FastAPI app, or run it standalone. [`llama-agents-client`](https://developers.llamaindex.ai/python/llamaagents/workflows/client/) is the matching async client for calling workflows from other services. ```python from llama_agents.server import WorkflowServer server = WorkflowServer() server.add_workflow("greet", HelloWorkflow()) ``` See the [`llama-agents-server` package](https://github.com/run-llama/llama-agents/tree/main/packages/llama-agents-server) and the [`llama-agents-client` package](https://github.com/run-llama/llama-agents/tree/main/packages/llama-agents-client) for more details. ## Or ship it as a deployable agent [`llamactl`](https://developers.llamaindex.ai/python/llamaagents/llamactl/getting-started/) is the CLI for building and deploying agent apps end-to-end. Init from a starter, develop locally with hot reload, then deploy to LlamaParse, AWS Bedrock AgentCore, or your own infra. Agents can be headless workflow services, MCP servers, or full-stack apps with a UI. ```bash uv tool install llamactl llamactl init llamactl serve llamactl deployments create ``` See the [`llamactl` package](https://github.com/run-llama/llama-agents/tree/main/packages/llamactl) for more details. ## Works with [LlamaParse](https://developers.llamaindex.ai/python/cloud/) The heavy document primitives (OCR, structured extraction, classification, splitting) are what LlamaParse is for. Plug them into your workflow as steps, let LlamaParse handle the document understanding, and keep your agent code focused on orchestration, business logic, and review. Check out our [prebuilt templates with llamactl](https://developers.llamaindex.ai/python/llamaagents/llamactl/agent-templates/) to get started. ================================================ FILE: architecture-docs/build-api.md ================================================ # Build API The Build API is a secure proxy service that enables deployment pods to access external resources without exposing credentials directly. It runs on port 8001 alongside the management API. ## Purpose Deployment pods need access to private repositories and build artifacts, but can't safely store credentials. The Build API solves this by: 1. Authenticating pods using deployment-specific tokens 2. Proxying requests with appropriate credentials 3. Enforcing network isolation between pods and sensitive services ## Authentication - Each deployment gets a unique token generated by the operator - Pods authenticate to the build API using `Authorization: Bearer ` or HTTP Basic Auth - Basic Auth supports using either username or password as the token (for Git compatibility) - The build API validates tokens against Kubernetes CRDs - Network policies restrict pods to only access the build API port ## Current Capabilities ### Git Repository Proxying The Build API provides Git HTTP protocol support for secure repository access: - **Protocol Support**: Handles all Git HTTP operations (GET/POST) - directly forwards all requests to '/deployments/{deployment_id}' to the deployment's git repository - Uses basic auth with the deployment token, and re-authenticates with the proxy git repo ## Future Capabilities - **S3 Repositories**: Access private S3-based git repositories without complex pod permissions - **Build Artifacts**: Push/pull container images and build artifacts - **Multi-Provider Git**: GitLab, Bitbucket, and other git providers - **Credential Rotation**: Automatic token refresh ## Security Benefits - Pods don't need direct cloud credentials or git tokens - Network policies isolate pods from management APIs - Centralized credential management and audit logging - Fine-grained access control per deployment ================================================ FILE: architecture-docs/control-loop.md ================================================ # Control Loop Architecture The control loop is the core execution engine for workflows. It follows a **reducer pattern** — pure state transitions with side effects expressed as commands: ``` State + Tick --> (NewState, Commands) ``` [`control_loop.py`](../packages/llama-index-workflows/src/workflows/runtime/control_loop.py) ## Main Loop ```mermaid flowchart TD A[Initialize: queue StartEvent, schedule timeout] --> B[Drain tick buffer] B --> C{Buffer empty?} C -- No --> D[Reduce tick --> state + commands] D --> E[Execute commands] E --> B C -- Yes --> F[Wait for next completion] F --> G{What completed?} G -- Timeout --> H[Pop due scheduled ticks into buffer] G -- External tick --> I[Add to buffer] G -- Worker result --> J[Add TickStepResult to buffer] H --> B I --> B J --> B ``` 1. **Initialize** — Queue `StartEvent`, schedule workflow timeout, rewind any in-progress work from a prior run. 2. **Drain tick buffer** — Process all queued ticks synchronously. Each tick runs through the reducer and its commands execute before the next tick. 3. **Wait for next completion** — Build a task set (worker tasks + one pull task), then wait for the first to complete. Workers have priority over pull tasks. 4. **Process completed task** — Route the result back into the tick buffer and loop. ## Ticks and Commands **Ticks** are inputs to the reducer. They represent things that happen: events arriving, steps completing, cancellation requests, timeouts, and publish requests from steps. Each tick type dispatches to a dedicated reducer function. [`types/ticks.py`](../packages/llama-index-workflows/src/workflows/runtime/types/ticks.py) — all tick types **Commands** are outputs from the reducer — the side effects the loop executes. They represent actions to take: spawning step workers, queuing events (with optional delays), completing or failing the run, and publishing events to the external stream. [`types/commands.py`](../packages/llama-index-workflows/src/workflows/runtime/types/commands.py) — all command types ## Runtime Integration The control loop is runtime-agnostic. It talks to the outside world exclusively through `InternalRunAdapter` (see [core-overview.md — Runtime and Adapters](./core-overview.md#runtime-and-adapters)). This is the extension point — runtime decorators wrap the adapter to add behavior like tick persistence, idle detection, or event recording. ```mermaid sequenceDiagram participant CL as Control Loop participant A as InternalRunAdapter participant Ext as External (handler/client) Note over CL: Main loop iteration CL->>A: wait_receive() [pull task] Ext-->>A: send_event() delivers tick A-->>CL: WaitResultTick CL->>CL: reduce tick --> (state, commands) CL->>A: on_tick(tick) [journaling hook] Note over CL: Execute commands CL->>A: write_to_event_stream(event) CL->>CL: spawn worker task CL->>A: wait_for_next_task(task_set, timeout) A-->>CL: completed task (worker or pull) ``` [`plugin.py`](../packages/llama-index-workflows/src/workflows/runtime/types/plugin.py) — full adapter interface ## Key Design Decisions - **Deterministic replay** — The reducer is pure. Adapters can record ticks and replay them to reconstruct state, and override time functions for deterministic timestamps. - **Priority ordering** — Worker tasks complete before pull tasks, ensuring in-flight work finishes before accepting new external events. - **Optimistic execution with retry** — Workers receive a snapshot of collected events. If new events arrive during execution, the worker re-runs with the updated snapshot. - **State rehydration** — On resume, in-progress events move back to the queue and worker IDs reset, allowing clean restart from stored ticks. - **Idle detection** — When all steps are waiting on external input, the loop publishes `WorkflowIdleEvent`. Runtime decorators can use this signal to release idle workflows from memory. - **Retry-exhaustion hook** — The `StepWorkerFailed` branch of `_process_step_result_tick` routes a `StepFailedEvent` to a registered `@catch_error` handler. Handlers can be scoped (`@catch_error(for_steps=[...])`) or wildcard, with a per-handler `max_recoveries` budget tracked per event lineage in `recovery_counts: dict[str, int]` on `EventAttempt` / `TickAddEvent` / `CommandQueueEvent`. Routing consults `BrokerConfig.handler_for_step` and `BrokerConfig.catch_error_handlers`; when the count exceeds `max_recoveries` or no handler owns the step, the loop publishes a `WorkflowFailedEvent` carrying the live exception and fails the run. The live `Exception` rides on `EventAttempt` / `TickAddEvent` / `CommandQueueEvent` between retries — annotated with `SerializableException` where it crosses a pydantic serialization boundary — and is exposed to step bodies via `Context.retry_info()`. ================================================ FILE: architecture-docs/core-overview.md ================================================ # Core Architecture: Workflow, Context, and Runtime ## Overview ```mermaid graph LR subgraph Client ["Client (public API)"] WR["Workflow.run()"] WH[WorkflowHandler] EC["Context\n(ExternalContext)"] end subgraph Runtime EA[ExternalRunAdapter] CL[Control Loop] IA[InternalRunAdapter] end subgraph Worker ["Worker (per step)"] IC["Context\n(InternalContext)"] Steps[Step Functions] end WR -->|launches| CL WH --- EA EC --- EA EA --- CL CL --- IA IA --- IC IA --- Steps ``` The system has three zones. **Client** code calls `Workflow.run()` and interacts through `WorkflowHandler` and `Context`. The **Runtime** sits in the middle — the control loop drives execution, with `ExternalRunAdapter` and `InternalRunAdapter` as its boundaries. **Workers** are step functions that see `Context` with a different face (InternalContext). The adapters are the key abstraction boundary. Everything on the client side goes through `ExternalRunAdapter`; everything on the worker side goes through `InternalRunAdapter`. The runtime is swappable by replacing or decorating these adapters. ## Workflow Container for step definitions. `run()` selects a runtime, validates steps, and delegates to the runtime for execution. [`workflow.py`](../packages/llama-index-workflows/src/workflows/workflow.py) ## Context Faces Context presents different interfaces depending on execution phase. Internally it holds a `_face` field that transitions through three types: ```mermaid graph LR Pre[PreContext] -->|"_workflow_run()"| External[ExternalContext] External -.->|"per step worker"| Internal[InternalContext] ``` | Face | When | Used By | |------|------|---------| | PreContext | Before `run()` | Setup code — configuration, serialization, state store init | | ExternalContext | After `run()` | Handler / caller — sending events, streaming | | InternalContext | During step execution | Step functions — collecting events, publishing to stream | Each face wraps an adapter from the runtime. Public methods on Context check the current face and raise `ContextStateError` if called in the wrong phase. [`context/`](../packages/llama-index-workflows/src/workflows/context/) — Context implementation and all face types ## Runtime and Adapters The `Runtime` ABC uses a dual-adapter pattern. Each workflow run produces two adapters sharing a `run_id`: ```mermaid graph TB Runtime -->|"run_workflow()"| ExternalRunAdapter Runtime -->|"get_internal_adapter()"| InternalRunAdapter ExternalRunAdapter --- run_id InternalRunAdapter --- run_id ``` The **InternalRunAdapter** is used by the control loop — it handles receiving ticks, publishing events, timing, and task coordination. The **ExternalRunAdapter** is used by the WorkflowHandler — it handles sending events in, streaming published events out, getting results, and cancellation. Multiple base runtimes exist. `BasicRuntime` is the default in-memory asyncio runtime in the core package. `DBOSRuntime` provides durable distributed execution backed by a database. More runtimes can be added by implementing the `Runtime` ABC. Runtimes are also composable via decorators — see [server-architecture.md](./server-architecture.md#runtime-decorator-chain) for that pattern. [`plugin.py`](../packages/llama-index-workflows/src/workflows/runtime/types/plugin.py) — Runtime ABC, InternalRunAdapter, ExternalRunAdapter ## Control Loop The control loop is the core execution engine. It follows a reducer pattern where pure state transitions produce side effects as commands. The control loop is runtime-agnostic — it interacts with the outside world exclusively through `InternalRunAdapter`. See [control-loop.md](./control-loop.md) for the full architecture. ## Event Flow ```mermaid graph LR subgraph "Events In (external to internal)" H[WorkflowHandler] -->|send_event| EA[ExternalRunAdapter] EA -->|receive queue| IA[InternalRunAdapter] IA -->|tick| CL[Control Loop] end ``` ```mermaid graph LR subgraph "Events Out (internal to external)" CL2[Control Loop] -->|command| IA2[InternalRunAdapter] IA2 -->|publish queue| EA2[ExternalRunAdapter] EA2 -->|stream_published_events| H2[WorkflowHandler] end ``` ## WorkflowHandler Returned by `Workflow.run()`. The user-facing handle for a running workflow. - `await handler` — blocks until StopEvent, returns the result - `handler.stream_events()` — async iterator of published events (single consumption) - `handler.send_event()` — send events into the running workflow - `handler.cancel_run()` — graceful cancellation [`handler.py`](../packages/llama-index-workflows/src/workflows/handler.py) ================================================ FILE: architecture-docs/overall-architecture.md ================================================ # Cloud Llama Deploy - Overall Architecture This document outlines the architecture of the Cloud Llama Deploy system, which enables deployment and management of LlamaIndex workflows on Kubernetes. ## High-Level System Overview The system consists of several interconnected components that work together to provide a complete deployment platform: ```mermaid graph TD CLI["CLI (llamactl)"] --> CP["Control Plane (FastAPI backend)"] CP --> K8S["Kubernetes"] K8S --> OP["Operator (Go)"] OP --> POD["App Server (Python Pod)"] OP -.-> CRD["LlamaDeployment CRDs"] POD --> WF["User Workflows"] ``` ## Component Details ### 1. Core Package (`llama-deploy-core`) **Purpose**: Shared data models and schemas used across all components. **Role**: Ensures consistent data structures across the entire system. ### 2. Control Plane (`llama-deploy-control-plane`) **Purpose**: Main orchestration layer that manages deployments via Kubernetes. **Components**: - **K8s Client** (`k8s_client.py`): Interfaces with Kubernetes API to create/manage LlamaDeployment CRDs - **Git Integration**: Clones repositories, validates Git refs, handles GitHub authentication - **API Endpoints**: REST API for deployment and project management **Flow**: ```mermaid graph LR UR["User Request"] --> CP["Control Plane API"] CP --> KC["K8s Client"] KC --> CRD["LlamaDeployment CRD"] CRD --> K8S["Kubernetes"] ``` ### 3. Kubernetes Operator (`operator/`) **Purpose**: Kubernetes controller that reconciles LlamaDeployment custom resources. **Key Components**: - **CRD Definition**: `LlamaDeployment` custom resource with spec (repo URL, deployment file, git ref) - **Controller**: Watches for LlamaDeployment changes and creates/updates Kubernetes resources - **Reconciliation Loop**: Creates deployments, services, secrets, and ingresses **Managed Resources**: ```mermaid graph TD CRD["LlamaDeployment CRD"] --> DEP["Deployment
(API Server pod)"] CRD --> SVC["Service
(Load balancer)"] CRD --> SEC["Secret
(PAT tokens, env vars)"] CRD --> SA["ServiceAccount"] CRD --> ING["Ingress
(optional)"] ``` **Phases**: `Syncing` → `Pending` → `Running` / `Failed` / `RollingOut` ### 4. App Server (`appserver`) **Purpose**: Runtime environment that executes user workflows and provides APIs. **Key Components**: - **Deployment Manager**: Loads and manages workflow deployments from config - **Workflow Execution**: Runs LlamaIndex workflows with session management - **Source Managers**: Handle Git, local, and Docker sources for workflow code - **API Endpoints**: REST and WebSocket APIs for interacting with workflows **Configuration**: - **Primary**: Embedded in `pyproject.toml` under `[tool.llamadeploy]` - **Alternative**: `llama_deploy.toml` or `llama_deploy.yaml` with the same schema Example (TOML in `pyproject.toml`): ```toml [tool.llamadeploy] name = "my-deployment" app = "path.to.module:app" [tool.llamadeploy.ui] directory = "./ui" ``` ### 5. CLI Tool (`llamactl`) **Purpose**: Command-line interface for users to interact with the control plane. ```bash llamactl environments use https://api.cloud.llamaindex.ai llamactl auth login llamactl auth token --project llamactl auth logout llamactl deployments template > deployment.yaml llamactl deployments apply -f deployment.yaml llamactl deployments create llamactl deployments get llamactl deployments get NAME llamactl deployments edit NAME llamactl deployments update NAME llamactl deployments logs NAME --follow ``` ## Component Interaction Flow ### Deployment Creation Flow ```mermaid sequenceDiagram participant User participant CP as Control Plane participant K8s as Kubernetes participant Op as Operator participant Pod as API Server Pod User->>CP: Create deployment request CP->>CP: Validate Git repository CP->>K8s: Create LlamaDeployment CRD K8s->>Op: CRD change detected Op->>K8s: Create Deployment/Service/Secret K8s->>Pod: Start API Server pod Pod->>Pod: Clone workflow code Pod->>Pod: Load workflow and expose APIs Pod->>K8s: Update status K8s->>CP: Status propagation CP->>User: Deployment ready ``` ### Data Flow **Configuration**: Git Repo → Control Plane → LlamaDeployment CRD → Operator → API Server Pod **Runtime**: User Request → API Server → Workflow Engine → Response **Monitoring**: API Server → Prometheus Metrics | Operator → K8s Events → Status Updates ## Networking & Communication - **External Access**: Ingress → Service → API Server Pod - **Internal K8s**: Operator talks to K8s API server - **Control Plane**: Communicates with K8s via client libraries - **CLI**: HTTP calls to Control Plane API - **Workflow APIs**: Direct HTTP/WebSocket to API Server pods ## Namespace Layout Set `apps.namespace` to run the control plane + operator in the release namespace and put `LlamaDeployment` CRs and their child resources (Deployments, Pods, Services, Secrets, ServiceAccounts, ConfigMaps, Ingresses, NetworkPolicies, build Jobs) in a separate namespace. Unset = everything in the release namespace. CRs stay co-located with their children (cross-namespace owner references are not allowed). Only `WATCH_NAMESPACE` (operator) and `KUBERNETES_NAMESPACE` (control plane) point at the apps namespace; reconciler code is unchanged. RBAC in split mode: apps-namespace Role with every rule except `coordination.k8s.io/leases`, release-namespace Role with just that rule for leader election. Unset collapses to one Role. `imagePullSecrets` are not mirrored — provision them in the apps namespace, or use node-level pull credentials. ================================================ FILE: architecture-docs/quick-reference.md ================================================ ## Code Navigation Guide ### Entry Points & Main Classes **Control Plane** (`packages/llama-deploy-control-plane/`) - Entry: `src/llama_deploy/control_plane/main.py` - FastAPI app - K8s management: `src/llama_deploy/control_plane/k8s_client.py` - `K8sClient` class - API endpoints: `src/llama_deploy/control_plane/endpoints/deployments.py`, `projects.py` **Operator** (`operator/`) - Entry: `cmd/main.go` - `func main()` - Controller: `internal/controller/llamadeployment_controller.go` - `LlamaDeploymentReconciler` - CRD types: `api/v1/llamadeployment_types.go` - `LlamaDeploymentSpec`, `LlamaDeploymentStatus` **API Server** (`packages/llama-deploy-appserver/`) - Entry: `src/llama_deploy/appserver/__main__.py` or `main.py` - Manager: `src/llama_deploy/appserver/deployment.py` - `Manager` class (orchestrates deployments) - Deployment: `src/llama_deploy/appserver/deployment.py` - `Deployment` class (runs workflows) - Config parser: `src/llama_deploy/appserver/deployment_config_parser.py` - `DeploymentConfig.from_yaml()` - Routers: `src/llama_deploy/appserver/routers/deployments.py`, `status.py` **CLI** (`packages/llamactl/`) - Entry: `src/llama_deploy/cli/__init__.py` - `main()` function - Client: `src/llama_deploy/cli/client.py` - control plane/project client helpers - Commands: `src/llama_deploy/cli/commands/*` - Click command definitions - Config: `src/llama_deploy/cli/config/_config.py` - `ConfigManager`, with env support **Core Schemas** (`packages/llama-deploy-core/`) - Base: `src/llama_deploy/core/schema/base.py` - `Base` model class - Deployments: `src/llama_deploy/core/schema/deployments.py` - `DeploymentResponse`, `LlamaDeploymentSpec` - Projects: `src/llama_deploy/core/schema/projects.py` - `ProjectSummary` ### Key Configuration Files **Deployment Configuration (preferred)**: Embedded in `pyproject.toml` under `[tool.llamadeploy]`. ```toml [tool.llamadeploy] name = "my-deployment" app = "path.to.module:app" # or use `workflows = { my_workflow = "path.to.module:workflow" }` [tool.llamadeploy.ui] directory = "./ui" # Optional overrides: # build_output_dir = "dist" # package_manager = "pnpm" # build_command = "build" # serve_command = "dev" # proxy_port = 4502 ``` **Alternative**: `llama_deploy.toml` or `llama_deploy.yaml` with the same schema as `[tool.llamadeploy]`. **Helm Chart**: `charts/llama-agents/values.yaml` **Kubernetes CRD**: `operator/config/crd/bases/deploy.llamaindex.ai_llamadeployments.yaml` **RBAC**: `operator/config/rbac/role.yaml` ### Key API Endpoints **Control Plane** (port 8000): - `POST /{project_id}/deployments` - Create deployment - `GET /{project_id}/deployments` - List deployments - `GET /{project_id}/deployments/{id}` - Get deployment details - `POST /{project_id}/deployments/validate-repository` - Validate Git repo **Build API** (port 8001, token auth required): - `GET /health` - Health check **API Server** (port 8080 in pod): - `POST /deployments/{name}/tasks/run` - Execute workflow - `GET /deployments/{name}/tasks/{task_id}/results` - Get task results - `POST /deployments/{name}/sessions/create` - Create session - `GET /health` - Health check ### CLI Commands Reference ```bash llamactl environments get # List environments llamactl environments use # Switch current environment llamactl auth token --project # Create/select profile via API key llamactl auth get # List profiles llamactl auth use # Switch profile llamactl projects get # List projects llamactl projects use # Switch active project llamactl deployments template > deployment.yaml # Generate apply YAML llamactl deployments apply -f deployment.yaml # Create or update from YAML llamactl deployments create # Create new deployment in $EDITOR llamactl deployments get # List deployments llamactl deployments get NAME # Get deployment details llamactl deployments edit NAME # Edit deployment in $EDITOR llamactl deployments update NAME # Re-resolve current git ref and release it llamactl deployments logs NAME --follow # Stream deployment logs llamactl deployments delete NAME # Delete deployment ``` ### Commands Reference **Development Setup:** ```bash uv sync --all-packages --all-extras # Install all dependencies including dev uv run pre-commit run -a # Lint & format uv run dev # Run all package tests ``` **Development Environment:** ```bash uv run operator/dev.py up # Set up kind cluster and start development uv run operator/dev.py down # Clean up deployed resources uv run operator/dev.py down --delete # Delete the kind cluster uv run operator/dev.py status # Show cluster status ``` **Operator Development (Makefile in `operator/`):** ```bash make -C operator operator-build # Build operator binary make -C operator operator-test # Run operator tests make -C operator operator-manifests # Generate CRDs and RBAC make -C operator operator-generate # Generate DeepCopy methods ``` ### Key Constants & Defaults - Default discovery order: `llama_deploy.toml` → `pyproject.toml` → `llama_deploy.yaml` - API Server port: `8080` - Control Plane port: `8000` - Build API port: `8001` - Kubernetes namespace: `llama-agents` (default) - CRD group: `deploy.llamaindex.ai` - Container image: `llamaindex/llama-deploy:main-autodeploy` ================================================ FILE: architecture-docs/server-architecture.md ================================================ # Server Architecture ## Overview The server wraps the core workflow engine (see [core-overview.md](./core-overview.md)) with HTTP access, persistence, and durability. Components are layered with clear boundaries: ```mermaid graph TD Client -->|HTTP| API["_WorkflowAPI"] API --> Service["_WorkflowService"] Service --> Runtime["Runtime decorator chain"] Runtime --> ControlLoop["Control Loop"] Runtime -.->|reads/writes| Store["WorkflowStore"] Service -.->|queries| Store API -.->|subscribes events| Store ``` The **store** is the shared persistence layer — the runtime writes to it, the service queries it, and the API streams from it. ## Components **`WorkflowServer`** — Entry point. Assembles the runtime chain, service, and API into a Starlette app. Registers workflows. [`server.py`](../packages/llama-agents-server/src/llama_agents/server/server.py) **`_WorkflowAPI`** — Starlette routes. Translates HTTP requests into service calls and streams events from the store to clients via SSE. [`_api.py`](../packages/llama-agents-server/src/llama_agents/server/_api.py) **`_WorkflowService`** — Application logic. Starts workflows, manages handler lifecycle, coordinates event sending and cancellation. Bridges the API to the runtime. [`_service.py`](../packages/llama-agents-server/src/llama_agents/server/_service.py) **Runtime decorators** — A chain of decorators that add server concerns (event recording, tick persistence, idle release, etc.) on top of a base runtime. See the section below. [`_runtime/`](../packages/llama-agents-server/src/llama_agents/server/_runtime/) — standard server decorators **`AbstractWorkflowStore`** — Persistence contract shared by all layers above. [`abstract_workflow_store.py`](../packages/llama-agents-server/src/llama_agents/server/_store/abstract_workflow_store.py) ## Runtime Decorator Chain Runtimes compose via decoration. Each decorator wraps a `Runtime` and its adapters (see [core-overview.md — Runtime and Adapters](./core-overview.md#runtime-and-adapters)), overriding only the methods it needs to add a specific concern — event recording to a store, tick persistence for replay, idle detection and memory release, etc. ```mermaid graph LR Outer["Server decorators\n(one per concern)"] -->|wraps| Inner["Base Runtime\n(BasicRuntime, DBOSRuntime, etc.)"] ``` `WorkflowServer` assembles a default decorator chain on top of whatever base runtime is provided. The base runtime is swappable — pass `runtime=` to `WorkflowServer` to use a different one (BasicRuntime, DBOSRuntime, or a custom implementation). See `server.py` for how the default chain is assembled. **Writing a decorator:** Extend `BaseRuntimeDecorator` and optionally `BaseInternalRunAdapterDecorator` / `BaseExternalRunAdapterDecorator`. These forward all methods to the inner runtime/adapter — override only what you need. [`runtime_decorators.py`](../packages/llama-agents-server/src/llama_agents/server/_runtime/runtime_decorators.py) ## Persistence (WorkflowStore) The store is the system's source of truth for anything that survives a restart or an idle-release cycle. All layers depend on it: | What's stored | Purpose | |---|---| | Handler records | Lifecycle tracking (status, timestamps, result) | | Event log | Resumable event streaming to clients | | Ticks | Rebuild workflow state after idle release or restart | | State stores | Persistent key-value state per run | Two implementations: - **`MemoryWorkflowStore`** — In-process dicts. No persistence across restarts. [`memory_workflow_store.py`](../packages/llama-agents-server/src/llama_agents/server/_store/memory_workflow_store.py) - **`SqliteWorkflowStore`** — SQLite-backed. Survives restarts. [`sqlite_workflow_store.py`](../packages/llama-agents-server/src/llama_agents/server/_store/sqlite/sqlite_workflow_store.py) ## Resumable Event Streams Events flow from step functions to clients through the store, which acts as both a write-ahead log and a subscription source: ```mermaid graph LR Step["Step function"] -->|"ctx.write_event_to_stream()"| IA["InternalRunAdapter"] IA -->|decorator intercepts| Store["WorkflowStore"] Store -->|"subscribe_events(cursor)"| API["_WorkflowAPI"] API -->|SSE| Client ``` The store assigns each event a monotonic **sequence number**. Clients track their position via this cursor: 1. Client connects, receives events as SSE with `id: {sequence}` 2. Client disconnects (network drop, restart, etc.) 3. Client reconnects with `Last-Event-ID: {last_seen_sequence}` 4. Store replays all events after that sequence, then continues live This means the API layer never needs to hold event history in memory — it just opens a `subscribe_events(after_sequence=cursor)` iterator from the store each time a client connects. A special `"now"` cursor skips all historical events and streams only new ones. ## Server Lifecycle **Start:** `WorkflowServer.start()` queries the store for handlers with `status=running` that aren't idle, and resumes each by rebuilding context from stored ticks. **Stop:** `WorkflowServer.stop()` aborts all active control loops. Handler records remain in the store — they'll resume on next start. **Idle release:** When the [control loop detects](./control-loop.md#key-design-decisions) all steps are waiting on external input, it publishes `WorkflowIdleEvent`. Runtime decorators can use this signal to release the workflow from memory. When a new event arrives for that workflow, it reloads from ticks transparently. ================================================ FILE: charts/AGENTS.md ================================================ ## Helm Chart Makefile lives in `operator/`. Run targets with `make -C operator ` from repo root, or `make ` from within `operator/`. Setup: - Ensure kind context: `make -C operator kube-ensure-kind-context` - Install helm-unittest: `make -C operator helm-unittest-install` - Install Prometheus Operator CRDs: `make -C operator helm-crds-prom-operator` Checks: - Lint (default values): `make -C operator helm-lint` - Lint (dev values): `make -C operator helm-lint-dev` - Template (default/dev): `make -C operator helm-template` / `make -C operator helm-template-dev` - Server-side dry-run (default/dev): `make -C operator helm-dry-run` / `make -C operator helm-dry-run-dev` - Run Helm unit tests: `make -C operator helm-unittest` ================================================ FILE: charts/llama-agents/.helmignore ================================================ # Patterns to ignore when building packages. .DS_Store *.swp *.bak *.tmp *~ .git .gitignore # Node modules symlink pulls in operator binaries which exceed Helm's 5MB file limit node_modules ================================================ FILE: charts/llama-agents/CHANGELOG.md ================================================ # llama-agents ## 0.12.3 ### Patch Changes - Updated dependencies [c3fac21] - llama-agents-control-plane@0.12.2 - llama-agents-appserver@0.11.4 ## 0.12.2 ### Patch Changes - Updated dependencies [463c79d] - llama-agents-control-plane@0.12.1 - llama-agents-appserver@0.11.3 ## 0.12.1 ### Patch Changes - Updated dependencies [2280e04] - llama-agents-control-plane@0.12.0 - llama-agents-appserver@0.11.2 ## 0.12.0 ### Minor Changes - 3ced443: Optional s3proxy sidecar for non-AWS object storage, plus inline-or-BYO creds on both the sidecar and control plane S3. ### Patch Changes - 9eda189: Document the compatible `llama-agents-crds` chart version via a new `crds.version` values field, auto-synced at release time and surfaced in the README. ## 0.11.1 ### Patch Changes - Updated dependencies [916b157] - llama-agents-appserver@0.11.1 ## 0.11.0 ### Minor Changes - de5bedc: Add `apps.namespace` to run `LlamaDeployment` CRs and their child resources in a separate namespace from the operator + control plane. Unset = everything in the release namespace. ### Patch Changes - facbac4: New network policy values: `extraEgressRules`, configurable DNS selectors, and `blockPrivateRanges` toggle for reaching in-cluster services without disabling the policy. - Updated dependencies [facbac4] - Updated dependencies [64579a9] - llama-agents-appserver@0.11.0 - llama-agents-control-plane@0.11.1 ## 0.10.12 ### Patch Changes - Updated dependencies [fdc1c48] - llama-agents-operator@0.11.1 ## 0.10.11 ### Patch Changes - Updated dependencies [e8b8f47] - llama-agents-control-plane@0.11.0 - llama-agents-appserver@0.10.5 ## 0.10.10 ### Patch Changes - Updated dependencies [7ad3049] - llama-agents-control-plane@0.10.5 - llama-agents-appserver@0.10.4 ## 0.10.9 ### Patch Changes - Updated dependencies [286c91a] - llama-agents-appserver@0.10.3 ## 0.10.8 ### Patch Changes - Updated dependencies [740ee9e] - llama-agents-control-plane@0.10.4 ## 0.10.7 ### Patch Changes - llama-agents-appserver@0.10.2 - llama-agents-control-plane@0.10.3 ## 0.10.6 ### Patch Changes - Updated dependencies [3f12660] - llama-agents-control-plane@0.10.2 - llama-agents-appserver@0.10.1 ## 0.10.5 ### Patch Changes - Updated dependencies [3e2e7b8] - llama-agents-appserver@0.10.0 - llama-agents-operator@0.11.0 ## 0.10.4 ### Patch Changes - Updated dependencies [46f2675] - llama-agents-control-plane@0.10.1 - llama-agents-appserver@0.9.1 ## 0.10.3 ### Patch Changes - Updated dependencies [782939b] - llama-agents-operator@0.10.2 ## 0.10.2 ### Patch Changes - Updated dependencies [de92a8b] - llama-agents-operator@0.10.1 ## 0.10.1 ### Patch Changes - Updated dependencies [58e7942] - Updated dependencies [ea577a1] - llama-agents-control-plane@0.10.0 - llama-agents-appserver@0.9.0 - llama-agents-operator@0.10.0 ## 0.10.0 ### Minor Changes - 7025b30: Rename Helm chart from cloud-llama-deploy-chart to llama-agents-chart with standardized resource naming ================================================ FILE: charts/llama-agents/Chart.yaml ================================================ apiVersion: v2 name: llama-agents description: A Helm chart for deploying Llama Agents (control plane + operator) type: application version: "0.12.3" ================================================ FILE: charts/llama-agents/README.md ================================================ # llama-agents A Helm chart for deploying Llama Agents (control plane + operator) ## Architecture This chart deploys two components: - **Control plane** — API server for managing deployments, builds, and backups - **Operator** — Kubernetes controller that reconciles `LlamaDeployment` custom resources into running pods CRDs (`LlamaDeployment`, `LlamaDeploymentTemplate`) are included in the chart's `crds/` directory and installed automatically on first `helm install`. They are **not** modified on upgrade or removed on uninstall (standard Helm CRD behavior). For managed CRD upgrades, use the companion [`llama-agents-crds`](../llama-agents-crds/) chart. Each release of `llama-agents` pins the compatible CRD chart version in `crds.version` (see the values table below) — use that version when installing or upgrading the CRD chart. ## Prerequisites - Kubernetes 1.26+ - Helm 3.x - S3-compatible object storage (for build artifacts and backups) ## Installation ### Fresh install ```bash helm install llama-agents oci://docker.io/llamaindex/llama-agents \ --set controlPlane.objectStorage.s3.bucket=my-bucket \ --set controlPlane.objectStorage.s3.region=us-east-1 ``` CRDs are installed automatically from the `crds/` directory. ### With separate CRD management If you prefer explicit CRD lifecycle management (recommended for production): ```bash # Install CRD chart first — pin to the compatible version from `crds.version` below helm install llama-agents-crds oci://docker.io/llamaindex/llama-agents-crds --version # Install main chart, skipping bundled CRDs helm install llama-agents oci://docker.io/llamaindex/llama-agents --skip-crds \ --set controlPlane.objectStorage.s3.bucket=my-bucket ``` ## Upgrading ```bash # If CRD schema has changed, upgrade CRDs first — pin to `crds.version` from the values table helm upgrade --install llama-agents-crds oci://docker.io/llamaindex/llama-agents-crds --version # Then upgrade the main chart helm upgrade llama-agents oci://docker.io/llamaindex/llama-agents ``` ## Apps namespace Set `apps.namespace` to isolate `LlamaDeployment` CRs and their child resources in a separate namespace. The operator + control plane stay in the release namespace and target the apps namespace for all app resources. ```bash kubectl create namespace llama-agents-apps helm install llama-agents oci://docker.io/llamaindex/llama-agents \ --namespace llama-agents \ --set apps.namespace=llama-agents-apps \ --set controlPlane.objectStorage.s3.bucket=my-bucket ``` `imagePullSecrets` are not mirrored — provision them in the apps namespace yourself, or use node-level pull credentials. Switching modes on an existing install requires draining and recreating `LlamaDeployment` CRs. ## Non-S3 object storage Set `s3proxy.enabled=true` to run an [s3proxy](https://github.com/gaul/s3proxy) sidecar alongside the control plane. When enabled, `S3_ENDPOINT_URL` points at the sidecar on localhost and `S3_UNSIGNED` defaults to `true`; explicit overrides still win. Credentials take one of two forms: ```yaml # Inline — chart renders llama-agents-s3proxy Secret s3proxy: enabled: true config: JCLOUDS_PROVIDER: JCLOUDS_IDENTITY: JCLOUDS_CREDENTIAL: # ...any other JCLOUDS_* vars the backend needs ``` ```yaml # BYO — point at an existing Secret whose keys are the sidecar env vars s3proxy: enabled: true secret: my-existing-s3proxy-secret ``` Pick `JCLOUDS_*` vars from the [s3proxy storage-backend examples](https://github.com/gaul/s3proxy/wiki/Storage-backend-examples). If both `config` and `secret` are set, `secret` wins. ## Control plane S3 credentials Three mutually-exclusive forms, listed in precedence order: ```yaml # BYO — envFroms an existing Secret (keys: S3_ACCESS_KEY, S3_SECRET_KEY) controlPlane: objectStorage: s3: bucket: my-bucket secret: my-s3-creds ``` ```yaml # Inline — chart renders llama-agents-controlplane-s3 Secret controlPlane: objectStorage: s3: bucket: my-bucket accessKey: AKIA... secretKey: ... ``` ```yaml # Neither — control plane relies on IRSA / workload identity controlPlane: objectStorage: s3: bucket: my-bucket ``` Partial inline (one of `accessKey`/`secretKey` set) is a template error. ## Values ### Metrics | Key | Type | Default | Description | |-----|------|---------|-------------| | metrics.enabled | bool | `false` | Enable Prometheus ServiceMonitors | | metrics.scrapeInterval | string | `"30s"` | Scrape interval for ServiceMonitors | | metrics.scrapeTimeout | string | `"10s"` | Scrape timeout for ServiceMonitors | | metrics.additionalMonitorLabels | object | `{}` | Extra labels added to ServiceMonitors for Prometheus discovery (e.g., `release: prometheus`) | ### Images | Key | Type | Default | Description | |-----|------|---------|-------------| | images.controlPlane.repository | string | `"llamaindex/llama-agents-control-plane"` | Control plane image repository | | images.controlPlane.tag | string | `"0.12.2"` | Control plane image tag | | images.controlPlane.pullPolicy | string | `"IfNotPresent"` | Control plane image pull policy | | images.operator.repository | string | `"llamaindex/llama-agents-operator"` | Operator image repository | | images.operator.tag | string | `"0.11.1"` | Operator image tag | | images.operator.pullPolicy | string | `"IfNotPresent"` | Operator image pull policy | | images.appserver.repository | string | `"llamaindex/llama-agents-appserver"` | Appserver image repository (used by operator for managed pods) | | images.appserver.tag | string | `"0.11.4"` | Appserver image tag | | images.appserver.pullPolicy | string | `"IfNotPresent"` | Appserver image pull policy | | images.nginx.repository | string | `"nginxinc/nginx-unprivileged"` | Nginx sidecar image repository | | images.nginx.tag | string | `"1.27-alpine"` | Nginx sidecar image tag | | images.nginx.pullPolicy | string | `"IfNotPresent"` | Nginx sidecar image pull policy | ### Control Plane | Key | Type | Default | Description | |-----|------|---------|-------------| | controlPlane.replicas | int | `1` | Number of control plane replicas | | controlPlane.container.port | int | `8000` | Control plane API port | | controlPlane.container.env | list | `[]` | Extra environment variables for the control plane container | | controlPlane.container.envFrom | list | `[]` | Extra envFrom sources (secretRef, configMapRef) for the control plane container | | controlPlane.container.resources | object | `{requests: {cpu: 100m, memory: 256Mi, ephemeral-storage: 500Mi}}` | Resource requests/limits for the control plane container | | controlPlane.container.startupProbe | object | `{}` | Startup probe configuration | | controlPlane.container.livenessProbe | object | `{}` | Liveness probe configuration | | controlPlane.deployment.annotations | object | `{}` | Annotations for the control plane Deployment | | controlPlane.deployment.podAnnotations | object | `{}` | Annotations for the control plane pod template | | controlPlane.service.type | string | `"ClusterIP"` | Control plane Service type | | controlPlane.service.port | int | `80` | Control plane Service port | | controlPlane.service.annotations | object | `{}` | Annotations for the control plane Service | | controlPlane.service.metricsPath | string | `"/metrics"` | Metrics path for the control plane Service | | controlPlane.buildApi.port | int | `8001` | Build API port (git proxy and token validation) | | controlPlane.buildApi.metricsPath | string | `"/metrics"` | Metrics path for the build API | | controlPlane.hpa.enabled | bool | `false` | Enable HPA for the control plane | | controlPlane.hpa.minReplicas | int | `1` | Minimum replicas | | controlPlane.hpa.maxReplicas | int | `3` | Maximum replicas | | controlPlane.hpa.targetCPUUtilizationPercentage | int | `80` | Target average CPU utilization percentage | ### Object Storage | Key | Type | Default | Description | |-----|------|---------|-------------| | controlPlane.objectStorage.s3.endpointUrl | string | `""` | S3 endpoint URL (leave empty for AWS) | | controlPlane.objectStorage.s3.bucket | string | `""` | S3 bucket name (**required**) | | controlPlane.objectStorage.s3.region | string | `""` | S3 region | | controlPlane.objectStorage.s3.unsigned | string | `nil` | Send S3 requests unsigned (no Authorization header). Leave unset/`false` for any auth-requiring S3-compatible backend. For non-S3 object/blob storage, see `s3proxy.enabled` below — when that's on, this defaults to `true` unless you override it here. | | controlPlane.objectStorage.s3.accessKey | string | `""` | Inline S3 access key. When set alongside `secretKey`, the chart renders a Secret and wires it into the control plane. Mutually exclusive with `s3.secret` (which wins silently). | | controlPlane.objectStorage.s3.secretKey | string | `""` | Inline S3 secret key. Must be set together with `accessKey`; partial setting is an error. | | controlPlane.objectStorage.s3.secret | string | `""` | Name of an existing K8s Secret supplying `S3_ACCESS_KEY` and `S3_SECRET_KEY`. Takes precedence over `accessKey`/`secretKey`. | | controlPlane.objectStorage.buildKeyPrefix | string | `"builds"` | Key prefix for build artifacts in the bucket | | controlPlane.objectStorage.backupKeyPrefix | string | `"backups"` | Key prefix for backup archives in the bucket | | controlPlane.objectStorage.codeRepoKeyPrefix | string | `"git"` | Key prefix for code repositories in the bucket | | controlPlane.objectStorage.backupEncryptionSecretRef | string | `""` | K8s Secret name containing `BACKUP_ENCRYPTION_PASSWORD` | ### Apps | Key | Type | Default | Description | |-----|------|---------|-------------| | apps.namespace | string | `""` | Namespace where LlamaDeployment CRs and all operator-managed child resources live. Empty = release namespace. When set, the operator + control plane stay in the release namespace and target this namespace for all app resources. | ### CRDs | Key | Type | Default | Description | |-----|------|---------|-------------| | crds.version | string | `"0.7.2"` | Compatible `llama-agents-crds` chart version for this release. Documentation only; not read by templates. Auto-synced at release time. | ### Operator | Key | Type | Default | Description | |-----|------|---------|-------------| | operator.enabled | bool | `true` | Deploy the operator | | operator.replicas | int | `1` | Number of operator replicas | | operator.annotations | object | `{}` | Annotations for the operator Deployment | | operator.podAnnotations | object | `{}` | Annotations for the operator pod template | | operator.defaultAppRequests.cpu | string | `"750m"` | Default CPU request for managed app containers | | operator.defaultAppRequests.memory | string | `"2Gi"` | Default memory request for managed app containers | | operator.defaultAppLimits.cpu | string | `""` | Default CPU limit for managed app containers (empty = no limit) | | operator.defaultAppLimits.memory | string | `"4096Mi"` | Default memory limit for managed app containers | | operator.resources | object | `{limits: {cpu: 500m, memory: 128Mi}, requests: {cpu: 10m, memory: 64Mi}}` | Resource requests/limits for the operator container | | operator.maxConcurrentRollouts | int | `10` | Max simultaneous LlamaDeployment rollouts (0 = unlimited) | | operator.maxDeployments | int | `0` | Max active LlamaDeployments per namespace (0 = unlimited) | | operator.env | list | `[]` | Extra environment variables for the operator container | | operator.rolloutTimeoutSeconds | int | `1800` | Rollout timeout in seconds for managed deployments | | operator.llamaDeploymentTemplate.enabled | bool | `false` | Create a default LlamaDeploymentTemplate in the namespace | | operator.llamaDeploymentTemplate.name | string | `"default"` | Template resource name | | operator.llamaDeploymentTemplate.metadata | object | `{}` | Metadata for the template (labels, annotations) | | operator.llamaDeploymentTemplate.spec | object | `{"podSpec":{}}` | Template spec (podSpec with nodeSelector, tolerations, affinity, container overrides) | | operator.hpa.enabled | bool | `false` | Enable HPA for the operator | | operator.hpa.minReplicas | int | `1` | Minimum replicas | | operator.hpa.maxReplicas | int | `3` | Maximum replicas | | operator.hpa.targetCPUUtilizationPercentage | int | `80` | Target average CPU utilization percentage | ### Local Development | Key | Type | Default | Description | |-----|------|---------|-------------| | localDev.enabled | bool | `false` | Enable local dev ingress for deployed apps | | localDev.ingressDomain | string | `"127.0.0.1.nip.io"` | Ingress domain for local dev | ### RBAC | Key | Type | Default | Description | |-----|------|---------|-------------| | rbac.create | bool | `true` | Create Role and RoleBinding | | rbac.roleAnnotations | object | `{}` | Annotations for the Role | | rbac.roleBindingAnnotations | object | `{}` | Annotations for the RoleBinding | ### Service Account | Key | Type | Default | Description | |-----|------|---------|-------------| | serviceAccount.create | bool | `true` | Create a ServiceAccount | | serviceAccount.name | string | `"llama-agents"` | ServiceAccount name | | serviceAccount.annotations | object | `{}` | Annotations for the ServiceAccount | ### s3proxy | Key | Type | Default | Description | |-----|------|---------|-------------| | s3proxy.enabled | bool | `false` | Run an [s3proxy](https://github.com/gaul/s3proxy) sidecar alongside the control plane to translate S3 API calls to non-AWS backends (Azure Blob, GCS, etc.). When enabled, `S3_ENDPOINT_URL` and `S3_UNSIGNED` default to localhost and `true` unless explicitly overridden. Fill in `s3proxy.config` with the JCLOUDS_* environment variables for your cloud. | | s3proxy.image | string | `"docker.io/andrewgaul/s3proxy:3.1.0"` | s3proxy container image | | s3proxy.imagePullPolicy | string | `"IfNotPresent"` | s3proxy image pull policy | | s3proxy.containerPort | int | `8080` | Port s3proxy listens on inside the pod (control plane reaches it over localhost) | | s3proxy.logLevel | string | `"info"` | s3proxy log level (passed as LOG_LEVEL and S3PROXY_LOG_LEVEL) | | s3proxy.securityContext | object | `{}` | securityContext for the s3proxy container | | s3proxy.resources | object | `{requests: {cpu: 50m, memory: 256Mi}, limits: {cpu: 500m, memory: 512Mi}}` | Resource requests/limits for the s3proxy sidecar | | s3proxy.config | object | `{}` | Raw passthrough to the s3proxy Secret. Keys become environment variables on the sidecar. Typically `JCLOUDS_PROVIDER`, `JCLOUDS_IDENTITY`, `JCLOUDS_CREDENTIAL`, `JCLOUDS_ENDPOINT`, `JCLOUDS_REGION`. See https://github.com/gaul/s3proxy/wiki/Storage-backend-examples. | | s3proxy.secret | string | `""` | Name of an existing K8s Secret supplying the sidecar's env vars. Takes precedence over `config` (which is skipped if this is set). | ### Network Policy | Key | Type | Default | Description | |-----|------|---------|-------------| | networkPolicy.enabled | bool | `true` | Enable egress NetworkPolicy for operator-managed pods | | networkPolicy.extraMatchExpressions | list | `[]` | Additional pod selector matchExpressions | | networkPolicy.extraEgressRules | list | `[]` | Extra egress rules appended to the NetworkPolicy | | networkPolicy.blockPrivateRanges | bool | `true` | Block private IP ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) in internet egress rule | | networkPolicy.dns.namespaceSelector | object | `{"kubernetes.io/metadata.name":"kube-system"}` | Namespace selector for DNS pods. Defaults to kube-system | | networkPolicy.dns.podSelector | object | `{"k8s-app":"kube-dns"}` | Pod selector for DNS pods. Defaults to kube-dns | ## Uninstalling ```bash helm uninstall llama-agents ``` CRDs are **not** removed on uninstall. To remove them (this deletes all LlamaDeployment resources): ```bash kubectl delete crd llamadeployments.deploy.llamaindex.ai llamadeploymenttemplates.deploy.llamaindex.ai ``` ================================================ FILE: charts/llama-agents/README.md.gotmpl ================================================ {{ template "chart.header" . }} {{ template "chart.description" . }} ## Architecture This chart deploys two components: - **Control plane** — API server for managing deployments, builds, and backups - **Operator** — Kubernetes controller that reconciles `LlamaDeployment` custom resources into running pods CRDs (`LlamaDeployment`, `LlamaDeploymentTemplate`) are included in the chart's `crds/` directory and installed automatically on first `helm install`. They are **not** modified on upgrade or removed on uninstall (standard Helm CRD behavior). For managed CRD upgrades, use the companion [`llama-agents-crds`](../llama-agents-crds/) chart. Each release of `llama-agents` pins the compatible CRD chart version in `crds.version` (see the values table below) — use that version when installing or upgrading the CRD chart. ## Prerequisites - Kubernetes 1.26+ - Helm 3.x - S3-compatible object storage (for build artifacts and backups) ## Installation ### Fresh install ```bash helm install llama-agents oci://docker.io/llamaindex/llama-agents \ --set controlPlane.objectStorage.s3.bucket=my-bucket \ --set controlPlane.objectStorage.s3.region=us-east-1 ``` CRDs are installed automatically from the `crds/` directory. ### With separate CRD management If you prefer explicit CRD lifecycle management (recommended for production): ```bash # Install CRD chart first — pin to the compatible version from `crds.version` below helm install llama-agents-crds oci://docker.io/llamaindex/llama-agents-crds --version # Install main chart, skipping bundled CRDs helm install llama-agents oci://docker.io/llamaindex/llama-agents --skip-crds \ --set controlPlane.objectStorage.s3.bucket=my-bucket ``` ## Upgrading ```bash # If CRD schema has changed, upgrade CRDs first — pin to `crds.version` from the values table helm upgrade --install llama-agents-crds oci://docker.io/llamaindex/llama-agents-crds --version # Then upgrade the main chart helm upgrade llama-agents oci://docker.io/llamaindex/llama-agents ``` ## Apps namespace Set `apps.namespace` to isolate `LlamaDeployment` CRs and their child resources in a separate namespace. The operator + control plane stay in the release namespace and target the apps namespace for all app resources. ```bash kubectl create namespace llama-agents-apps helm install llama-agents oci://docker.io/llamaindex/llama-agents \ --namespace llama-agents \ --set apps.namespace=llama-agents-apps \ --set controlPlane.objectStorage.s3.bucket=my-bucket ``` `imagePullSecrets` are not mirrored — provision them in the apps namespace yourself, or use node-level pull credentials. Switching modes on an existing install requires draining and recreating `LlamaDeployment` CRs. ## Non-S3 object storage Set `s3proxy.enabled=true` to run an [s3proxy](https://github.com/gaul/s3proxy) sidecar alongside the control plane. When enabled, `S3_ENDPOINT_URL` points at the sidecar on localhost and `S3_UNSIGNED` defaults to `true`; explicit overrides still win. Credentials take one of two forms: ```yaml # Inline — chart renders llama-agents-s3proxy Secret s3proxy: enabled: true config: JCLOUDS_PROVIDER: JCLOUDS_IDENTITY: JCLOUDS_CREDENTIAL: # ...any other JCLOUDS_* vars the backend needs ``` ```yaml # BYO — point at an existing Secret whose keys are the sidecar env vars s3proxy: enabled: true secret: my-existing-s3proxy-secret ``` Pick `JCLOUDS_*` vars from the [s3proxy storage-backend examples](https://github.com/gaul/s3proxy/wiki/Storage-backend-examples). If both `config` and `secret` are set, `secret` wins. ## Control plane S3 credentials Three mutually-exclusive forms, listed in precedence order: ```yaml # BYO — envFroms an existing Secret (keys: S3_ACCESS_KEY, S3_SECRET_KEY) controlPlane: objectStorage: s3: bucket: my-bucket secret: my-s3-creds ``` ```yaml # Inline — chart renders llama-agents-controlplane-s3 Secret controlPlane: objectStorage: s3: bucket: my-bucket accessKey: AKIA... secretKey: ... ``` ```yaml # Neither — control plane relies on IRSA / workload identity controlPlane: objectStorage: s3: bucket: my-bucket ``` Partial inline (one of `accessKey`/`secretKey` set) is a template error. {{ template "chart.valuesSection" . }} ## Uninstalling ```bash helm uninstall llama-agents ``` CRDs are **not** removed on uninstall. To remove them (this deletes all LlamaDeployment resources): ```bash kubectl delete crd llamadeployments.deploy.llamaindex.ai llamadeploymenttemplates.deploy.llamaindex.ai ``` ================================================ FILE: charts/llama-agents/crds/deploy.llamaindex.ai_llamadeployments.yaml ================================================ --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.18.0 name: llamadeployments.deploy.llamaindex.ai spec: group: deploy.llamaindex.ai names: kind: LlamaDeployment listKind: LlamaDeploymentList plural: llamadeployments singular: llamadeployment scope: Namespaced versions: - additionalPrinterColumns: - jsonPath: .spec.projectId name: Project ID type: string - jsonPath: .spec.displayName name: Name type: string - jsonPath: .spec.repoUrl name: Repo type: string - jsonPath: .status.phase name: Phase type: string - jsonPath: .metadata.creationTimestamp name: Age type: date name: v1 schema: openAPIV3Schema: description: LlamaDeployment is the Schema for the llamadeployments API. properties: apiVersion: description: |- APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: description: |- Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object spec: description: LlamaDeploymentSpec defines the desired state of LlamaDeployment. properties: buildGeneration: description: |- BuildGeneration is a monotonically increasing counter that forces a new build when incremented, even if all other inputs (gitSha, imageTag, etc.) are unchanged. This allows retrying a failed build caused by transient errors (e.g. network failures) without requiring a new git commit. format: int64 type: integer deploymentFilePath: default: llama_deployment.yml description: DeploymentFilePath is the path to the deployment file within the repository type: string displayName: description: DisplayName is the user-facing deployment label type: string gitRef: description: GitRef is the git reference (commit SHA, branch, or tag) to deploy type: string gitSha: description: A resolved git sha for the git ref type: string image: description: |- Image is the container image registry and name (e.g., "llamaindex/llama-agents-appserver") If not specified, defaults to environment variable or "llamaindex/llama-agents-appserver" type: string imageTag: description: |- ImageTag is the container image tag If not specified, defaults to environment variable or "latest" type: string name: description: 'Name is the deployment name (DEPRECATED: use DisplayName)' type: string projectId: description: ProjectId is the project ID type: string repoUrl: description: RepoUrl is the URL of the repository to deploy type: string secretName: description: SecretName is the name of the Kubernetes Secret containing PAT and deployment secrets type: string staticAssetsPath: description: |- StaticAssetsPath is an optional path (relative to /opt/app) containing prebuilt UI assets to be served under /deployments//ui type: string suspended: description: |- Suspended scales the underlying Deployment to 0 replicas when true. Setting suspended to false (or removing the field) restores replicas to 1. type: boolean templateName: description: |- TemplateName optionally specifies a LlamaDeploymentTemplate to apply. When empty, the operator will look up a template named "default". type: string required: - projectId - repoUrl type: object status: description: LlamaDeploymentStatus defines the observed state of LlamaDeployment. properties: authToken: description: AuthToken is a cryptographically secure token for this deployment type: string buildId: description: BuildId is the content-addressed identifier for the current build artifact type: string buildStatus: description: BuildStatus tracks the state of the current build job enum: - Pending - Running - Succeeded - Failed type: string failedRolloutGeneration: description: |- FailedRolloutGeneration records the LlamaDeployment generation whose rollout timed out. This prevents the operator from re-attempting the same failing rollout. format: int64 type: integer lastBuiltGeneration: description: |- LastBuiltGeneration is the spec.buildGeneration value that was last successfully built. When spec.buildGeneration differs from this value, a new build is triggered even if the deployment is suspended. format: int64 type: integer lastReconciledGeneration: description: LastReconciledGeneration tracks the generation that was last successfully reconciled format: int64 type: integer lastUpdated: description: LastUpdated is the timestamp of the last status update format: date-time type: string message: description: Message is a human-readable message indicating details about the current status type: string phase: description: Phase represents the current phase of the deployment enum: - Pending - Running - Failed - RollingOut - RolloutFailed - Suspended - Building - BuildFailed - AwaitingCode type: string releaseHistory: description: ReleaseHistory keeps the last 20 released git shas with timestamps items: description: ReleaseHistoryEntry represents a single released version entry properties: gitSha: description: GitSha is the released git commit SHA type: string imageTag: description: ImageTag is the appserver image tag used for this release type: string releasedAt: description: ReleasedAt is the timestamp when this version was released format: date-time type: string required: - gitSha - releasedAt type: object type: array rolloutStartedAt: description: |- RolloutStartedAt is the timestamp when the current rollout began. Set when the phase transitions to Pending or RollingOut, cleared on Running or failure. format: date-time type: string schemaVersion: description: SchemaVersion is the version of the CRD schema used when this resource was last reconciled type: string secretCheckRetries: description: |- SecretCheckRetries tracks how many times we've retried finding the Secret. This handles informer cache lag when the Secret is created just before the CR. format: int32 type: integer type: object type: object served: true storage: true subresources: status: {} ================================================ FILE: charts/llama-agents/crds/deploy.llamaindex.ai_llamadeploymenttemplates.yaml ================================================ --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.18.0 name: llamadeploymenttemplates.deploy.llamaindex.ai spec: group: deploy.llamaindex.ai names: kind: LlamaDeploymentTemplate listKind: LlamaDeploymentTemplateList plural: llamadeploymenttemplates singular: llamadeploymenttemplate scope: Namespaced versions: - additionalPrinterColumns: - jsonPath: .metadata.creationTimestamp name: Age type: date name: v1 schema: openAPIV3Schema: description: |- LlamaDeploymentTemplate configures default Pod template fields for LlamaDeployments. The resource name is referenced by LlamaDeployment.spec.templateName. A special name "default" is used as a fallback when no templateName is provided. properties: apiVersion: description: |- APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: description: |- Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object spec: description: |- LlamaDeploymentTemplateSpec defines the desired overlay for a LlamaDeployment's PodTemplate. This is intended to carry scheduling-related fields like node selectors, tolerations, and affinity, but supports any partial PodTemplateSpec. Fields set here will take precedence over the operator-computed defaults when merged. properties: podSpec: description: PodSpec holds a partial PodTemplateSpec to be merged into the generated PodTemplate. x-kubernetes-preserve-unknown-fields: true type: object status: type: string type: object served: true storage: true subresources: status: {} ================================================ FILE: charts/llama-agents/package.json ================================================ { "name": "llama-agents", "version": "0.12.3", "dependencies": { "llama-agents-appserver": "workspace:*", "llama-agents-control-plane": "workspace:*", "llama-agents-operator": "workspace:*" }, "helm": { "registry": "oci://docker.io/llamaindex" }, "syncValues": { "values.yaml": { "images.controlPlane.tag": "{llama-agents-control-plane:dockerTag}", "images.operator.tag": "{llama-agents-operator:dockerTag}", "images.appserver.tag": "{llama-agents-appserver:dockerTag}", "crds.version": "{llama-agents-crds:version}" } }, "postVersion": [ "helm-docs --chart-search-root . --sort-values-order file" ] } ================================================ FILE: charts/llama-agents/templates/_helpers.tpl ================================================ {{/* Common name helpers for the llama-agents chart. All resource names derive from these so a single rename propagates everywhere. */}} {{/* Chart name */}} {{- define "llama-agents.name" -}} llama-agents {{- end -}} {{/* Control plane deployment and related resources */}} {{- define "llama-agents.controlplane.name" -}} llama-agents-control-plane {{- end -}} {{/* Operator deployment and related resources */}} {{- define "llama-agents.operator.name" -}} llama-agents-operator {{- end -}} {{/* Main API service */}} {{- define "llama-agents.service.name" -}} llama-agents-service {{- end -}} {{/* Build API service */}} {{- define "llama-agents.build.name" -}} llama-agents-build {{- end -}} {{/* s3proxy ConfigMap/Secret name (shared by both resources) */}} {{- define "llama-agents.s3proxy.name" -}} llama-agents-s3proxy {{- end -}} {{/* Chart-rendered Secret holding inline control plane S3 creds */}} {{- define "llama-agents.controlplane.s3secret.name" -}} llama-agents-controlplane-s3 {{- end -}} {{/* Service account name — use value from values.yaml if set, otherwise chart name */}} {{- define "llama-agents.serviceAccountName" -}} {{- if .Values.serviceAccount.name -}} {{ .Values.serviceAccount.name }} {{- else -}} {{ include "llama-agents.name" . }} {{- end -}} {{- end -}} {{/* Namespace for LlamaDeployment CRs and child resources. Defaults to release namespace. */}} {{- define "llama-agents.apps.namespace" -}} {{- if and .Values.apps .Values.apps.namespace -}} {{ .Values.apps.namespace }} {{- else -}} {{ .Release.Namespace }} {{- end -}} {{- end -}} {{/* True when apps namespace differs from release namespace. */}} {{- define "llama-agents.apps.splitNamespace" -}} {{- if ne (include "llama-agents.apps.namespace" .) .Release.Namespace -}} true {{- end -}} {{- end -}} ================================================ FILE: charts/llama-agents/templates/_s3proxy.tpl ================================================ {{/* s3proxy sidecar container definition. Rendered into the control plane pod when `.Values.s3proxy.enabled` is true. */}} {{- define "llama-agents.s3proxy.container" -}} - name: s3proxy image: {{ .Values.s3proxy.image | quote }} imagePullPolicy: {{ .Values.s3proxy.imagePullPolicy | default "IfNotPresent" }} {{- with .Values.s3proxy.securityContext }} securityContext: {{- toYaml . | nindent 4 }} {{- end }} ports: - name: s3proxy containerPort: {{ int .Values.s3proxy.containerPort }} protocol: TCP env: - name: LOG_LEVEL value: {{ .Values.s3proxy.logLevel | default "info" | quote }} - name: S3PROXY_LOG_LEVEL value: {{ .Values.s3proxy.logLevel | default "info" | quote }} envFrom: - configMapRef: name: {{ include "llama-agents.s3proxy.name" . }} {{- include "llama-agents.secrets.s3proxy" . | nindent 2 }} {{- with .Values.s3proxy.resources }} resources: {{- toYaml . | nindent 4 }} {{- end }} volumeMounts: - name: s3proxy-tmp mountPath: /tmp subPath: tmp-dir {{- end -}} {{/* s3proxy ConfigMap data (non-secret config). */}} {{- define "llama-agents.s3proxy.configMapData" -}} S3PROXY_AUTHORIZATION: "none" S3PROXY_CORS_ALLOW_ORIGINS: "*" S3PROXY_ENDPOINT: {{ printf "http://0.0.0.0:%d" (int .Values.s3proxy.containerPort) | quote }} S3PROXY_IGNORE_UNKNOWN_HEADERS: "true" {{- end -}} {{/* s3proxy Secret data (passthrough of .Values.s3proxy.config, b64-encoded). */}} {{- define "llama-agents.s3proxy.secretData" -}} {{- range $key, $value := .Values.s3proxy.config }} {{ $key }}: {{ $value | toString | b64enc | quote }} {{- end }} {{- end -}} {{/* Endpoint URL the control plane should use to reach the sidecar on localhost. */}} {{- define "llama-agents.s3proxy.localEndpoint" -}} {{- printf "http://localhost:%d" (int .Values.s3proxy.containerPort) -}} {{- end -}} ================================================ FILE: charts/llama-agents/templates/_secrets.tpl ================================================ {{/* envFrom helpers. Each emits zero-or-one `- secretRef:` entries with silent BYO-over-inline precedence. Model: llamacloud's `_secrets.tpl`. */}} {{/* s3proxy sidecar: user-supplied `.secret` wins over chart-rendered Secret. Emits nothing when neither is set (sidecar boots without creds). */}} {{- define "llama-agents.secrets.s3proxy" -}} {{- if .Values.s3proxy.secret }} - secretRef: name: {{ .Values.s3proxy.secret }} {{- else if .Values.s3proxy.config }} - secretRef: name: {{ include "llama-agents.s3proxy.name" . }} {{- end }} {{- end -}} {{/* Control plane S3 creds. Precedence: s3.secret > outer secretRef (legacy alias) > chart-rendered-from-inline. Emits nothing when all three are unset. */}} {{- define "llama-agents.secrets.controlplaneS3" -}} {{- $os := .Values.controlPlane.objectStorage }} {{- if $os.s3.secret }} - secretRef: name: {{ $os.s3.secret }} {{- else if $os.secretRef }} - secretRef: name: {{ $os.secretRef }} {{- else if and $os.s3.accessKey $os.s3.secretKey }} - secretRef: name: {{ include "llama-agents.controlplane.s3secret.name" . }} {{- end }} {{- end -}} ================================================ FILE: charts/llama-agents/templates/controlplane-hpa.yaml ================================================ {{- if .Values.controlPlane.hpa.enabled }} apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ include "llama-agents.controlplane.name" . }} namespace: {{ .Release.Namespace }} labels: app: {{ include "llama-agents.controlplane.name" . }} spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: {{ include "llama-agents.controlplane.name" . }} minReplicas: {{ .Values.controlPlane.hpa.minReplicas }} maxReplicas: {{ .Values.controlPlane.hpa.maxReplicas }} metrics: {{- $hasMetric := false }} {{- if .Values.controlPlane.hpa.targetCPUUtilizationPercentage }} - type: Resource resource: name: cpu target: type: Utilization averageUtilization: {{ .Values.controlPlane.hpa.targetCPUUtilizationPercentage }} {{- $hasMetric = true }} {{- end }} {{- if .Values.controlPlane.hpa.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory target: type: Utilization averageUtilization: {{ .Values.controlPlane.hpa.targetMemoryUtilizationPercentage }} {{- $hasMetric = true }} {{- end }} {{- if not $hasMetric }} - type: Resource resource: name: cpu target: type: Utilization averageUtilization: 80 {{- end }} {{- end }} ================================================ FILE: charts/llama-agents/templates/controlplane-s3-secret.yaml ================================================ {{- $os := .Values.controlPlane.objectStorage }} {{- $s3 := $os.s3 }} {{- if or $s3.accessKey $s3.secretKey }} {{- if not (and $s3.accessKey $s3.secretKey) }} {{- fail "controlPlane.objectStorage.s3.accessKey and controlPlane.objectStorage.s3.secretKey must both be set" }} {{- end }} {{- if or $s3.secret $os.secretRef }} {{- /* BYO wins silently: skip chart Secret. */ -}} {{- else }} apiVersion: v1 kind: Secret metadata: name: {{ include "llama-agents.controlplane.s3secret.name" . }} namespace: {{ .Release.Namespace }} labels: app: {{ include "llama-agents.controlplane.name" . }} type: Opaque data: S3_ACCESS_KEY: {{ $s3.accessKey | b64enc | quote }} S3_SECRET_KEY: {{ $s3.secretKey | b64enc | quote }} {{- end }} {{- end }} ================================================ FILE: charts/llama-agents/templates/deployment.yaml ================================================ apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "llama-agents.controlplane.name" . }} namespace: {{ .Release.Namespace }} labels: app: {{ include "llama-agents.controlplane.name" . }} {{- with .Values.controlPlane.deployment.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: replicas: {{ .Values.controlPlane.replicas }} strategy: type: Recreate selector: matchLabels: app: {{ include "llama-agents.controlplane.name" . }} template: metadata: labels: app: {{ include "llama-agents.controlplane.name" . }} {{- with .Values.controlPlane.deployment.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} spec: {{- if .Values.serviceAccount.create }} serviceAccountName: {{ include "llama-agents.serviceAccountName" . }} {{- end }} securityContext: runAsNonRoot: true runAsUser: 1001 runAsGroup: 1001 fsGroup: 1001 containers: - name: app image: {{ .Values.images.controlPlane.repository }}:{{ .Values.images.controlPlane.tag }} imagePullPolicy: {{ .Values.images.controlPlane.pullPolicy }} securityContext: allowPrivilegeEscalation: false capabilities: drop: - "ALL" ports: - containerPort: {{ .Values.controlPlane.container.port }} name: http - containerPort: {{ .Values.controlPlane.buildApi.port }} name: build-api env: - name: KUBERNETES_NAMESPACE value: {{ include "llama-agents.apps.namespace" . | quote }} - name: DEFAULT_APPSERVER_IMAGE_TAG value: {{ .Values.controlPlane.defaultAppserverImageTag | default .Values.images.appserver.tag | quote }} - name: S3_ENDPOINT_URL {{- if .Values.controlPlane.objectStorage.s3.endpointUrl }} value: {{ .Values.controlPlane.objectStorage.s3.endpointUrl | quote }} {{- else if .Values.s3proxy.enabled }} value: {{ include "llama-agents.s3proxy.localEndpoint" . | quote }} {{- else }} value: "" {{- end }} - name: S3_BUCKET value: {{ required "controlPlane.objectStorage.s3.bucket is required" .Values.controlPlane.objectStorage.s3.bucket | quote }} - name: S3_REGION value: {{ .Values.controlPlane.objectStorage.s3.region | quote }} - name: S3_UNSIGNED {{- if kindIs "bool" .Values.controlPlane.objectStorage.s3.unsigned }} value: {{ .Values.controlPlane.objectStorage.s3.unsigned | quote }} {{- else if .Values.s3proxy.enabled }} value: "true" {{- else }} value: "false" {{- end }} - name: BUILD_S3_KEY_PREFIX value: {{ .Values.controlPlane.objectStorage.buildKeyPrefix | quote }} - name: BACKUP_S3_KEY_PREFIX value: {{ .Values.controlPlane.objectStorage.backupKeyPrefix | quote }} - name: CODE_REPO_S3_KEY_PREFIX value: {{ .Values.controlPlane.objectStorage.codeRepoKeyPrefix | quote }} {{- if .Values.controlPlane.container.env }} {{- toYaml .Values.controlPlane.container.env | nindent 8 }} {{- end }} {{- $os := .Values.controlPlane.objectStorage }} {{- $s3Secret := include "llama-agents.secrets.controlplaneS3" . | trim }} {{- if or .Values.controlPlane.container.envFrom $s3Secret $os.backupEncryptionSecretRef }} envFrom: {{- if .Values.controlPlane.container.envFrom }} {{- toYaml .Values.controlPlane.container.envFrom | nindent 8 }} {{- end }} {{- if $s3Secret }} {{- include "llama-agents.secrets.controlplaneS3" . | nindent 8 }} {{- end }} {{- if $os.backupEncryptionSecretRef }} - secretRef: name: {{ $os.backupEncryptionSecretRef }} {{- end }} {{- end }} {{- if .Values.controlPlane.container.startupProbe }} startupProbe: {{- toYaml .Values.controlPlane.container.startupProbe | nindent 10 }} {{- end }} {{- if .Values.controlPlane.container.livenessProbe }} livenessProbe: {{- toYaml .Values.controlPlane.container.livenessProbe | nindent 10 }} {{- end }} {{- if .Values.controlPlane.container.resources }} resources: {{- toYaml .Values.controlPlane.container.resources | nindent 10 }} {{- end }} {{- if .Values.s3proxy.enabled }} {{- include "llama-agents.s3proxy.container" . | nindent 6 }} volumes: - name: s3proxy-tmp emptyDir: {} {{- end }} ================================================ FILE: charts/llama-agents/templates/networkpolicy.yaml ================================================ {{- if .Values.networkPolicy.enabled }} # Egress restrictions for app pods. Lives in the apps namespace (NetworkPolicy # can only select pods in its own namespace). apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: llama-deployment-pods namespace: {{ include "llama-agents.apps.namespace" . }} labels: app: {{ include "llama-agents.controlplane.name" . }} component: deployment-pods spec: podSelector: matchLabels: app.kubernetes.io/managed-by: llama-deploy-operator {{- with .Values.networkPolicy.extraMatchExpressions }} matchExpressions: {{- toYaml . | nindent 4 }} {{- end }} policyTypes: - Egress egress: # Control plane build API (in the release namespace). - to: - namespaceSelector: matchLabels: kubernetes.io/metadata.name: {{ .Release.Namespace }} podSelector: matchLabels: app: {{ include "llama-agents.controlplane.name" . }} ports: - protocol: TCP port: {{ .Values.controlPlane.buildApi.port }} # Allow DNS resolution - to: - namespaceSelector: matchLabels: {{- toYaml .Values.networkPolicy.dns.namespaceSelector | nindent 10 }} podSelector: matchLabels: {{- toYaml .Values.networkPolicy.dns.podSelector | nindent 10 }} ports: - protocol: UDP port: 53 - protocol: TCP port: 53 # Allow Internet access - to: - ipBlock: cidr: 0.0.0.0/0 {{- if .Values.networkPolicy.blockPrivateRanges }} except: - 169.254.169.254/32 # AWS IMDS - 10.0.0.0/8 # Private ranges - 172.16.0.0/12 - 192.168.0.0/16 - 100.64.0.0/10 # Carrier-grade NAT {{- end }} {{- with .Values.networkPolicy.extraEgressRules }} {{- toYaml . | nindent 2 }} {{- end }} {{- end }} ================================================ FILE: charts/llama-agents/templates/operator-deployment-template.yaml ================================================ {{- if and .Values.operator.enabled .Values.operator.llamaDeploymentTemplate.enabled }} apiVersion: deploy.llamaindex.ai/v1 kind: LlamaDeploymentTemplate metadata: {{- with .Values.operator.llamaDeploymentTemplate.metadata }} {{- toYaml . | nindent 2 }} {{- end }} name: {{ .Values.operator.llamaDeploymentTemplate.name | default "default" }} namespace: {{ include "llama-agents.apps.namespace" . }} spec: {{- with .Values.operator.llamaDeploymentTemplate.spec }} {{- toYaml . | nindent 2 }} {{- end }} {{- end }} ================================================ FILE: charts/llama-agents/templates/operator-deployment.yaml ================================================ {{- if .Values.operator.enabled }} apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "llama-agents.operator.name" . }} namespace: {{ .Release.Namespace }} labels: app: {{ include "llama-agents.operator.name" . }} component: operator {{- with .Values.operator.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: replicas: {{ .Values.operator.replicas }} selector: matchLabels: app: {{ include "llama-agents.operator.name" . }} template: metadata: labels: app: {{ include "llama-agents.operator.name" . }} component: operator {{- with .Values.operator.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} spec: {{- if .Values.serviceAccount.create }} serviceAccountName: {{ include "llama-agents.serviceAccountName" . }} {{- end }} securityContext: runAsNonRoot: true runAsUser: 65532 runAsGroup: 65532 fsGroup: 65532 containers: - name: manager image: {{ .Values.images.operator.repository }}:{{ .Values.images.operator.tag }} imagePullPolicy: {{ .Values.images.operator.pullPolicy }} command: - /manager args: - --leader-elect {{- if .Values.metrics.enabled }} - --metrics-bind-address=:8080 - --metrics-secure=false {{- else }} - --metrics-bind-address=0 {{- end }} env: - name: WATCH_NAMESPACE value: {{ include "llama-agents.apps.namespace" . | quote }} - name: LLAMA_DEPLOY_SYSTEM_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace # Configure the default appserver image that operator will use for LlamaDeployments - name: LLAMA_DEPLOY_IMAGE value: {{ .Values.images.appserver.repository }} - name: LLAMA_DEPLOY_IMAGE_TAG value: {{ .Values.images.appserver.tag | quote }} - name: LLAMA_DEPLOY_IMAGE_PULL_POLICY value: {{ .Values.images.appserver.pullPolicy }} # Configure nginx sidecar image used in per-deployment pods - name: LLAMA_DEPLOY_NGINX_IMAGE value: {{ .Values.images.nginx.repository }} - name: LLAMA_DEPLOY_NGINX_IMAGE_TAG value: {{ .Values.images.nginx.tag }} - name: LLAMA_DEPLOY_NGINX_IMAGE_PULL_POLICY value: {{ .Values.images.nginx.pullPolicy }} # Default resource request overrides for app containers managed by operator - name: LLAMA_DEPLOY_DEFAULT_CPU_REQUEST value: {{ .Values.operator.defaultAppRequests.cpu | default "750m" | quote }} - name: LLAMA_DEPLOY_DEFAULT_MEMORY_REQUEST value: {{ .Values.operator.defaultAppRequests.memory | default "2Gi" | quote }} # Default resource limit overrides for app containers managed by operator - name: LLAMA_DEPLOY_DEFAULT_CPU_LIMIT value: {{ .Values.operator.defaultAppLimits.cpu | default "" | quote }} - name: LLAMA_DEPLOY_DEFAULT_MEMORY_LIMIT value: {{ .Values.operator.defaultAppLimits.memory | default "4096Mi" | quote }} # Rollout timeout for managed deployments - name: LLAMA_DEPLOY_ROLLOUT_TIMEOUT_SECONDS value: {{ .Values.operator.rolloutTimeoutSeconds | default "1800" | quote }} # Max concurrent rollouts (0 = unlimited, default: 10) - name: LLAMA_DEPLOY_MAX_CONCURRENT_ROLLOUTS value: {{ .Values.operator.maxConcurrentRollouts | default "10" | quote }} # Max total active deployments per namespace (0 = unlimited) - name: LLAMA_DEPLOY_MAX_DEPLOYMENTS value: {{ .Values.operator.maxDeployments | default "0" | quote }} # Build API service address for git proxy - name: LLAMA_DEPLOY_BUILD_API_HOST value: "{{ include "llama-agents.build.name" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.controlPlane.buildApi.port | default 8001 }}" {{- if .Values.operator.env }} # Additional custom environment variables {{- toYaml .Values.operator.env | nindent 8 }} {{- end }} livenessProbe: httpGet: path: /healthz port: 8081 initialDelaySeconds: 15 periodSeconds: 20 readinessProbe: httpGet: path: /readyz port: 8081 initialDelaySeconds: 5 periodSeconds: 10 ports: - name: metrics containerPort: 8080 protocol: TCP resources: {{- toYaml .Values.operator.resources | nindent 10 }} securityContext: allowPrivilegeEscalation: false capabilities: drop: - "ALL" {{- end }} ================================================ FILE: charts/llama-agents/templates/operator-hpa.yaml ================================================ {{- if and .Values.operator.enabled .Values.operator.hpa.enabled }} apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ include "llama-agents.operator.name" . }} namespace: {{ .Release.Namespace }} labels: app: {{ include "llama-agents.operator.name" . }} component: operator spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: {{ include "llama-agents.operator.name" . }} minReplicas: {{ .Values.operator.hpa.minReplicas }} maxReplicas: {{ .Values.operator.hpa.maxReplicas }} metrics: {{- $hasMetric := false }} {{- if .Values.operator.hpa.targetCPUUtilizationPercentage }} - type: Resource resource: name: cpu target: type: Utilization averageUtilization: {{ .Values.operator.hpa.targetCPUUtilizationPercentage }} {{- $hasMetric = true }} {{- end }} {{- if .Values.operator.hpa.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory target: type: Utilization averageUtilization: {{ .Values.operator.hpa.targetMemoryUtilizationPercentage }} {{- $hasMetric = true }} {{- end }} {{- if not $hasMetric }} - type: Resource resource: name: cpu target: type: Utilization averageUtilization: 80 {{- end }} {{- end }} ================================================ FILE: charts/llama-agents/templates/rbac.yaml ================================================ {{- if .Values.rbac.create }} {{- $appsNs := include "llama-agents.apps.namespace" . -}} {{- $releaseNs := .Release.Namespace -}} {{- $split := include "llama-agents.apps.splitNamespace" . -}} {{- $saName := include "llama-agents.serviceAccountName" . -}} {{- /* Split mode (apps != release): apps-ns Role with everything except leases, release-ns Role with only leases (leader-election Lease lives in the operator pod's namespace). Single-namespace mode: one combined Role. */ -}} --- apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: {{ $saName }} namespace: {{ $appsNs }} {{- with .Values.rbac.roleAnnotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} rules: - apiGroups: [''] resources: ['configmaps', 'secrets', 'serviceaccounts', 'services'] verbs: ['create', 'delete', 'get', 'list', 'patch', 'update', 'watch'] - apiGroups: [''] resources: ['events'] verbs: ['create', 'get', 'list', 'patch', 'watch'] - apiGroups: [''] resources: ['pods'] verbs: ['get', 'list', 'watch'] - apiGroups: [''] resources: ['pods/log'] verbs: ['get'] - apiGroups: ['apps'] resources: ['deployments'] verbs: ['create', 'delete', 'get', 'list', 'patch', 'update', 'watch'] - apiGroups: ['apps'] resources: ['replicasets'] verbs: ['get', 'list', 'patch', 'update', 'watch'] - apiGroups: ['batch'] resources: ['jobs'] verbs: ['create', 'delete', 'get', 'list', 'patch', 'update', 'watch'] {{- if not $split }} - apiGroups: ['coordination.k8s.io'] resources: ['leases'] verbs: ['create', 'delete', 'get', 'list', 'patch', 'update', 'watch'] {{- end }} - apiGroups: ['deploy.llamaindex.ai'] resources: ['llamadeployments'] verbs: ['create', 'delete', 'get', 'list', 'patch', 'update', 'watch'] - apiGroups: ['deploy.llamaindex.ai'] resources: ['llamadeployments/finalizers'] verbs: ['update'] - apiGroups: ['deploy.llamaindex.ai'] resources: ['llamadeployments/status'] verbs: ['get', 'patch', 'update'] - apiGroups: ['deploy.llamaindex.ai'] resources: ['llamadeploymenttemplates'] verbs: ['get', 'list', 'watch'] - apiGroups: ['networking.k8s.io'] resources: ['ingresses', 'networkpolicies'] verbs: ['create', 'delete', 'get', 'list', 'patch', 'update', 'watch'] --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: {{ $saName }} namespace: {{ $appsNs }} {{- with .Values.rbac.roleBindingAnnotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} roleRef: apiGroup: rbac.authorization.k8s.io kind: Role name: {{ $saName }} subjects: - kind: ServiceAccount name: {{ $saName }} namespace: {{ $releaseNs }} {{- if $split }} --- # Leader-election Lease lives in the operator pod's namespace. apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: {{ $saName }}-leader-election namespace: {{ $releaseNs }} {{- with .Values.rbac.roleAnnotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} rules: - apiGroups: ['coordination.k8s.io'] resources: ['leases'] verbs: ['create', 'delete', 'get', 'list', 'patch', 'update', 'watch'] --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: {{ $saName }}-leader-election namespace: {{ $releaseNs }} {{- with .Values.rbac.roleBindingAnnotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} roleRef: apiGroup: rbac.authorization.k8s.io kind: Role name: {{ $saName }}-leader-election subjects: - kind: ServiceAccount name: {{ $saName }} namespace: {{ $releaseNs }} {{- end }} {{- end }} ================================================ FILE: charts/llama-agents/templates/s3proxy-configmap.yaml ================================================ {{- if .Values.s3proxy.enabled }} apiVersion: v1 kind: ConfigMap metadata: name: {{ include "llama-agents.s3proxy.name" . }} namespace: {{ .Release.Namespace }} labels: app: {{ include "llama-agents.controlplane.name" . }} data: {{- include "llama-agents.s3proxy.configMapData" . | nindent 2 }} {{- end }} ================================================ FILE: charts/llama-agents/templates/s3proxy-secret.yaml ================================================ {{- if and .Values.s3proxy.enabled (not .Values.s3proxy.secret) .Values.s3proxy.config }} apiVersion: v1 kind: Secret metadata: name: {{ include "llama-agents.s3proxy.name" . }} namespace: {{ .Release.Namespace }} labels: app: {{ include "llama-agents.controlplane.name" . }} type: Opaque data: {{- include "llama-agents.s3proxy.secretData" . | nindent 2 }} {{- end }} ================================================ FILE: charts/llama-agents/templates/service.yaml ================================================ apiVersion: v1 kind: Service metadata: name: {{ include "llama-agents.service.name" . }} namespace: {{ .Release.Namespace }} labels: app: {{ include "llama-agents.controlplane.name" . }} {{- with .Values.controlPlane.service.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: type: {{ .Values.controlPlane.service.type }} ports: - port: {{ .Values.controlPlane.service.port }} targetPort: {{ .Values.controlPlane.container.port }} protocol: TCP name: http selector: app: {{ include "llama-agents.controlplane.name" . }} --- # Build API service for git proxy - accessible only within cluster apiVersion: v1 kind: Service metadata: name: {{ include "llama-agents.build.name" . }} namespace: {{ .Release.Namespace }} labels: app: {{ include "llama-agents.controlplane.name" . }} component: build-api spec: type: ClusterIP ports: - port: {{ .Values.controlPlane.buildApi.port | default 8001 }} targetPort: {{ .Values.controlPlane.buildApi.port | default 8001 }} protocol: TCP name: build-api selector: app: {{ include "llama-agents.controlplane.name" . }} --- apiVersion: v1 kind: Service metadata: name: {{ include "llama-agents.operator.name" . }} namespace: {{ .Release.Namespace }} labels: app: {{ include "llama-agents.operator.name" . }} component: operator spec: type: ClusterIP selector: app: {{ include "llama-agents.operator.name" . }} ports: - name: metrics port: 8080 targetPort: 8080 protocol: TCP ================================================ FILE: charts/llama-agents/templates/serviceaccount.yaml ================================================ {{- if .Values.serviceAccount.create }} apiVersion: v1 kind: ServiceAccount metadata: name: {{ include "llama-agents.serviceAccountName" . }} namespace: {{ .Release.Namespace }} {{- with .Values.serviceAccount.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} {{- end }} ================================================ FILE: charts/llama-agents/templates/servicemonitor.yaml ================================================ {{- if .Values.metrics.enabled }} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ include "llama-agents.controlplane.name" . }} namespace: {{ .Release.Namespace }} labels: app: {{ include "llama-agents.controlplane.name" . }} {{- with .Values.metrics.additionalMonitorLabels }} {{ toYaml . | indent 4 }} {{- end }} spec: selector: matchLabels: app: {{ include "llama-agents.controlplane.name" . }} endpoints: - port: http path: /metrics interval: {{ .Values.metrics.scrapeInterval | default "30s" }} scrapeTimeout: {{ .Values.metrics.scrapeTimeout | default "10s" }} --- apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ include "llama-agents.build.name" . }} namespace: {{ .Release.Namespace }} labels: app: {{ include "llama-agents.controlplane.name" . }} component: build-api {{- with .Values.metrics.additionalMonitorLabels }} {{ toYaml . | indent 4 }} {{- end }} spec: selector: matchLabels: app: {{ include "llama-agents.controlplane.name" . }} component: build-api endpoints: - port: build-api path: /metrics interval: {{ .Values.metrics.scrapeInterval | default "30s" }} scrapeTimeout: {{ .Values.metrics.scrapeTimeout | default "10s" }} --- apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: llama-deploy-appservers namespace: {{ .Release.Namespace }} labels: app.kubernetes.io/part-of: {{ include "llama-agents.name" . }} {{- with .Values.metrics.additionalMonitorLabels }} {{ toYaml . | indent 4 }} {{- end }} spec: namespaceSelector: any: true selector: matchLabels: app.kubernetes.io/managed-by: llama-deploy-operator component: appserver endpoints: - port: http path: /metrics interval: {{ .Values.metrics.scrapeInterval | default "30s" }} scrapeTimeout: {{ .Values.metrics.scrapeTimeout | default "10s" }} --- apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ include "llama-agents.operator.name" . }} namespace: {{ .Release.Namespace }} labels: app: {{ include "llama-agents.operator.name" . }} component: operator {{- with .Values.metrics.additionalMonitorLabels }} {{ toYaml . | indent 4 }} {{- end }} spec: selector: matchLabels: app: {{ include "llama-agents.operator.name" . }} endpoints: - port: metrics interval: {{ .Values.metrics.scrapeInterval | default "30s" }} scrapeTimeout: {{ .Values.metrics.scrapeTimeout | default "10s" }} {{- end }} ================================================ FILE: charts/llama-agents/tests/apps_namespace_test.yaml ================================================ suite: apps.namespace — single- and split-namespace modes templates: - templates/operator-deployment.yaml - templates/deployment.yaml - templates/rbac.yaml - templates/networkpolicy.yaml - templates/operator-deployment-template.yaml set: controlPlane: objectStorage: s3: bucket: "test-bucket" tests: # ---------- Unset apps.namespace — single-namespace mode ---------- - it: WATCH_NAMESPACE defaults to release namespace release: namespace: llama-agents template: templates/operator-deployment.yaml asserts: - contains: path: spec.template.spec.containers[0].env content: name: WATCH_NAMESPACE value: "llama-agents" - contains: path: spec.template.spec.containers[0].env content: name: LLAMA_DEPLOY_SYSTEM_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace - it: control plane KUBERNETES_NAMESPACE defaults to release namespace release: namespace: llama-agents template: templates/deployment.yaml asserts: - contains: path: spec.template.spec.containers[0].env content: name: KUBERNETES_NAMESPACE value: "llama-agents" - it: single combined Role in release namespace release: namespace: llama-agents template: templates/rbac.yaml asserts: - hasDocuments: count: 2 # Role + RoleBinding only - documentIndex: 0 equal: path: kind value: Role - documentIndex: 0 equal: path: metadata.namespace value: llama-agents - documentIndex: 0 contains: path: rules content: apiGroups: ['coordination.k8s.io'] resources: ['leases'] verbs: ['create', 'delete', 'get', 'list', 'patch', 'update', 'watch'] - it: NetworkPolicy lives in release namespace release: namespace: llama-agents template: templates/networkpolicy.yaml asserts: - equal: path: metadata.namespace value: llama-agents # ---------- apps.namespace set — split mode ---------- - it: split WATCH_NAMESPACE points at apps namespace release: namespace: llama-agents set: apps: namespace: llama-agents-apps template: templates/operator-deployment.yaml asserts: - contains: path: spec.template.spec.containers[0].env content: name: WATCH_NAMESPACE value: "llama-agents-apps" - it: split control plane KUBERNETES_NAMESPACE points at apps namespace release: namespace: llama-agents set: apps: namespace: llama-agents-apps template: templates/deployment.yaml asserts: - contains: path: spec.template.spec.containers[0].env content: name: KUBERNETES_NAMESPACE value: "llama-agents-apps" - it: split renders two Roles — apps Role sans leases, release Role with only leases release: namespace: llama-agents set: apps: namespace: llama-agents-apps template: templates/rbac.yaml asserts: - hasDocuments: count: 4 # apps Role + RB, leader-election Role + RB - documentIndex: 0 equal: path: kind value: Role - documentIndex: 0 equal: path: metadata.namespace value: llama-agents-apps - documentIndex: 0 notContains: path: rules content: apiGroups: ['coordination.k8s.io'] resources: ['leases'] verbs: ['create', 'delete', 'get', 'list', 'patch', 'update', 'watch'] - documentIndex: 1 equal: path: kind value: RoleBinding - documentIndex: 1 equal: path: metadata.namespace value: llama-agents-apps - documentIndex: 1 equal: path: subjects[0].namespace value: llama-agents - documentIndex: 2 equal: path: kind value: Role - documentIndex: 2 equal: path: metadata.namespace value: llama-agents - documentIndex: 2 contains: path: rules content: apiGroups: ['coordination.k8s.io'] resources: ['leases'] verbs: ['create', 'delete', 'get', 'list', 'patch', 'update', 'watch'] - documentIndex: 3 equal: path: kind value: RoleBinding - documentIndex: 3 equal: path: metadata.namespace value: llama-agents - it: split NetworkPolicy lives in apps namespace with namespaceSelector to release ns release: namespace: llama-agents set: apps: namespace: llama-agents-apps template: templates/networkpolicy.yaml asserts: - equal: path: metadata.namespace value: llama-agents-apps - equal: path: spec.egress[0].to[0].namespaceSelector.matchLabels["kubernetes.io/metadata.name"] value: llama-agents - it: split LlamaDeploymentTemplate lands in apps namespace release: namespace: llama-agents set: apps: namespace: llama-agents-apps operator: llamaDeploymentTemplate: enabled: true template: templates/operator-deployment-template.yaml asserts: - equal: path: metadata.namespace value: llama-agents-apps # ---------- apps.namespace equal to release namespace — single-ns output ---------- - it: apps.namespace equal to release namespace collapses to single Role release: namespace: llama-agents set: apps: namespace: llama-agents template: templates/rbac.yaml asserts: - hasDocuments: count: 2 ================================================ FILE: charts/llama-agents/tests/object_storage_test.yaml ================================================ suite: Control plane object storage configuration templates: - templates/deployment.yaml - templates/controlplane-s3-secret.yaml tests: - it: fails when objectStorage bucket is not set (default) template: templates/deployment.yaml asserts: - failedTemplate: errorMessage: "controlPlane.objectStorage.s3.bucket is required" - it: sets S3 env vars when objectStorage bucket is configured template: templates/deployment.yaml set: controlPlane: objectStorage: s3: endpointUrl: "https://s3.example.com" bucket: "my-bucket" region: "us-west-2" asserts: - contains: path: spec.template.spec.containers[0].env content: name: S3_ENDPOINT_URL value: "https://s3.example.com" - contains: path: spec.template.spec.containers[0].env content: name: S3_BUCKET value: "my-bucket" - contains: path: spec.template.spec.containers[0].env content: name: S3_REGION value: "us-west-2" - contains: path: spec.template.spec.containers[0].env content: name: S3_UNSIGNED value: "false" - contains: path: spec.template.spec.containers[0].env content: name: BACKUP_S3_KEY_PREFIX value: "backups" - contains: path: spec.template.spec.containers[0].env content: name: CODE_REPO_S3_KEY_PREFIX value: "git" - it: sets S3_UNSIGNED to true when unsigned is enabled template: templates/deployment.yaml set: controlPlane: objectStorage: s3: bucket: "my-bucket" unsigned: true asserts: - contains: path: spec.template.spec.containers[0].env content: name: S3_UNSIGNED value: "true" - it: sets envFrom with objectStorage secretRef template: templates/deployment.yaml set: controlPlane: objectStorage: s3: endpointUrl: "https://s3.example.com" bucket: "my-bucket" region: "us-west-2" secretRef: "s3-credentials" asserts: - contains: path: spec.template.spec.containers[0].envFrom content: secretRef: name: "s3-credentials" - it: sets envFrom with backup encryptionSecretRef template: templates/deployment.yaml set: controlPlane: objectStorage: s3: bucket: "my-bucket" backupEncryptionSecretRef: "backup-encryption" asserts: - contains: path: spec.template.spec.containers[0].envFrom content: secretRef: name: "backup-encryption" - it: does not set envFrom when no secretRefs configured template: templates/deployment.yaml set: controlPlane: objectStorage: s3: endpointUrl: "https://s3.example.com" bucket: "my-bucket" region: "us-west-2" asserts: - notExists: path: spec.template.spec.containers[0].envFrom - it: merges all envFrom sources template: templates/deployment.yaml set: controlPlane: objectStorage: s3: endpointUrl: "https://s3.example.com" bucket: "my-bucket" region: "us-west-2" secretRef: "s3-credentials" backupEncryptionSecretRef: "backup-encryption" container: envFrom: - configMapRef: name: "my-config" asserts: - contains: path: spec.template.spec.containers[0].envFrom content: configMapRef: name: "my-config" - contains: path: spec.template.spec.containers[0].envFrom content: secretRef: name: "s3-credentials" - contains: path: spec.template.spec.containers[0].envFrom content: secretRef: name: "backup-encryption" # --- inline S3 creds --- - it: renders a chart Secret with inline accessKey and secretKey set: controlPlane: objectStorage: s3: bucket: "my-bucket" accessKey: "AKIAEXAMPLE" secretKey: "SECRETEXAMPLE" template: templates/controlplane-s3-secret.yaml asserts: - isKind: of: Secret - equal: path: metadata.name value: llama-agents-controlplane-s3 - equal: path: type value: Opaque - equal: path: data.S3_ACCESS_KEY value: QUtJQUVYQU1QTEU= - equal: path: data.S3_SECRET_KEY value: U0VDUkVURVhBTVBMRQ== - it: wires envFrom to the chart-rendered Secret when inline creds are set template: templates/deployment.yaml set: controlPlane: objectStorage: s3: bucket: "my-bucket" accessKey: "AKIAEXAMPLE" secretKey: "SECRETEXAMPLE" asserts: - contains: path: spec.template.spec.containers[0].envFrom content: secretRef: name: "llama-agents-controlplane-s3" - it: does not render the chart Secret when inline creds are unset set: controlPlane: objectStorage: s3: bucket: "my-bucket" template: templates/controlplane-s3-secret.yaml asserts: - hasDocuments: count: 0 - it: fails when only accessKey is set set: controlPlane: objectStorage: s3: bucket: "my-bucket" accessKey: "AKIAEXAMPLE" template: templates/controlplane-s3-secret.yaml asserts: - failedTemplate: errorMessage: "controlPlane.objectStorage.s3.accessKey and controlPlane.objectStorage.s3.secretKey must both be set" - it: fails when only secretKey is set set: controlPlane: objectStorage: s3: bucket: "my-bucket" secretKey: "SECRETEXAMPLE" template: templates/controlplane-s3-secret.yaml asserts: - failedTemplate: errorMessage: "controlPlane.objectStorage.s3.accessKey and controlPlane.objectStorage.s3.secretKey must both be set" # --- s3.secret BYO --- - it: skips chart Secret and envFroms the user Secret when s3.secret is set set: controlPlane: objectStorage: s3: bucket: "my-bucket" secret: "my-s3-creds" asserts: - template: templates/controlplane-s3-secret.yaml hasDocuments: count: 0 - template: templates/deployment.yaml contains: path: spec.template.spec.containers[0].envFrom content: secretRef: name: "my-s3-creds" # --- precedence --- - it: prefers s3.secret over inline creds set: controlPlane: objectStorage: s3: bucket: "my-bucket" accessKey: "AKIAEXAMPLE" secretKey: "SECRETEXAMPLE" secret: "my-s3-creds" asserts: - template: templates/controlplane-s3-secret.yaml hasDocuments: count: 0 - template: templates/deployment.yaml contains: path: spec.template.spec.containers[0].envFrom content: secretRef: name: "my-s3-creds" - template: templates/deployment.yaml notContains: path: spec.template.spec.containers[0].envFrom content: secretRef: name: "llama-agents-controlplane-s3" - it: prefers s3.secret over legacy secretRef set: controlPlane: objectStorage: s3: bucket: "my-bucket" secret: "my-s3-creds" secretRef: "legacy-creds" asserts: - template: templates/deployment.yaml contains: path: spec.template.spec.containers[0].envFrom content: secretRef: name: "my-s3-creds" - template: templates/deployment.yaml notContains: path: spec.template.spec.containers[0].envFrom content: secretRef: name: "legacy-creds" - it: prefers legacy secretRef over inline creds set: controlPlane: objectStorage: s3: bucket: "my-bucket" accessKey: "AKIAEXAMPLE" secretKey: "SECRETEXAMPLE" secretRef: "legacy-creds" asserts: - template: templates/controlplane-s3-secret.yaml hasDocuments: count: 0 - template: templates/deployment.yaml contains: path: spec.template.spec.containers[0].envFrom content: secretRef: name: "legacy-creds" ================================================ FILE: charts/llama-agents/tests/operator_image_tag_env_test.yaml ================================================ suite: Operator env - LLAMA_DEPLOY_IMAGE_TAG templates: - templates/operator-deployment.yaml tests: - it: defaults LLAMA_DEPLOY_IMAGE_TAG to appVersion asserts: - contains: path: spec.template.spec.containers[0].env content: name: LLAMA_DEPLOY_IMAGE_TAG any: true - it: sets LLAMA_DEPLOY_IMAGE_TAG when images.appserver.tag is provided set: images: appserver: tag: v9.9.9 asserts: - contains: path: spec.template.spec.containers[0].env content: name: LLAMA_DEPLOY_IMAGE_TAG value: "v9.9.9" ================================================ FILE: charts/llama-agents/tests/s3proxy_test.yaml ================================================ suite: s3proxy sidecar configuration templates: - templates/deployment.yaml - templates/s3proxy-configmap.yaml - templates/s3proxy-secret.yaml set: controlPlane: objectStorage: s3: bucket: "my-bucket" tests: # --- disabled (default) --- - it: does not render s3proxy ConfigMap or Secret when disabled asserts: - hasDocuments: count: 0 template: templates/s3proxy-configmap.yaml - hasDocuments: count: 0 template: templates/s3proxy-secret.yaml - it: deployment has a single container and no s3proxy volume when disabled template: templates/deployment.yaml asserts: - lengthEqual: path: spec.template.spec.containers count: 1 - equal: path: spec.template.spec.containers[0].name value: app - notExists: path: spec.template.spec.volumes - contains: path: spec.template.spec.containers[0].env content: name: S3_ENDPOINT_URL value: "" - contains: path: spec.template.spec.containers[0].env content: name: S3_UNSIGNED value: "false" # --- enabled: ConfigMap / Secret --- - it: renders the s3proxy ConfigMap when enabled set: s3proxy: enabled: true template: templates/s3proxy-configmap.yaml asserts: - isKind: of: ConfigMap - equal: path: metadata.name value: llama-agents-s3proxy - equal: path: data.S3PROXY_AUTHORIZATION value: "none" - equal: path: data.S3PROXY_CORS_ALLOW_ORIGINS value: "*" - equal: path: data.S3PROXY_ENDPOINT value: "http://0.0.0.0:8080" - equal: path: data.S3PROXY_IGNORE_UNKNOWN_HEADERS value: "true" - it: renders the s3proxy Secret with b64-encoded config entries set: s3proxy: enabled: true config: JCLOUDS_PROVIDER: azureblob JCLOUDS_IDENTITY: my-id JCLOUDS_CREDENTIAL: my-secret template: templates/s3proxy-secret.yaml asserts: - isKind: of: Secret - equal: path: metadata.name value: llama-agents-s3proxy - equal: path: type value: Opaque - equal: path: data.JCLOUDS_PROVIDER value: YXp1cmVibG9i - equal: path: data.JCLOUDS_IDENTITY value: bXktaWQ= - equal: path: data.JCLOUDS_CREDENTIAL value: bXktc2VjcmV0 # --- enabled: deployment injection --- - it: injects s3proxy sidecar and volume when enabled set: s3proxy: enabled: true template: templates/deployment.yaml asserts: - lengthEqual: path: spec.template.spec.containers count: 2 - equal: path: spec.template.spec.containers[1].name value: s3proxy - equal: path: spec.template.spec.containers[1].image value: docker.io/andrewgaul/s3proxy:3.1.0 - equal: path: spec.template.spec.containers[1].ports[0].containerPort value: 8080 - contains: path: spec.template.spec.containers[1].envFrom content: configMapRef: name: llama-agents-s3proxy - lengthEqual: path: spec.template.spec.containers[1].envFrom count: 1 - equal: path: spec.template.spec.containers[1].volumeMounts[0].name value: s3proxy-tmp - equal: path: spec.template.spec.containers[1].volumeMounts[0].mountPath value: /tmp - equal: path: spec.template.spec.containers[1].volumeMounts[0].subPath value: tmp-dir - contains: path: spec.template.spec.volumes content: name: s3proxy-tmp emptyDir: {} - it: does not render the sidecar Secret when no config or secret is set set: s3proxy: enabled: true template: templates/s3proxy-secret.yaml asserts: - hasDocuments: count: 0 - it: renders chart Secret and envFrom at chart name when only config is set set: s3proxy: enabled: true config: JCLOUDS_PROVIDER: azureblob asserts: - template: templates/s3proxy-secret.yaml hasDocuments: count: 1 - template: templates/deployment.yaml contains: path: spec.template.spec.containers[1].envFrom content: secretRef: name: llama-agents-s3proxy - it: skips chart Secret and envFroms the user-supplied Secret when only secret is set set: s3proxy: enabled: true secret: my-s3proxy-secret asserts: - template: templates/s3proxy-secret.yaml hasDocuments: count: 0 - template: templates/deployment.yaml contains: path: spec.template.spec.containers[1].envFrom content: secretRef: name: my-s3proxy-secret - it: prefers secret over config (silent precedence) set: s3proxy: enabled: true config: JCLOUDS_PROVIDER: azureblob secret: my-s3proxy-secret asserts: - template: templates/s3proxy-secret.yaml hasDocuments: count: 0 - template: templates/deployment.yaml contains: path: spec.template.spec.containers[1].envFrom content: secretRef: name: my-s3proxy-secret - template: templates/deployment.yaml notContains: path: spec.template.spec.containers[1].envFrom content: secretRef: name: llama-agents-s3proxy - it: defaults S3_ENDPOINT_URL to localhost and S3_UNSIGNED to true when enabled set: s3proxy: enabled: true template: templates/deployment.yaml asserts: - contains: path: spec.template.spec.containers[0].env content: name: S3_ENDPOINT_URL value: "http://localhost:8080" - contains: path: spec.template.spec.containers[0].env content: name: S3_UNSIGNED value: "true" - it: honors explicit endpointUrl override when s3proxy is enabled set: s3proxy: enabled: true controlPlane: objectStorage: s3: bucket: "my-bucket" endpointUrl: "https://s3.example.com" template: templates/deployment.yaml asserts: - contains: path: spec.template.spec.containers[0].env content: name: S3_ENDPOINT_URL value: "https://s3.example.com" - it: honors explicit unsigned=false override when s3proxy is enabled set: s3proxy: enabled: true controlPlane: objectStorage: s3: bucket: "my-bucket" unsigned: false template: templates/deployment.yaml asserts: - contains: path: spec.template.spec.containers[0].env content: name: S3_UNSIGNED value: "false" # --- sidecar overrides --- - it: uses a custom containerPort for the sidecar and the localhost URL set: s3proxy: enabled: true containerPort: 9000 template: templates/deployment.yaml asserts: - equal: path: spec.template.spec.containers[1].ports[0].containerPort value: 9000 - contains: path: spec.template.spec.containers[0].env content: name: S3_ENDPOINT_URL value: "http://localhost:9000" - it: uses custom containerPort in the ConfigMap's S3PROXY_ENDPOINT set: s3proxy: enabled: true containerPort: 9000 template: templates/s3proxy-configmap.yaml asserts: - equal: path: data.S3PROXY_ENDPOINT value: "http://0.0.0.0:9000" - it: uses a custom image when specified set: s3proxy: enabled: true image: custom-registry/s3proxy:custom-tag template: templates/deployment.yaml asserts: - equal: path: spec.template.spec.containers[1].image value: custom-registry/s3proxy:custom-tag - it: applies custom resources to the sidecar set: s3proxy: enabled: true resources: requests: cpu: 250m memory: 256Mi limits: cpu: "2" memory: 2Gi template: templates/deployment.yaml asserts: - equal: path: spec.template.spec.containers[1].resources.requests.cpu value: 250m - equal: path: spec.template.spec.containers[1].resources.requests.memory value: 256Mi - equal: path: spec.template.spec.containers[1].resources.limits.cpu value: "2" - equal: path: spec.template.spec.containers[1].resources.limits.memory value: 2Gi - it: omits securityContext when not specified set: s3proxy: enabled: true template: templates/deployment.yaml asserts: - isNull: path: spec.template.spec.containers[1].securityContext - it: renders securityContext when specified set: s3proxy: enabled: true securityContext: allowPrivilegeEscalation: false capabilities: drop: - ALL template: templates/deployment.yaml asserts: - equal: path: spec.template.spec.containers[1].securityContext.allowPrivilegeEscalation value: false - equal: path: spec.template.spec.containers[1].securityContext.capabilities.drop[0] value: ALL ================================================ FILE: charts/llama-agents/tests/servicemonitor_test.yaml ================================================ suite: ServiceMonitor metadata labels templates: - templates/servicemonitor.yaml tests: - it: puts additionalMonitorLabels under metadata.labels across all ServiceMonitors set: metrics: enabled: true additionalMonitorLabels: release: prometheus asserts: - equal: path: metadata.labels.release value: prometheus documentIndex: 0 - equal: path: metadata.labels.release value: prometheus documentIndex: 1 - equal: path: metadata.labels.release value: prometheus documentIndex: 2 - equal: path: metadata.labels.release value: prometheus documentIndex: 3 ================================================ FILE: charts/llama-agents/values.yaml ================================================ metrics: # -- Enable Prometheus ServiceMonitors # @section -- Metrics enabled: false # -- Scrape interval for ServiceMonitors # @section -- Metrics scrapeInterval: 30s # -- Scrape timeout for ServiceMonitors # @section -- Metrics scrapeTimeout: 10s # -- Extra labels added to ServiceMonitors for Prometheus discovery (e.g., `release: prometheus`) # @section -- Metrics additionalMonitorLabels: {} images: controlPlane: # -- Control plane image repository # @section -- Images repository: llamaindex/llama-agents-control-plane # -- Control plane image tag # @section -- Images tag: "0.12.2" # -- Control plane image pull policy # @section -- Images pullPolicy: IfNotPresent operator: # -- Operator image repository # @section -- Images repository: llamaindex/llama-agents-operator # -- Operator image tag # @section -- Images tag: "0.11.1" # -- Operator image pull policy # @section -- Images pullPolicy: IfNotPresent appserver: # -- Appserver image repository (used by operator for managed pods) # @section -- Images repository: llamaindex/llama-agents-appserver # -- Appserver image tag # @section -- Images tag: "0.11.4" # -- Appserver image pull policy # @section -- Images pullPolicy: IfNotPresent nginx: # -- Nginx sidecar image repository # @section -- Images repository: nginxinc/nginx-unprivileged # -- Nginx sidecar image tag # @section -- Images tag: "1.27-alpine" # -- Nginx sidecar image pull policy # @section -- Images pullPolicy: IfNotPresent controlPlane: # -- Number of control plane replicas # @section -- Control Plane replicas: 1 container: # -- Control plane API port # @section -- Control Plane port: 8000 # -- Extra environment variables for the control plane container # @section -- Control Plane env: [] # -- Extra envFrom sources (secretRef, configMapRef) for the control plane container # @section -- Control Plane envFrom: [] # -- Resource requests/limits for the control plane container # @default -- `{requests: {cpu: 100m, memory: 256Mi, ephemeral-storage: 500Mi}}` # @section -- Control Plane resources: requests: cpu: 100m memory: 256Mi ephemeral-storage: 500Mi # -- Startup probe configuration # @section -- Control Plane startupProbe: {} # -- Liveness probe configuration # @section -- Control Plane livenessProbe: {} deployment: # -- Annotations for the control plane Deployment # @section -- Control Plane annotations: {} # -- Annotations for the control plane pod template # @section -- Control Plane podAnnotations: {} service: # -- Control plane Service type # @section -- Control Plane type: ClusterIP # -- Control plane Service port # @section -- Control Plane port: 80 # -- Annotations for the control plane Service # @section -- Control Plane annotations: {} # -- Metrics path for the control plane Service # @section -- Control Plane metricsPath: /metrics buildApi: # -- Build API port (git proxy and token validation) # @section -- Control Plane port: 8001 # -- Metrics path for the build API # @section -- Control Plane metricsPath: /metrics objectStorage: s3: # -- S3 endpoint URL (leave empty for AWS) # @section -- Object Storage endpointUrl: "" # -- S3 bucket name (**required**) # @section -- Object Storage bucket: "" # -- S3 region # @section -- Object Storage region: "" # -- Send S3 requests unsigned (no Authorization header). Leave unset/`false` for any auth-requiring S3-compatible backend. For non-S3 object/blob storage, see `s3proxy.enabled` below — when that's on, this defaults to `true` unless you override it here. # @section -- Object Storage unsigned: # -- Inline S3 access key. When set alongside `secretKey`, the chart renders # a Secret and wires it into the control plane. Mutually exclusive with # `s3.secret` (which wins silently). # @section -- Object Storage accessKey: "" # -- Inline S3 secret key. Must be set together with `accessKey`; partial # setting is an error. # @section -- Object Storage secretKey: "" # -- Name of an existing K8s Secret supplying `S3_ACCESS_KEY` and # `S3_SECRET_KEY`. Takes precedence over `accessKey`/`secretKey`. # @section -- Object Storage secret: "" # Silent back-compat alias for s3.secret. Preferred surface is s3.secret. # @ignored secretRef: "" # -- Key prefix for build artifacts in the bucket # @section -- Object Storage buildKeyPrefix: "builds" # -- Key prefix for backup archives in the bucket # @section -- Object Storage backupKeyPrefix: "backups" # -- Key prefix for code repositories in the bucket # @section -- Object Storage codeRepoKeyPrefix: "git" # -- K8s Secret name containing `BACKUP_ENCRYPTION_PASSWORD` # @section -- Object Storage backupEncryptionSecretRef: "" hpa: # -- Enable HPA for the control plane # @section -- Control Plane enabled: false # -- Minimum replicas # @section -- Control Plane minReplicas: 1 # -- Maximum replicas # @section -- Control Plane maxReplicas: 3 # -- Target average CPU utilization percentage # @section -- Control Plane targetCPUUtilizationPercentage: 80 # -- Target average memory utilization percentage # @section -- Control Plane # targetMemoryUtilizationPercentage: 80 apps: # -- Namespace where LlamaDeployment CRs and all operator-managed child # resources live. Empty = release namespace. When set, the operator + control # plane stay in the release namespace and target this namespace for all app # resources. # @section -- Apps namespace: "" crds: # -- Compatible `llama-agents-crds` chart version for this release. Documentation only; not read by templates. Auto-synced at release time. # @section -- CRDs version: "0.7.2" operator: # -- Deploy the operator # @section -- Operator enabled: true # -- Number of operator replicas # @section -- Operator replicas: 1 # -- Annotations for the operator Deployment # @section -- Operator annotations: {} # -- Annotations for the operator pod template # @section -- Operator podAnnotations: {} defaultAppRequests: # -- Default CPU request for managed app containers # @section -- Operator cpu: "750m" # -- Default memory request for managed app containers # @section -- Operator memory: "2Gi" defaultAppLimits: # -- Default CPU limit for managed app containers (empty = no limit) # @section -- Operator cpu: "" # -- Default memory limit for managed app containers # @section -- Operator memory: "4096Mi" # -- Resource requests/limits for the operator container # @default -- `{limits: {cpu: 500m, memory: 128Mi}, requests: {cpu: 10m, memory: 64Mi}}` # @section -- Operator resources: limits: cpu: 500m memory: 128Mi requests: cpu: 10m memory: 64Mi # -- Max simultaneous LlamaDeployment rollouts (0 = unlimited) # @section -- Operator maxConcurrentRollouts: 10 # -- Max active LlamaDeployments per namespace (0 = unlimited) # @section -- Operator maxDeployments: 0 # -- Extra environment variables for the operator container # @section -- Operator env: [] # -- Rollout timeout in seconds for managed deployments # @section -- Operator rolloutTimeoutSeconds: 1800 llamaDeploymentTemplate: # -- Create a default LlamaDeploymentTemplate in the namespace # @section -- Operator enabled: false # -- Template resource name # @section -- Operator name: "default" # -- Metadata for the template (labels, annotations) # @section -- Operator metadata: {} # -- Template spec (podSpec with nodeSelector, tolerations, affinity, container overrides) # @section -- Operator spec: podSpec: {} hpa: # -- Enable HPA for the operator # @section -- Operator enabled: false # -- Minimum replicas # @section -- Operator minReplicas: 1 # -- Maximum replicas # @section -- Operator maxReplicas: 3 # -- Target average CPU utilization percentage # @section -- Operator targetCPUUtilizationPercentage: 80 # -- Target average memory utilization percentage # @section -- Operator # targetMemoryUtilizationPercentage: 80 localDev: # -- Enable local dev ingress for deployed apps # @section -- Local Development enabled: false # -- Ingress domain for local dev # @section -- Local Development ingressDomain: "127.0.0.1.nip.io" rbac: # -- Create Role and RoleBinding # @section -- RBAC create: true # -- Annotations for the Role # @section -- RBAC roleAnnotations: {} # -- Annotations for the RoleBinding # @section -- RBAC roleBindingAnnotations: {} serviceAccount: # -- Create a ServiceAccount # @section -- Service Account create: true # -- ServiceAccount name # @section -- Service Account name: llama-agents # -- Annotations for the ServiceAccount # @section -- Service Account annotations: {} s3proxy: # -- Run an [s3proxy](https://github.com/gaul/s3proxy) sidecar alongside the # control plane to translate S3 API calls to non-AWS backends (Azure Blob, # GCS, etc.). When enabled, `S3_ENDPOINT_URL` and `S3_UNSIGNED` default to # localhost and `true` unless explicitly overridden. Fill in `s3proxy.config` # with the JCLOUDS_* environment variables for your cloud. # @section -- s3proxy enabled: false # -- s3proxy container image # @section -- s3proxy image: "docker.io/andrewgaul/s3proxy:3.1.0" # -- s3proxy image pull policy # @section -- s3proxy imagePullPolicy: IfNotPresent # -- Port s3proxy listens on inside the pod (control plane reaches it over localhost) # @section -- s3proxy containerPort: 8080 # -- s3proxy log level (passed as LOG_LEVEL and S3PROXY_LOG_LEVEL) # @section -- s3proxy logLevel: info # -- securityContext for the s3proxy container # @section -- s3proxy securityContext: {} # -- Resource requests/limits for the s3proxy sidecar # @default -- `{requests: {cpu: 50m, memory: 256Mi}, limits: {cpu: 500m, memory: 512Mi}}` # @section -- s3proxy resources: requests: cpu: 50m memory: 256Mi limits: cpu: 500m memory: 512Mi # -- Raw passthrough to the s3proxy Secret. Keys become environment variables # on the sidecar. Typically `JCLOUDS_PROVIDER`, `JCLOUDS_IDENTITY`, # `JCLOUDS_CREDENTIAL`, `JCLOUDS_ENDPOINT`, `JCLOUDS_REGION`. See # https://github.com/gaul/s3proxy/wiki/Storage-backend-examples. # @section -- s3proxy config: {} # -- Name of an existing K8s Secret supplying the sidecar's env vars. Takes # precedence over `config` (which is skipped if this is set). # @section -- s3proxy secret: "" networkPolicy: # -- Enable egress NetworkPolicy for operator-managed pods # @section -- Network Policy enabled: true # -- Additional pod selector matchExpressions # @section -- Network Policy extraMatchExpressions: [] # -- Extra egress rules appended to the NetworkPolicy # @section -- Network Policy extraEgressRules: [] # -- Block private IP ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) in internet egress rule # @section -- Network Policy blockPrivateRanges: true dns: # -- Namespace selector for DNS pods. Defaults to kube-system # @section -- Network Policy namespaceSelector: kubernetes.io/metadata.name: kube-system # -- Pod selector for DNS pods. Defaults to kube-dns # @section -- Network Policy podSelector: k8s-app: kube-dns ================================================ FILE: charts/llama-agents-crds/.helmignore ================================================ # Patterns to ignore when building packages. .DS_Store *.swp *.bak *.tmp *~ .git .gitignore # Node modules symlink pulls in operator binaries which exceed Helm's 5MB file limit node_modules ================================================ FILE: charts/llama-agents-crds/CHANGELOG.md ================================================ # llama-agents-crds ## 0.7.2 ### Patch Changes - Updated dependencies [58e7942] - Updated dependencies [ea577a1] - llama-agents-operator@0.10.0 ================================================ FILE: charts/llama-agents-crds/Chart.yaml ================================================ apiVersion: v2 name: llama-agents-crds description: CRDs for llama-agents (LlamaDeployment, LlamaDeploymentTemplate) type: application version: "0.7.2" appVersion: "0.7.1" ================================================ FILE: charts/llama-agents-crds/README.md ================================================ # llama-agents-crds Helm chart that manages the CRD lifecycle for llama-agents (`LlamaDeployment`, `LlamaDeploymentTemplate`). ## Why a separate CRD chart? The main `llama-agents` chart places CRDs in the Helm `crds/` directory, which means Helm installs them on `helm install` but **never touches them on `helm upgrade` or `helm uninstall`**. This is the safest default — accidental CRD deletion cascades to all custom resources. However, when CRD schemas change (e.g., the operator adds new fields), you need a way to upgrade them. This chart puts CRDs in `templates/` so they participate in `helm upgrade`, and uses the `helm.sh/resource-policy: keep` annotation so `helm uninstall` leaves them in place. ## Usage Install before upgrading the main chart if CRD schema has changed: ```bash helm upgrade --install llama-agents-crds charts/llama-agents-crds ``` ## Uninstall behavior `helm uninstall llama-agents-crds` will **NOT** delete the CRDs thanks to `helm.sh/resource-policy: keep`. To truly remove CRDs (WARNING: this deletes all CRs of these types): ```bash kubectl delete crd llamadeployments.deploy.llamaindex.ai llamadeploymenttemplates.deploy.llamaindex.ai ``` ================================================ FILE: charts/llama-agents-crds/files/deploy.llamaindex.ai_llamadeployments.yaml ================================================ --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.18.0 name: llamadeployments.deploy.llamaindex.ai spec: group: deploy.llamaindex.ai names: kind: LlamaDeployment listKind: LlamaDeploymentList plural: llamadeployments singular: llamadeployment scope: Namespaced versions: - additionalPrinterColumns: - jsonPath: .spec.projectId name: Project ID type: string - jsonPath: .spec.displayName name: Name type: string - jsonPath: .spec.repoUrl name: Repo type: string - jsonPath: .status.phase name: Phase type: string - jsonPath: .metadata.creationTimestamp name: Age type: date name: v1 schema: openAPIV3Schema: description: LlamaDeployment is the Schema for the llamadeployments API. properties: apiVersion: description: |- APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: description: |- Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object spec: description: LlamaDeploymentSpec defines the desired state of LlamaDeployment. properties: buildGeneration: description: |- BuildGeneration is a monotonically increasing counter that forces a new build when incremented, even if all other inputs (gitSha, imageTag, etc.) are unchanged. This allows retrying a failed build caused by transient errors (e.g. network failures) without requiring a new git commit. format: int64 type: integer deploymentFilePath: default: llama_deployment.yml description: DeploymentFilePath is the path to the deployment file within the repository type: string displayName: description: DisplayName is the user-facing deployment label type: string gitRef: description: GitRef is the git reference (commit SHA, branch, or tag) to deploy type: string gitSha: description: A resolved git sha for the git ref type: string image: description: |- Image is the container image registry and name (e.g., "llamaindex/llama-agents-appserver") If not specified, defaults to environment variable or "llamaindex/llama-agents-appserver" type: string imageTag: description: |- ImageTag is the container image tag If not specified, defaults to environment variable or "latest" type: string name: description: 'Name is the deployment name (DEPRECATED: use DisplayName)' type: string projectId: description: ProjectId is the project ID type: string repoUrl: description: RepoUrl is the URL of the repository to deploy type: string secretName: description: SecretName is the name of the Kubernetes Secret containing PAT and deployment secrets type: string staticAssetsPath: description: |- StaticAssetsPath is an optional path (relative to /opt/app) containing prebuilt UI assets to be served under /deployments//ui type: string suspended: description: |- Suspended scales the underlying Deployment to 0 replicas when true. Setting suspended to false (or removing the field) restores replicas to 1. type: boolean templateName: description: |- TemplateName optionally specifies a LlamaDeploymentTemplate to apply. When empty, the operator will look up a template named "default". type: string required: - projectId - repoUrl type: object status: description: LlamaDeploymentStatus defines the observed state of LlamaDeployment. properties: authToken: description: AuthToken is a cryptographically secure token for this deployment type: string buildId: description: BuildId is the content-addressed identifier for the current build artifact type: string buildStatus: description: BuildStatus tracks the state of the current build job enum: - Pending - Running - Succeeded - Failed type: string failedRolloutGeneration: description: |- FailedRolloutGeneration records the LlamaDeployment generation whose rollout timed out. This prevents the operator from re-attempting the same failing rollout. format: int64 type: integer lastBuiltGeneration: description: |- LastBuiltGeneration is the spec.buildGeneration value that was last successfully built. When spec.buildGeneration differs from this value, a new build is triggered even if the deployment is suspended. format: int64 type: integer lastReconciledGeneration: description: LastReconciledGeneration tracks the generation that was last successfully reconciled format: int64 type: integer lastUpdated: description: LastUpdated is the timestamp of the last status update format: date-time type: string message: description: Message is a human-readable message indicating details about the current status type: string phase: description: Phase represents the current phase of the deployment enum: - Pending - Running - Failed - RollingOut - RolloutFailed - Suspended - Building - BuildFailed - AwaitingCode type: string releaseHistory: description: ReleaseHistory keeps the last 20 released git shas with timestamps items: description: ReleaseHistoryEntry represents a single released version entry properties: gitSha: description: GitSha is the released git commit SHA type: string imageTag: description: ImageTag is the appserver image tag used for this release type: string releasedAt: description: ReleasedAt is the timestamp when this version was released format: date-time type: string required: - gitSha - releasedAt type: object type: array rolloutStartedAt: description: |- RolloutStartedAt is the timestamp when the current rollout began. Set when the phase transitions to Pending or RollingOut, cleared on Running or failure. format: date-time type: string schemaVersion: description: SchemaVersion is the version of the CRD schema used when this resource was last reconciled type: string secretCheckRetries: description: |- SecretCheckRetries tracks how many times we've retried finding the Secret. This handles informer cache lag when the Secret is created just before the CR. format: int32 type: integer type: object type: object served: true storage: true subresources: status: {} ================================================ FILE: charts/llama-agents-crds/files/deploy.llamaindex.ai_llamadeploymenttemplates.yaml ================================================ --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.18.0 name: llamadeploymenttemplates.deploy.llamaindex.ai spec: group: deploy.llamaindex.ai names: kind: LlamaDeploymentTemplate listKind: LlamaDeploymentTemplateList plural: llamadeploymenttemplates singular: llamadeploymenttemplate scope: Namespaced versions: - additionalPrinterColumns: - jsonPath: .metadata.creationTimestamp name: Age type: date name: v1 schema: openAPIV3Schema: description: |- LlamaDeploymentTemplate configures default Pod template fields for LlamaDeployments. The resource name is referenced by LlamaDeployment.spec.templateName. A special name "default" is used as a fallback when no templateName is provided. properties: apiVersion: description: |- APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: description: |- Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object spec: description: |- LlamaDeploymentTemplateSpec defines the desired overlay for a LlamaDeployment's PodTemplate. This is intended to carry scheduling-related fields like node selectors, tolerations, and affinity, but supports any partial PodTemplateSpec. Fields set here will take precedence over the operator-computed defaults when merged. properties: podSpec: description: PodSpec holds a partial PodTemplateSpec to be merged into the generated PodTemplate. x-kubernetes-preserve-unknown-fields: true type: object status: type: string type: object served: true storage: true subresources: status: {} ================================================ FILE: charts/llama-agents-crds/package.json ================================================ { "name": "llama-agents-crds", "version": "0.7.2", "dependencies": {}, "helm": { "registry": "oci://docker.io/llamaindex" } } ================================================ FILE: charts/llama-agents-crds/templates/crds.yaml ================================================ {{- range $path, $_ := .Files.Glob "files/*.yaml" }} {{- $crd := $.Files.Get $path | fromYaml }} {{- if $.Values.keep }} {{- $annotations := $crd.metadata.annotations | default dict }} {{- $_ := set $annotations "helm.sh/resource-policy" "keep" }} {{- $_ := set $crd.metadata "annotations" $annotations }} {{- end }} --- {{ toYaml $crd }} {{- end }} ================================================ FILE: charts/llama-agents-crds/values.yaml ================================================ # When true, adds helm.sh/resource-policy: keep annotation to CRDs # so that helm uninstall does not delete them (and cascade-delete all CRs). keep: true ================================================ FILE: docker/Dockerfile ================================================ # Base stage with common dependencies FROM python:3.12-slim AS base COPY --from=ghcr.io/astral-sh/uv:0.7.20 /uv /uvx /bin/ # Create a non-root user RUN groupadd --gid 1001 appgroup && \ useradd --uid 1001 --gid appgroup --shell /bin/bash --create-home appuser # Create data directory and set permissions RUN mkdir -p /app && chown -R appuser:appgroup /app # Set working directory WORKDIR /app # Copy workspace configuration files COPY pyproject.toml uv.lock README.md ./ ENV PATH=/app/.venv/bin:$PATH ############################################################################## ############################################################################## ############################## CONTROL PLANE ################################# ############################################################################## ############################################################################## ############################################################################## ### Control Plane - BUILDER ### ############################################################################## # # pulls in all packages, and installs as non-editable FROM base AS controlplane-builder ARG PACKAGE_NAME=llama-agents-control-plane # installs the 3rd party deps for the package RUN uv sync --frozen --no-dev --package $PACKAGE_NAME --no-install-workspace # Copy the 1st party deps COPY packages/ packages/ # Now install the 1st party deps into the venv (non-editable) RUN uv sync --frozen --no-dev --package $PACKAGE_NAME --no-editable ############################################################################## ### Control Plane - RUNNER ### ############################################################################## FROM base AS controlplane # Copy the builder stage COPY --from=controlplane-builder /app/.venv /app/.venv USER appuser # Expose ports EXPOSE 8000 8001 # Production command without reload CMD ["python", "-m", "llama_agents.control_plane.main", "--host", "0.0.0.0", "--manage-api-port", "8000", "--build-api-port", "8001", "--log-level", "info", "--log-format", "json"] ############################################################################## ############################################################################## ################################# APP SERVER ################################# ############################################################################## ############################################################################## ############################################################################## ### App Server - BUILDER ### ############################################################################## # # pulls in all packages, and installs as non-editable FROM base AS appserver-builder ARG PACKAGE_NAME=llama-agents-appserver # install to system python. Makes things easier for the cloned repo to "inherit" the appserver dependencies # installs the 3rd party deps for the package RUN uv sync --frozen --no-dev --package $PACKAGE_NAME --no-install-workspace # Copy the 1st party deps COPY packages/ packages/ # Now install the 1st party deps into the venv (non-editable) RUN uv sync --frozen --no-dev --package $PACKAGE_NAME --no-editable RUN uv build --package $PACKAGE_NAME --sdist RUN uv build --package llama-agents-core --sdist ############################################################################## ### App Server - RUNNER ### ############################################################################## FROM base AS appserver # Install Node.js, pnpm, and git for bootstrap-time git+https dependencies. RUN apt-get update && apt-get install -y \ git \ curl \ && curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \ && apt-get install -y nodejs \ && corepack enable \ && rm -rf /var/lib/apt/lists/* # Copy the builder stage COPY --from=appserver-builder /app/.venv /app/.venv COPY --from=appserver-builder /app/dist/ /app/dist ENV LLAMA_DEPLOY_BOOTSTRAP_SDISTS=/app/dist/ USER appuser ENV LLAMA_DEPLOY_APISERVER_PORT=8080 ENV LLAMA_DEPLOY_APISERVER_HOST=0.0.0.0 # Expose ports EXPOSE 8080 ================================================ FILE: docker/Dockerfile.mitm-test ================================================ # Container to recreate corporate MITM proxy scenario for testing native TLS mode # Simulates an environment where: # - HTTPS traffic is intercepted by a MITM proxy (common in corporate networks) # - The MITM CA is installed in system trust store # - Python tools fail because they use certifi instead of system certs # - Node tools fail as well FROM debian:stable-slim COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ curl \ openssl \ python3 \ python3-dev \ build-essential \ git \ nodejs \ npm \ && rm -rf /var/lib/apt/lists/* # Install mitmproxy RUN uv tool install mitmproxy RUN corepack enable ENV PATH=/root/.local/bin:$PATH WORKDIR /app # Copy workspace configuration files COPY pyproject.toml uv.lock README.md ./ COPY packages/ packages/ RUN uv sync --all-packages COPY docker/mitm-proxy-test/entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh ENV PATH=/app/.venv/bin:$PATH WORKDIR /workspace # RUN llamactl init --no-interactive --template extraction-review --force # WORKDIR /workspace/extraction-review # RUN uv sync && cd ui && pnpm install EXPOSE 8080 ENTRYPOINT ["/entrypoint.sh"] ================================================ FILE: docker/mitm-proxy-test/entrypoint.sh ================================================ #!/usr/bin/env bash set -euo pipefail # Generate a local CA if not present and install it into the OS trust store # mitmproxy provides its own CA in ~/.mitmproxy mkdir -p /root/.mitmproxy # Start and stop mitmproxy once to ensure CA exists if [ ! -f /root/.mitmproxy/mitmproxy-ca-cert.pem ]; then # Run mitmdump briefly to generate the CA, then kill it timeout 2s mitmdump >/dev/null 2>&1 || true fi CA_PEM=/root/.mitmproxy/mitmproxy-ca-cert.pem if [ -f "$CA_PEM" ]; then echo "Installing mitmproxy CA into system trust store..." cp "$CA_PEM" /usr/local/share/ca-certificates/mitmproxy-ca.crt update-ca-certificates else echo "mitmproxy CA not found; continuing without installing" fi PORT=${PORT:-8080} # Run mitmdump (non-interactive) in the background # mitmdump logs to stdout by default if [ -n "${TARGET:-}" ]; then echo "Starting mitmdump in reverse proxy mode to $TARGET on port $PORT..." mitmdump --mode reverse:"$TARGET" --listen-port "$PORT" & else echo "Starting mitmdump on port $PORT..." mitmdump --listen-port "$PORT" & fi MITM_PID=$! echo "mitmdump started with PID $MITM_PID" export HTTPS_PROXY=http://localhost:$PORT # Drop into a shell, or run any command passed as arguments if [ $# -eq 0 ]; then exec bash else exec "$@" fi ================================================ FILE: docker/operator.Dockerfile ================================================ # Build the operator binary FROM golang:1.24 AS builder ARG TARGETOS ARG TARGETARCH WORKDIR /workspace # Copy the Go Modules manifests COPY operator/go.mod operator/go.sum ./ RUN go mod download # Copy the go source COPY operator/cmd/ cmd/ COPY operator/api/ api/ COPY operator/internal/ internal/ # Build RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -ldflags="-s -w" -o manager cmd/main.go # Use distroless as minimal base image to package the manager binary FROM gcr.io/distroless/static:nonroot WORKDIR / COPY --from=builder /workspace/manager . USER 65532:65532 ENTRYPOINT ["/manager"] ================================================ FILE: docs/api_docs/.gitignore ================================================ /site ================================================ FILE: docs/api_docs/README.md ================================================ # LlamaDeploy Documentation This repository contains the documentation for LlamaIndex Workflows, built using MkDocs with Material theme. ## Setup ### Prerequisites - Python 3.10 or higher - uv (for dependency management) ### Installation 1. Clone the repository 2. Install dependencies using uv: ```bash uv sync ``` ## Development To start the documentation server locally: ```bash uv run mkdocs serve ``` This will start a development server at `http://127.0.0.1:8000`. ## Building LlamaDeploy is part of LlamaIndex [documentation portal](https://docs.llamaindex.ai/) so the build is performed from the [main repository](https://github.com/run-llama/llama_index). > [!WARNING] > When a documentation change is merged here, the change won't be visible until a new > build is triggered from the LlamaIndex repository. ## Contributing Contributions are very welcome! 1. Create a new branch for your changes 2. Make your changes to the documentation 3. Test locally using `uv run mkdocs serve` 4. Submit a pull request ================================================ FILE: docs/api_docs/docs/api_reference/_static/css/algolia.css ================================================ /** * Skipped minification because the original files appears to be already minified. * Original file: /npm/@docsearch/css@3.6.1/dist/style.css * * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files */ /*! @docsearch/css 3.6.1 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */ :root { --docsearch-primary-color: #5468ff; --docsearch-text-color: #1c1e21; --docsearch-spacing: 12px; --docsearch-icon-stroke-width: 1.4; --docsearch-highlight-color: var(--docsearch-primary-color); --docsearch-muted-color: #969faf; --docsearch-container-background: rgba(101, 108, 133, 0.8); --docsearch-logo-color: #5468ff; --docsearch-modal-width: 560px; --docsearch-modal-height: 600px; --docsearch-modal-background: #f5f6f7; --docsearch-modal-shadow: inset 1px 1px 0 0 hsla(0, 0%, 100%, 0.5), 0 3px 8px 0 #555a64; --docsearch-searchbox-height: 56px; --docsearch-searchbox-background: #ebedf0; --docsearch-searchbox-focus-background: #fff; --docsearch-searchbox-shadow: inset 0 0 0 2px var(--docsearch-primary-color); --docsearch-hit-height: 56px; --docsearch-hit-color: #444950; --docsearch-hit-active-color: #fff; --docsearch-hit-background: #fff; --docsearch-hit-shadow: 0 1px 3px 0 #d4d9e1; --docsearch-key-gradient: linear-gradient(-225deg, #d5dbe4, #f8f8f8); --docsearch-key-shadow: inset 0 -2px 0 0 #cdcde6, inset 0 0 1px 1px #fff, 0 1px 2px 1px rgba(30, 35, 90, 0.4); --docsearch-key-pressed-shadow: inset 0 -2px 0 0 #cdcde6, inset 0 0 1px 1px #fff, 0 1px 1px 0 rgba(30, 35, 90, 0.4); --docsearch-footer-height: 44px; --docsearch-footer-background: #fff; --docsearch-footer-shadow: 0 -1px 0 0 #e0e3e8, 0 -3px 6px 0 rgba(69, 98, 155, 0.12); } html[data-theme="dark"] { --docsearch-text-color: #f5f6f7; --docsearch-container-background: rgba(9, 10, 17, 0.8); --docsearch-modal-background: #15172a; --docsearch-modal-shadow: inset 1px 1px 0 0 #2c2e40, 0 3px 8px 0 #000309; --docsearch-searchbox-background: #090a11; --docsearch-searchbox-focus-background: #000; --docsearch-hit-color: #bec3c9; --docsearch-hit-shadow: none; --docsearch-hit-background: #090a11; --docsearch-key-gradient: linear-gradient(-26.5deg, #565872, #31355b); --docsearch-key-shadow: inset 0 -2px 0 0 #282d55, inset 0 0 1px 1px #51577d, 0 2px 2px 0 rgba(3, 4, 9, 0.3); --docsearch-key-pressed-shadow: inset 0 -2px 0 0 #282d55, inset 0 0 1px 1px #51577d, 0 1px 1px 0 rgba(3, 4, 9, 0.30196078431372547); --docsearch-footer-background: #1e2136; --docsearch-footer-shadow: inset 0 1px 0 0 rgba(73, 76, 106, 0.5), 0 -4px 8px 0 rgba(0, 0, 0, 0.2); --docsearch-logo-color: #fff; --docsearch-muted-color: #7f8497; } .DocSearch-Button { align-items: center; background: var(--docsearch-searchbox-background); border: 0; border-radius: 40px; color: var(--docsearch-muted-color); cursor: pointer; display: flex; font-weight: 500; height: 36px; justify-content: space-between; margin: 0 0 0 16px; padding: 0 8px; user-select: none; } .DocSearch-Button:active, .DocSearch-Button:focus, .DocSearch-Button:hover { background: var(--docsearch-searchbox-focus-background); box-shadow: var(--docsearch-searchbox-shadow); color: var(--docsearch-text-color); outline: none; } .DocSearch-Button-Container { align-items: center; display: flex; } .DocSearch-Search-Icon { stroke-width: 1.6; } .DocSearch-Button .DocSearch-Search-Icon { color: var(--docsearch-text-color); } .DocSearch-Button-Placeholder { font-size: 1rem; padding: 0 12px 0 6px; } .DocSearch-Button-Keys { display: flex; min-width: calc(40px + 0.8em); } .DocSearch-Button-Key { align-items: center; background: var(--docsearch-key-gradient); border-radius: 3px; box-shadow: var(--docsearch-key-shadow); color: var(--docsearch-muted-color); display: flex; height: 18px; justify-content: center; margin-right: 0.4em; position: relative; padding: 0 0 2px; border: 0; top: -1px; width: 20px; } .DocSearch-Button-Key--pressed { transform: translate3d(0, 1px, 0); box-shadow: var(--docsearch-key-pressed-shadow); } @media (max-width: 768px) { .DocSearch-Button-Keys, .DocSearch-Button-Placeholder { display: none; } } .DocSearch--active { overflow: hidden !important; } .DocSearch-Container, .DocSearch-Container * { box-sizing: border-box; } .DocSearch-Container { background-color: var(--docsearch-container-background); height: 100vh; left: 0; position: fixed; top: 0; width: 100vw; z-index: 200; } .DocSearch-Container a { text-decoration: none; } .DocSearch-Link { appearance: none; background: none; border: 0; color: var(--docsearch-highlight-color); cursor: pointer; font: inherit; margin: 0; padding: 0; } .DocSearch-Modal { background: var(--docsearch-modal-background); border-radius: 6px; box-shadow: var(--docsearch-modal-shadow); flex-direction: column; margin: 60px auto auto; max-width: var(--docsearch-modal-width); position: relative; } .DocSearch-SearchBar { display: flex; padding: var(--docsearch-spacing) var(--docsearch-spacing) 0; } .DocSearch-Form { align-items: center; background: var(--docsearch-searchbox-focus-background); border-radius: 4px; box-shadow: var(--docsearch-searchbox-shadow); display: flex; height: var(--docsearch-searchbox-height); margin: 0; padding: 0 var(--docsearch-spacing); position: relative; width: 100%; } .DocSearch-Input { appearance: none; background: transparent; border: 0; color: var(--docsearch-text-color); flex: 1; font: inherit; font-size: 1.2em; height: 100%; outline: none; padding: 0 0 0 8px; width: 80%; } .DocSearch-Input::placeholder { color: var(--docsearch-muted-color); opacity: 1; } .DocSearch-Input::-webkit-search-cancel-button, .DocSearch-Input::-webkit-search-decoration, .DocSearch-Input::-webkit-search-results-button, .DocSearch-Input::-webkit-search-results-decoration { display: none; } .DocSearch-LoadingIndicator, .DocSearch-MagnifierLabel, .DocSearch-Reset { margin: 0; padding: 0; } .DocSearch-MagnifierLabel, .DocSearch-Reset { align-items: center; color: var(--docsearch-highlight-color); display: flex; justify-content: center; } .DocSearch-Container--Stalled .DocSearch-MagnifierLabel, .DocSearch-LoadingIndicator { display: none; } .DocSearch-Container--Stalled .DocSearch-LoadingIndicator { align-items: center; color: var(--docsearch-highlight-color); display: flex; justify-content: center; } @media screen and (prefers-reduced-motion: reduce) { .DocSearch-Reset { animation: none; appearance: none; background: none; border: 0; border-radius: 50%; color: var(--docsearch-icon-color); cursor: pointer; right: 0; stroke-width: var(--docsearch-icon-stroke-width); } } .DocSearch-Reset { animation: fade-in 0.1s ease-in forwards; appearance: none; background: none; border: 0; border-radius: 50%; color: var(--docsearch-icon-color); cursor: pointer; padding: 2px; right: 0; stroke-width: var(--docsearch-icon-stroke-width); } .DocSearch-Reset[hidden] { display: none; } .DocSearch-Reset:hover { color: var(--docsearch-highlight-color); } .DocSearch-LoadingIndicator svg, .DocSearch-MagnifierLabel svg { height: 24px; width: 24px; } .DocSearch-Cancel { display: none; } .DocSearch-Dropdown { max-height: calc( var(--docsearch-modal-height) - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height) ); min-height: var(--docsearch-spacing); overflow-y: auto; overflow-y: overlay; padding: 0 var(--docsearch-spacing); scrollbar-color: var(--docsearch-muted-color) var(--docsearch-modal-background); scrollbar-width: thin; } .DocSearch-Dropdown::-webkit-scrollbar { width: 12px; } .DocSearch-Dropdown::-webkit-scrollbar-track { background: transparent; } .DocSearch-Dropdown::-webkit-scrollbar-thumb { background-color: var(--docsearch-muted-color); border: 3px solid var(--docsearch-modal-background); border-radius: 20px; } .DocSearch-Dropdown ul { list-style: none; margin: 0; padding: 0; } .DocSearch-Label { font-size: 0.75em; line-height: 1.6em; } .DocSearch-Help, .DocSearch-Label { color: var(--docsearch-muted-color); } .DocSearch-Help { font-size: 0.9em; margin: 0; user-select: none; } .DocSearch-Title { font-size: 1.2em; } .DocSearch-Logo a { display: flex; } .DocSearch-Logo svg { color: var(--docsearch-logo-color); margin-left: 8px; } .DocSearch-Hits:last-of-type { margin-bottom: 24px; } .DocSearch-Hits mark { background: none; color: var(--docsearch-highlight-color); } .DocSearch-HitsFooter { color: var(--docsearch-muted-color); display: flex; font-size: 0.85em; justify-content: center; margin-bottom: var(--docsearch-spacing); padding: var(--docsearch-spacing); } .DocSearch-HitsFooter a { border-bottom: 1px solid; color: inherit; } .DocSearch-Hit { border-radius: 4px; display: flex; padding-bottom: 4px; position: relative; } @media screen and (prefers-reduced-motion: reduce) { .DocSearch-Hit--deleting { transition: none; } } .DocSearch-Hit--deleting { opacity: 0; transition: all 0.25s linear; } @media screen and (prefers-reduced-motion: reduce) { .DocSearch-Hit--favoriting { transition: none; } } .DocSearch-Hit--favoriting { transform: scale(0); transform-origin: top center; transition: all 0.25s linear; transition-delay: 0.25s; } .DocSearch-Hit a { background: var(--docsearch-hit-background); border-radius: 4px; box-shadow: var(--docsearch-hit-shadow); display: block; padding-left: var(--docsearch-spacing); width: 100%; } .DocSearch-Hit-source { background: var(--docsearch-modal-background); color: var(--docsearch-highlight-color); font-size: 0.85em; font-weight: 600; line-height: 32px; margin: 0 -4px; padding: 8px 4px 0; position: sticky; top: 0; z-index: 10; } .DocSearch-Hit-Tree { color: var(--docsearch-muted-color); height: var(--docsearch-hit-height); opacity: 0.5; stroke-width: var(--docsearch-icon-stroke-width); width: 24px; } .DocSearch-Hit[aria-selected="true"] a { background-color: var(--docsearch-highlight-color); } .DocSearch-Hit[aria-selected="true"] mark { text-decoration: underline; } .DocSearch-Hit-Container { align-items: center; color: var(--docsearch-hit-color); display: flex; flex-direction: row; height: var(--docsearch-hit-height); padding: 0 var(--docsearch-spacing) 0 0; } .DocSearch-Hit-icon { height: 20px; width: 20px; } .DocSearch-Hit-action, .DocSearch-Hit-icon { color: var(--docsearch-muted-color); stroke-width: var(--docsearch-icon-stroke-width); } .DocSearch-Hit-action { align-items: center; display: flex; height: 22px; width: 22px; } .DocSearch-Hit-action svg { display: block; height: 18px; width: 18px; } .DocSearch-Hit-action + .DocSearch-Hit-action { margin-left: 6px; } .DocSearch-Hit-action-button { appearance: none; background: none; border: 0; border-radius: 50%; color: inherit; cursor: pointer; padding: 2px; } svg.DocSearch-Hit-Select-Icon { display: none; } .DocSearch-Hit[aria-selected="true"] .DocSearch-Hit-Select-Icon { display: block; } .DocSearch-Hit-action-button:focus, .DocSearch-Hit-action-button:hover { background: rgba(0, 0, 0, 0.2); transition: background-color 0.1s ease-in; } @media screen and (prefers-reduced-motion: reduce) { .DocSearch-Hit-action-button:focus, .DocSearch-Hit-action-button:hover { transition: none; } } .DocSearch-Hit-action-button:focus path, .DocSearch-Hit-action-button:hover path { fill: #fff; } .DocSearch-Hit-content-wrapper { display: flex; flex: 1 1 auto; flex-direction: column; font-weight: 500; justify-content: center; line-height: 1.2em; margin: 0 8px; overflow-x: hidden; position: relative; text-overflow: ellipsis; white-space: nowrap; width: 80%; } .DocSearch-Hit-title { font-size: 0.9em; } .DocSearch-Hit-path { color: var(--docsearch-muted-color); font-size: 0.75em; } .DocSearch-Hit[aria-selected="true"] .DocSearch-Hit-action, .DocSearch-Hit[aria-selected="true"] .DocSearch-Hit-icon, .DocSearch-Hit[aria-selected="true"] .DocSearch-Hit-path, .DocSearch-Hit[aria-selected="true"] .DocSearch-Hit-text, .DocSearch-Hit[aria-selected="true"] .DocSearch-Hit-title, .DocSearch-Hit[aria-selected="true"] .DocSearch-Hit-Tree, .DocSearch-Hit[aria-selected="true"] mark { color: var(--docsearch-hit-active-color) !important; } @media screen and (prefers-reduced-motion: reduce) { .DocSearch-Hit-action-button:focus, .DocSearch-Hit-action-button:hover { background: rgba(0, 0, 0, 0.2); transition: none; } } .DocSearch-ErrorScreen, .DocSearch-NoResults, .DocSearch-StartScreen { font-size: 0.9em; margin: 0 auto; padding: 36px 0; text-align: center; width: 80%; } .DocSearch-Screen-Icon { color: var(--docsearch-muted-color); padding-bottom: 12px; } .DocSearch-NoResults-Prefill-List { display: inline-block; padding-bottom: 24px; text-align: left; } .DocSearch-NoResults-Prefill-List ul { display: inline-block; padding: 8px 0 0; } .DocSearch-NoResults-Prefill-List li { list-style-position: inside; list-style-type: "» "; } .DocSearch-Prefill { appearance: none; background: none; border: 0; border-radius: 1em; color: var(--docsearch-highlight-color); cursor: pointer; display: inline-block; font-size: 1em; font-weight: 700; padding: 0; } .DocSearch-Prefill:focus, .DocSearch-Prefill:hover { outline: none; text-decoration: underline; } .DocSearch-Footer { align-items: center; background: var(--docsearch-footer-background); border-radius: 0 0 8px 8px; box-shadow: var(--docsearch-footer-shadow); display: flex; flex-direction: row-reverse; flex-shrink: 0; height: var(--docsearch-footer-height); justify-content: space-between; padding: 0 var(--docsearch-spacing); position: relative; user-select: none; width: 100%; z-index: 300; } .DocSearch-Commands { color: var(--docsearch-muted-color); display: flex; list-style: none; margin: 0; padding: 0; } .DocSearch-Commands li { align-items: center; display: flex; } .DocSearch-Commands li:not(:last-of-type) { margin-right: 0.8em; } .DocSearch-Commands-Key { align-items: center; background: var(--docsearch-key-gradient); border-radius: 2px; box-shadow: var(--docsearch-key-shadow); display: flex; height: 18px; justify-content: center; margin-right: 0.4em; padding: 0 0 1px; color: var(--docsearch-muted-color); border: 0; width: 20px; } .DocSearch-VisuallyHiddenForAccessibility { clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; } @media (max-width: 768px) { :root { --docsearch-spacing: 10px; --docsearch-footer-height: 40px; } .DocSearch-Dropdown { height: 100%; } .DocSearch-Container { height: 100vh; height: -webkit-fill-available; height: calc(var(--docsearch-vh, 1vh) * 100); position: absolute; } .DocSearch-Footer { border-radius: 0; bottom: 0; position: absolute; } .DocSearch-Hit-content-wrapper { display: flex; position: relative; width: 80%; } .DocSearch-Modal { border-radius: 0; box-shadow: none; height: 100vh; height: -webkit-fill-available; height: calc(var(--docsearch-vh, 1vh) * 100); margin: 0; max-width: 100%; width: 100%; } .DocSearch-Dropdown { max-height: calc( var(--docsearch-vh, 1vh) * 100 - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height) ); } .DocSearch-Cancel { appearance: none; background: none; border: 0; color: var(--docsearch-highlight-color); cursor: pointer; display: inline-block; flex: none; font: inherit; font-size: 1em; font-weight: 500; margin-left: var(--docsearch-spacing); outline: none; overflow: hidden; padding: 0; user-select: none; white-space: nowrap; } .DocSearch-Commands, .DocSearch-Hit-Tree { display: none; } } @keyframes fade-in { 0% { opacity: 0; } to { opacity: 1; } } ================================================ FILE: docs/api_docs/docs/api_reference/_static/css/custom.css ================================================ #my-component-root *, #headlessui-portal-root * { z-index: 1000000000000; font-size: 100%; } textarea { border: 0; padding: 0; } article p { margin-bottom: 10px !important; } ================================================ FILE: docs/api_docs/docs/api_reference/_static/js/algolia.js ================================================ /** * Skipped minification because the original files appears to be already minified. * Original file: /npm/@docsearch/js@3.6.1/dist/umd/index.js * * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files */ /*! @docsearch/js 3.6.1 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */ !(function (e, t) { "object" == typeof exports && "undefined" != typeof module ? (module.exports = t()) : "function" == typeof define && define.amd ? define(t) : ((e = e || self).docsearch = t()); })(this, function () { "use strict"; function e(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 t(t) { for (var n = 1; n < arguments.length; n++) { var o = null != arguments[n] ? arguments[n] : {}; n % 2 ? e(Object(o), !0).forEach(function (e) { r(t, e, o[e]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(o)) : e(Object(o)).forEach(function (e) { Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(o, e)); }); } return t; } function n(e) { return ( (n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) { return typeof e; } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }), n(e) ); } 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 ); } function o() { return ( (o = 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; }), o.apply(this, arguments) ); } function i(e, t) { if (null == e) return {}; var n, r, o = (function (e, t) { if (null == e) return {}; var n, r, o = {}, i = Object.keys(e); for (r = 0; r < i.length; r++) (n = i[r]), t.indexOf(n) >= 0 || (o[n] = e[n]); return o; })(e, t); if (Object.getOwnPropertySymbols) { var i = Object.getOwnPropertySymbols(e); for (r = 0; r < i.length; r++) (n = i[r]), t.indexOf(n) >= 0 || (Object.prototype.propertyIsEnumerable.call(e, n) && (o[n] = e[n])); } return o; } function c(e, t) { return ( (function (e) { if (Array.isArray(e)) return e; })(e) || (function (e, t) { var n = null == e ? null : ("undefined" != typeof Symbol && e[Symbol.iterator]) || e["@@iterator"]; if (null == n) return; var r, o, i = [], c = !0, a = !1; try { for ( n = n.call(e); !(c = (r = n.next()).done) && (i.push(r.value), !t || i.length !== t); c = !0 ); } catch (e) { (a = !0), (o = e); } finally { try { c || null == n.return || n.return(); } finally { if (a) throw o; } } return i; })(e, t) || u(e, t) || (function () { throw new TypeError( "Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.", ); })() ); } function a(e) { return ( (function (e) { if (Array.isArray(e)) return l(e); })(e) || (function (e) { if ( ("undefined" != typeof Symbol && null != e[Symbol.iterator]) || null != e["@@iterator"] ) return Array.from(e); })(e) || u(e) || (function () { throw new TypeError( "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.", ); })() ); } function u(e, t) { if (e) { if ("string" == typeof e) return l(e, t); var n = Object.prototype.toString.call(e).slice(8, -1); return ( "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? l(e, t) : void 0 ); } } function l(e, t) { (null == t || t > e.length) && (t = e.length); for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n]; return r; } var s, f, p, m, d, v = {}, h = [], y = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i; function _(e, t) { for (var n in t) e[n] = t[n]; return e; } function b(e) { var t = e.parentNode; t && t.removeChild(e); } function g(e, t, n) { var r, o, i, c = arguments, a = {}; for (i in t) "key" == i ? (r = t[i]) : "ref" == i ? (o = t[i]) : (a[i] = t[i]); if (arguments.length > 3) for (n = [n], i = 3; i < arguments.length; i++) n.push(c[i]); if ( (null != n && (a.children = n), "function" == typeof e && null != e.defaultProps) ) for (i in e.defaultProps) void 0 === a[i] && (a[i] = e.defaultProps[i]); return S(e, a, r, o, null); } function S(e, t, n, r, o) { var i = { type: e, props: t, key: n, ref: r, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: null == o ? ++s.__v : o, }; return null != s.vnode && s.vnode(i), i; } function O(e) { return e.children; } function w(e, t) { (this.props = e), (this.context = t); } function E(e, t) { if (null == t) return e.__ ? E(e.__, e.__.__k.indexOf(e) + 1) : null; for (var n; t < e.__k.length; t++) if (null != (n = e.__k[t]) && null != n.__e) return n.__e; return "function" == typeof e.type ? E(e) : null; } function j(e) { var t, n; if (null != (e = e.__) && null != e.__c) { for (e.__e = e.__c.base = null, t = 0; t < e.__k.length; t++) if (null != (n = e.__k[t]) && null != n.__e) { e.__e = e.__c.base = n.__e; break; } return j(e); } } function P(e) { ((!e.__d && (e.__d = !0) && f.push(e) && !I.__r++) || m !== s.debounceRendering) && ((m = s.debounceRendering) || p)(I); } function I() { for (var e; (I.__r = f.length); ) (e = f.sort(function (e, t) { return e.__v.__b - t.__v.__b; })), (f = []), e.some(function (e) { var t, n, r, o, i, c; e.__d && ((i = (o = (t = e).__v).__e), (c = t.__P) && ((n = []), ((r = _({}, o)).__v = o.__v + 1), q( c, o, r, t.__n, void 0 !== c.ownerSVGElement, null != o.__h ? [i] : null, n, null == i ? E(o) : i, o.__h, ), L(n, o), o.__e != i && j(o))); }); } function D(e, t, n, r, o, i, c, a, u, l) { var s, f, p, m, d, y, _, b = (r && r.__k) || h, g = b.length; for (n.__k = [], s = 0; s < t.length; s++) if ( null != (m = n.__k[s] = null == (m = t[s]) || "boolean" == typeof m ? null : "string" == typeof m || "number" == typeof m ? S(null, m, null, null, m) : Array.isArray(m) ? S(O, { children: m }, null, null, null) : m.__b > 0 ? S(m.type, m.props, m.key, null, m.__v) : m) ) { if ( ((m.__ = n), (m.__b = n.__b + 1), null === (p = b[s]) || (p && m.key == p.key && m.type === p.type)) ) b[s] = void 0; else for (f = 0; f < g; f++) { if ((p = b[f]) && m.key == p.key && m.type === p.type) { b[f] = void 0; break; } p = null; } q(e, m, (p = p || v), o, i, c, a, u, l), (d = m.__e), (f = m.ref) && p.ref != f && (_ || (_ = []), p.ref && _.push(p.ref, null, m), _.push(f, m.__c || d, m)), null != d ? (null == y && (y = d), "function" == typeof m.type && null != m.__k && m.__k === p.__k ? (m.__d = u = k(m, u, e)) : (u = A(e, m, p, b, d, u)), l || "option" !== n.type ? "function" == typeof n.type && (n.__d = u) : (e.value = "")) : u && p.__e == u && u.parentNode != e && (u = E(p)); } for (n.__e = y, s = g; s--; ) null != b[s] && ("function" == typeof n.type && null != b[s].__e && b[s].__e == n.__d && (n.__d = E(r, s + 1)), U(b[s], b[s])); if (_) for (s = 0; s < _.length; s++) H(_[s], _[++s], _[++s]); } function k(e, t, n) { var r, o; for (r = 0; r < e.__k.length; r++) (o = e.__k[r]) && ((o.__ = e), (t = "function" == typeof o.type ? k(o, t, n) : A(n, o, o, e.__k, o.__e, t))); return t; } function C(e, t) { return ( (t = t || []), null == e || "boolean" == typeof e || (Array.isArray(e) ? e.some(function (e) { C(e, t); }) : t.push(e)), t ); } function A(e, t, n, r, o, i) { var c, a, u; if (void 0 !== t.__d) (c = t.__d), (t.__d = void 0); else if (null == n || o != i || null == o.parentNode) e: if (null == i || i.parentNode !== e) e.appendChild(o), (c = null); else { for (a = i, u = 0; (a = a.nextSibling) && u < r.length; u += 2) if (a == o) break e; e.insertBefore(o, i), (c = i); } return void 0 !== c ? c : o.nextSibling; } function x(e, t, n) { "-" === t[0] ? e.setProperty(t, n) : (e[t] = null == n ? "" : "number" != typeof n || y.test(t) ? n : n + "px"); } function N(e, t, n, r, o) { var i; e: if ("style" === t) if ("string" == typeof n) e.style.cssText = n; else { if (("string" == typeof r && (e.style.cssText = r = ""), r)) for (t in r) (n && t in n) || x(e.style, t, ""); if (n) for (t in n) (r && n[t] === r[t]) || x(e.style, t, n[t]); } else if ("o" === t[0] && "n" === t[1]) (i = t !== (t = t.replace(/Capture$/, ""))), (t = t.toLowerCase() in e ? t.toLowerCase().slice(2) : t.slice(2)), e.l || (e.l = {}), (e.l[t + i] = n), n ? r || e.addEventListener(t, i ? R : T, i) : e.removeEventListener(t, i ? R : T, i); else if ("dangerouslySetInnerHTML" !== t) { if (o) t = t.replace(/xlink[H:h]/, "h").replace(/sName$/, "s"); else if ( "href" !== t && "list" !== t && "form" !== t && "download" !== t && t in e ) try { e[t] = null == n ? "" : n; break e; } catch (e) {} "function" == typeof n || (null != n && (!1 !== n || ("a" === t[0] && "r" === t[1])) ? e.setAttribute(t, n) : e.removeAttribute(t)); } } function T(e) { this.l[e.type + !1](s.event ? s.event(e) : e); } function R(e) { this.l[e.type + !0](s.event ? s.event(e) : e); } function q(e, t, n, r, o, i, c, a, u) { var l, f, p, m, d, v, h, y, b, g, S, E = t.type; if (void 0 !== t.constructor) return null; null != n.__h && ((u = n.__h), (a = t.__e = n.__e), (t.__h = null), (i = [a])), (l = s.__b) && l(t); try { e: if ("function" == typeof E) { if ( ((y = t.props), (b = (l = E.contextType) && r[l.__c]), (g = l ? (b ? b.props.value : l.__) : r), n.__c ? (h = (f = t.__c = n.__c).__ = f.__E) : ("prototype" in E && E.prototype.render ? (t.__c = f = new E(y, g)) : ((t.__c = f = new w(y, g)), (f.constructor = E), (f.render = F)), b && b.sub(f), (f.props = y), f.state || (f.state = {}), (f.context = g), (f.__n = r), (p = f.__d = !0), (f.__h = [])), null == f.__s && (f.__s = f.state), null != E.getDerivedStateFromProps && (f.__s == f.state && (f.__s = _({}, f.__s)), _(f.__s, E.getDerivedStateFromProps(y, f.__s))), (m = f.props), (d = f.state), p) ) null == E.getDerivedStateFromProps && null != f.componentWillMount && f.componentWillMount(), null != f.componentDidMount && f.__h.push(f.componentDidMount); else { if ( (null == E.getDerivedStateFromProps && y !== m && null != f.componentWillReceiveProps && f.componentWillReceiveProps(y, g), (!f.__e && null != f.shouldComponentUpdate && !1 === f.shouldComponentUpdate(y, f.__s, g)) || t.__v === n.__v) ) { (f.props = y), (f.state = f.__s), t.__v !== n.__v && (f.__d = !1), (f.__v = t), (t.__e = n.__e), (t.__k = n.__k), f.__h.length && c.push(f); break e; } null != f.componentWillUpdate && f.componentWillUpdate(y, f.__s, g), null != f.componentDidUpdate && f.__h.push(function () { f.componentDidUpdate(m, d, v); }); } (f.context = g), (f.props = y), (f.state = f.__s), (l = s.__r) && l(t), (f.__d = !1), (f.__v = t), (f.__P = e), (l = f.render(f.props, f.state, f.context)), (f.state = f.__s), null != f.getChildContext && (r = _(_({}, r), f.getChildContext())), p || null == f.getSnapshotBeforeUpdate || (v = f.getSnapshotBeforeUpdate(m, d)), (S = null != l && l.type === O && null == l.key ? l.props.children : l), D(e, Array.isArray(S) ? S : [S], t, n, r, o, i, c, a, u), (f.base = t.__e), (t.__h = null), f.__h.length && c.push(f), h && (f.__E = f.__ = null), (f.__e = !1); } else null == i && t.__v === n.__v ? ((t.__k = n.__k), (t.__e = n.__e)) : (t.__e = M(n.__e, t, n, r, o, i, c, u)); (l = s.diffed) && l(t); } catch (e) { (t.__v = null), (u || null != i) && ((t.__e = a), (t.__h = !!u), (i[i.indexOf(a)] = null)), s.__e(e, t, n); } } function L(e, t) { s.__c && s.__c(t, e), e.some(function (t) { try { (e = t.__h), (t.__h = []), e.some(function (e) { e.call(t); }); } catch (e) { s.__e(e, t.__v); } }); } function M(e, t, n, r, o, i, c, a) { var u, l, s, f, p = n.props, m = t.props, d = t.type, y = 0; if (("svg" === d && (o = !0), null != i)) for (; y < i.length; y++) if ( (u = i[y]) && (u === e || (d ? u.localName == d : 3 == u.nodeType)) ) { (e = u), (i[y] = null); break; } if (null == e) { if (null === d) return document.createTextNode(m); (e = o ? document.createElementNS("http://www.w3.org/2000/svg", d) : document.createElement(d, m.is && m)), (i = null), (a = !1); } if (null === d) p === m || (a && e.data === m) || (e.data = m); else { if ( ((i = i && h.slice.call(e.childNodes)), (l = (p = n.props || v).dangerouslySetInnerHTML), (s = m.dangerouslySetInnerHTML), !a) ) { if (null != i) for (p = {}, f = 0; f < e.attributes.length; f++) p[e.attributes[f].name] = e.attributes[f].value; (s || l) && ((s && ((l && s.__html == l.__html) || s.__html === e.innerHTML)) || (e.innerHTML = (s && s.__html) || "")); } if ( ((function (e, t, n, r, o) { var i; for (i in n) "children" === i || "key" === i || i in t || N(e, i, null, n[i], r); for (i in t) (o && "function" != typeof t[i]) || "children" === i || "key" === i || "value" === i || "checked" === i || n[i] === t[i] || N(e, i, t[i], n[i], r); })(e, m, p, o, a), s) ) t.__k = []; else if ( ((y = t.props.children), D( e, Array.isArray(y) ? y : [y], t, n, r, o && "foreignObject" !== d, i, c, e.firstChild, a, ), null != i) ) for (y = i.length; y--; ) null != i[y] && b(i[y]); a || ("value" in m && void 0 !== (y = m.value) && (y !== e.value || ("progress" === d && !y)) && N(e, "value", y, p.value, !1), "checked" in m && void 0 !== (y = m.checked) && y !== e.checked && N(e, "checked", y, p.checked, !1)); } return e; } function H(e, t, n) { try { "function" == typeof e ? e(t) : (e.current = t); } catch (e) { s.__e(e, n); } } function U(e, t, n) { var r, o, i; if ( (s.unmount && s.unmount(e), (r = e.ref) && ((r.current && r.current !== e.__e) || H(r, null, t)), n || "function" == typeof e.type || (n = null != (o = e.__e)), (e.__e = e.__d = void 0), null != (r = e.__c)) ) { if (r.componentWillUnmount) try { r.componentWillUnmount(); } catch (e) { s.__e(e, t); } r.base = r.__P = null; } if ((r = e.__k)) for (i = 0; i < r.length; i++) r[i] && U(r[i], t, n); null != o && b(o); } function F(e, t, n) { return this.constructor(e, n); } function B(e, t, n) { var r, o, i; s.__ && s.__(e, t), (o = (r = "function" == typeof n) ? null : (n && n.__k) || t.__k), (i = []), q( t, (e = ((!r && n) || t).__k = g(O, null, [e])), o || v, v, void 0 !== t.ownerSVGElement, !r && n ? [n] : o ? null : t.firstChild ? h.slice.call(t.childNodes) : null, i, !r && n ? n : o ? o.__e : t.firstChild, r, ), L(i, e); } function V(e, t) { B(e, t, V); } function K(e, t, n) { var r, o, i, c = arguments, a = _({}, e.props); for (i in t) "key" == i ? (r = t[i]) : "ref" == i ? (o = t[i]) : (a[i] = t[i]); if (arguments.length > 3) for (n = [n], i = 3; i < arguments.length; i++) n.push(c[i]); return ( null != n && (a.children = n), S(e.type, a, r || e.key, o || e.ref, null) ); } (s = { __e: function (e, t) { for (var n, r, o; (t = t.__); ) if ((n = t.__c) && !n.__) try { if ( ((r = n.constructor) && null != r.getDerivedStateFromError && (n.setState(r.getDerivedStateFromError(e)), (o = n.__d)), null != n.componentDidCatch && (n.componentDidCatch(e), (o = n.__d)), o) ) return (n.__E = n); } catch (t) { e = t; } throw e; }, __v: 0, }), (w.prototype.setState = function (e, t) { var n; (n = null != this.__s && this.__s !== this.state ? this.__s : (this.__s = _({}, this.state))), "function" == typeof e && (e = e(_({}, n), this.props)), e && _(n, e), null != e && this.__v && (t && this.__h.push(t), P(this)); }), (w.prototype.forceUpdate = function (e) { this.__v && ((this.__e = !0), e && this.__h.push(e), P(this)); }), (w.prototype.render = O), (f = []), (p = "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout), (I.__r = 0), (d = 0); var W, z, J, $ = 0, Z = [], Q = s.__b, Y = s.__r, G = s.diffed, X = s.__c, ee = s.unmount; function te(e, t) { s.__h && s.__h(z, e, $ || t), ($ = 0); var n = z.__H || (z.__H = { __: [], __h: [] }); return e >= n.__.length && n.__.push({}), n.__[e]; } function ne(e) { return ($ = 1), re(pe, e); } function re(e, t, n) { var r = te(W++, 2); return ( (r.t = e), r.__c || ((r.__ = [ n ? n(t) : pe(void 0, t), function (e) { var t = r.t(r.__[0], e); r.__[0] !== t && ((r.__ = [t, r.__[1]]), r.__c.setState({})); }, ]), (r.__c = z)), r.__ ); } function oe(e, t) { var n = te(W++, 3); !s.__s && fe(n.__H, t) && ((n.__ = e), (n.__H = t), z.__H.__h.push(n)); } function ie(e, t) { var n = te(W++, 4); !s.__s && fe(n.__H, t) && ((n.__ = e), (n.__H = t), z.__h.push(n)); } function ce(e, t) { var n = te(W++, 7); return fe(n.__H, t) && ((n.__ = e()), (n.__H = t), (n.__h = e)), n.__; } function ae() { Z.forEach(function (e) { if (e.__P) try { e.__H.__h.forEach(le), e.__H.__h.forEach(se), (e.__H.__h = []); } catch (t) { (e.__H.__h = []), s.__e(t, e.__v); } }), (Z = []); } (s.__b = function (e) { (z = null), Q && Q(e); }), (s.__r = function (e) { Y && Y(e), (W = 0); var t = (z = e.__c).__H; t && (t.__h.forEach(le), t.__h.forEach(se), (t.__h = [])); }), (s.diffed = function (e) { G && G(e); var t = e.__c; t && t.__H && t.__H.__h.length && ((1 !== Z.push(t) && J === s.requestAnimationFrame) || ( (J = s.requestAnimationFrame) || function (e) { var t, n = function () { clearTimeout(r), ue && cancelAnimationFrame(t), setTimeout(e); }, r = setTimeout(n, 100); ue && (t = requestAnimationFrame(n)); } )(ae)), (z = void 0); }), (s.__c = function (e, t) { t.some(function (e) { try { e.__h.forEach(le), (e.__h = e.__h.filter(function (e) { return !e.__ || se(e); })); } catch (n) { t.some(function (e) { e.__h && (e.__h = []); }), (t = []), s.__e(n, e.__v); } }), X && X(e, t); }), (s.unmount = function (e) { ee && ee(e); var t = e.__c; if (t && t.__H) try { t.__H.__.forEach(le); } catch (e) { s.__e(e, t.__v); } }); var ue = "function" == typeof requestAnimationFrame; function le(e) { var t = z; "function" == typeof e.__c && e.__c(), (z = t); } function se(e) { var t = z; (e.__c = e.__()), (z = t); } function fe(e, t) { return ( !e || e.length !== t.length || t.some(function (t, n) { return t !== e[n]; }) ); } function pe(e, t) { return "function" == typeof t ? t(e) : t; } function me(e, t) { for (var n in t) e[n] = t[n]; return e; } function de(e, t) { for (var n in e) if ("__source" !== n && !(n in t)) return !0; for (var r in t) if ("__source" !== r && e[r] !== t[r]) return !0; return !1; } function ve(e) { this.props = e; } ((ve.prototype = new w()).isPureReactComponent = !0), (ve.prototype.shouldComponentUpdate = function (e, t) { return de(this.props, e) || de(this.state, t); }); var he = s.__b; s.__b = function (e) { e.type && e.type.__f && e.ref && ((e.props.ref = e.ref), (e.ref = null)), he && he(e); }; var ye = ("undefined" != typeof Symbol && Symbol.for && Symbol.for("react.forward_ref")) || 3911; var _e = function (e, t) { return null == e ? null : C(C(e).map(t)); }, be = { map: _e, forEach: _e, count: function (e) { return e ? C(e).length : 0; }, only: function (e) { var t = C(e); if (1 !== t.length) throw "Children.only"; return t[0]; }, toArray: C, }, ge = s.__e; function Se() { (this.__u = 0), (this.t = null), (this.__b = null); } function Oe(e) { var t = e.__.__c; return t && t.__e && t.__e(e); } function we() { (this.u = null), (this.o = null); } (s.__e = function (e, t, n) { if (e.then) for (var r, o = t; (o = o.__); ) if ((r = o.__c) && r.__c) return ( null == t.__e && ((t.__e = n.__e), (t.__k = n.__k)), r.__c(e, t) ); ge(e, t, n); }), ((Se.prototype = new w()).__c = function (e, t) { var n = t.__c, r = this; null == r.t && (r.t = []), r.t.push(n); var o = Oe(r.__v), i = !1, c = function () { i || ((i = !0), (n.componentWillUnmount = n.__c), o ? o(a) : a()); }; (n.__c = n.componentWillUnmount), (n.componentWillUnmount = function () { c(), n.__c && n.__c(); }); var a = function () { if (!--r.__u) { if (r.state.__e) { var e = r.state.__e; r.__v.__k[0] = (function e(t, n, r) { return ( t && ((t.__v = null), (t.__k = t.__k && t.__k.map(function (t) { return e(t, n, r); })), t.__c && t.__c.__P === n && (t.__e && r.insertBefore(t.__e, t.__d), (t.__c.__e = !0), (t.__c.__P = r))), t ); })(e, e.__c.__P, e.__c.__O); } var t; for (r.setState({ __e: (r.__b = null) }); (t = r.t.pop()); ) t.forceUpdate(); } }, u = !0 === t.__h; r.__u++ || u || r.setState({ __e: (r.__b = r.__v.__k[0]) }), e.then(c, c); }), (Se.prototype.componentWillUnmount = function () { this.t = []; }), (Se.prototype.render = function (e, t) { if (this.__b) { if (this.__v.__k) { var n = document.createElement("div"), r = this.__v.__k[0].__c; this.__v.__k[0] = (function e(t, n, r) { return ( t && (t.__c && t.__c.__H && (t.__c.__H.__.forEach(function (e) { "function" == typeof e.__c && e.__c(); }), (t.__c.__H = null)), null != (t = me({}, t)).__c && (t.__c.__P === r && (t.__c.__P = n), (t.__c = null)), (t.__k = t.__k && t.__k.map(function (t) { return e(t, n, r); }))), t ); })(this.__b, n, (r.__O = r.__P)); } this.__b = null; } var o = t.__e && g(O, null, e.fallback); return o && (o.__h = null), [g(O, null, t.__e ? null : e.children), o]; }); var Ee = function (e, t, n) { if ( (++n[1] === n[0] && e.o.delete(t), e.props.revealOrder && ("t" !== e.props.revealOrder[0] || !e.o.size)) ) for (n = e.u; n; ) { for (; n.length > 3; ) n.pop()(); if (n[1] < n[0]) break; e.u = n = n[2]; } }; function je(e) { return ( (this.getChildContext = function () { return e.context; }), e.children ); } function Pe(e) { var t = this, n = e.i; (t.componentWillUnmount = function () { B(null, t.l), (t.l = null), (t.i = null); }), t.i && t.i !== n && t.componentWillUnmount(), e.__v ? (t.l || ((t.i = n), (t.l = { nodeType: 1, parentNode: n, childNodes: [], appendChild: function (e) { this.childNodes.push(e), t.i.appendChild(e); }, insertBefore: function (e, n) { this.childNodes.push(e), t.i.appendChild(e); }, removeChild: function (e) { this.childNodes.splice(this.childNodes.indexOf(e) >>> 1, 1), t.i.removeChild(e); }, })), B(g(je, { context: t.context }, e.__v), t.l)) : t.l && t.componentWillUnmount(); } function Ie(e, t) { return g(Pe, { __v: e, i: t }); } ((we.prototype = new w()).__e = function (e) { var t = this, n = Oe(t.__v), r = t.o.get(e); return ( r[0]++, function (o) { var i = function () { t.props.revealOrder ? (r.push(o), Ee(t, e, r)) : o(); }; n ? n(i) : i(); } ); }), (we.prototype.render = function (e) { (this.u = null), (this.o = new Map()); var t = C(e.children); e.revealOrder && "b" === e.revealOrder[0] && t.reverse(); for (var n = t.length; n--; ) this.o.set(t[n], (this.u = [1, 0, this.u])); return e.children; }), (we.prototype.componentDidUpdate = we.prototype.componentDidMount = function () { var e = this; this.o.forEach(function (t, n) { Ee(e, n, t); }); }); var De = ("undefined" != typeof Symbol && Symbol.for && Symbol.for("react.element")) || 60103, ke = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, Ce = function (e) { return ( "undefined" != typeof Symbol && "symbol" == n(Symbol()) ? /fil|che|rad/i : /fil|che|ra/i ).test(e); }; function Ae(e, t, n) { return ( null == t.__k && (t.textContent = ""), B(e, t), "function" == typeof n && n(), e ? e.__c : null ); } (w.prototype.isReactComponent = {}), [ "componentWillMount", "componentWillReceiveProps", "componentWillUpdate", ].forEach(function (e) { Object.defineProperty(w.prototype, e, { configurable: !0, get: function () { return this["UNSAFE_" + e]; }, set: function (t) { Object.defineProperty(this, e, { configurable: !0, writable: !0, value: t, }); }, }); }); var xe = s.event; function Ne() {} function Te() { return this.cancelBubble; } function Re() { return this.defaultPrevented; } s.event = function (e) { return ( xe && (e = xe(e)), (e.persist = Ne), (e.isPropagationStopped = Te), (e.isDefaultPrevented = Re), (e.nativeEvent = e) ); }; var qe, Le = { configurable: !0, get: function () { return this.class; }, }, Me = s.vnode; s.vnode = function (e) { var t = e.type, n = e.props, r = n; if ("string" == typeof t) { for (var o in ((r = {}), n)) { var i = n[o]; ("value" === o && "defaultValue" in n && null == i) || ("defaultValue" === o && "value" in n && null == n.value ? (o = "value") : "download" === o && !0 === i ? (i = "") : /ondoubleclick/i.test(o) ? (o = "ondblclick") : /^onchange(textarea|input)/i.test(o + t) && !Ce(n.type) ? (o = "oninput") : /^on(Ani|Tra|Tou|BeforeInp)/.test(o) ? (o = o.toLowerCase()) : ke.test(o) ? (o = o.replace(/[A-Z0-9]/, "-$&").toLowerCase()) : null === i && (i = void 0), (r[o] = i)); } "select" == t && r.multiple && Array.isArray(r.value) && (r.value = C(n.children).forEach(function (e) { e.props.selected = -1 != r.value.indexOf(e.props.value); })), "select" == t && null != r.defaultValue && (r.value = C(n.children).forEach(function (e) { e.props.selected = r.multiple ? -1 != r.defaultValue.indexOf(e.props.value) : r.defaultValue == e.props.value; })), (e.props = r); } t && n.class != n.className && ((Le.enumerable = "className" in n), null != n.className && (r.class = n.className), Object.defineProperty(r, "className", Le)), (e.$$typeof = De), Me && Me(e); }; var He = s.__r; s.__r = function (e) { He && He(e), (qe = e.__c); }; var Ue = { ReactCurrentDispatcher: { current: { readContext: function (e) { return qe.__n[e.__c].props.value; }, }, }, }; "object" == ("undefined" == typeof performance ? "undefined" : n(performance)) && "function" == typeof performance.now && performance.now.bind(performance); function Fe(e) { return !!e && e.$$typeof === De; } var Be = { useState: ne, useReducer: re, useEffect: oe, useLayoutEffect: ie, useRef: function (e) { return ( ($ = 5), ce(function () { return { current: e }; }, []) ); }, useImperativeHandle: function (e, t, n) { ($ = 6), ie( function () { "function" == typeof e ? e(t()) : e && (e.current = t()); }, null == n ? n : n.concat(e), ); }, useMemo: ce, useCallback: function (e, t) { return ( ($ = 8), ce(function () { return e; }, t) ); }, useContext: function (e) { var t = z.context[e.__c], n = te(W++, 9); return ( (n.__c = e), t ? (null == n.__ && ((n.__ = !0), t.sub(z)), t.props.value) : e.__ ); }, useDebugValue: function (e, t) { s.useDebugValue && s.useDebugValue(t ? t(e) : e); }, version: "16.8.0", Children: be, render: Ae, hydrate: function (e, t, n) { return V(e, t), "function" == typeof n && n(), e ? e.__c : null; }, unmountComponentAtNode: function (e) { return !!e.__k && (B(null, e), !0); }, createPortal: Ie, createElement: g, createContext: function (e, t) { var n = { __c: (t = "__cC" + d++), __: e, Consumer: function (e, t) { return e.children(t); }, Provider: function (e) { var n, r; return ( this.getChildContext || ((n = []), ((r = {})[t] = this), (this.getChildContext = function () { return r; }), (this.shouldComponentUpdate = function (e) { this.props.value !== e.value && n.some(P); }), (this.sub = function (e) { n.push(e); var t = e.componentWillUnmount; e.componentWillUnmount = function () { n.splice(n.indexOf(e), 1), t && t.call(e); }; })), e.children ); }, }; return (n.Provider.__ = n.Consumer.contextType = n); }, createFactory: function (e) { return g.bind(null, e); }, cloneElement: function (e) { return Fe(e) ? K.apply(null, arguments) : e; }, createRef: function () { return { current: null }; }, Fragment: O, isValidElement: Fe, findDOMNode: function (e) { return (e && (e.base || (1 === e.nodeType && e))) || null; }, Component: w, PureComponent: ve, memo: function (e, t) { function n(e) { var n = this.props.ref, r = n == e.ref; return ( !r && n && (n.call ? n(null) : (n.current = null)), t ? !t(this.props, e) || !r : de(this.props, e) ); } function r(t) { return (this.shouldComponentUpdate = n), g(e, t); } return ( (r.displayName = "Memo(" + (e.displayName || e.name) + ")"), (r.prototype.isReactComponent = !0), (r.__f = !0), r ); }, forwardRef: function (e) { function t(t, r) { var o = me({}, t); return ( delete o.ref, e( o, (r = t.ref || r) && ("object" != n(r) || "current" in r) ? r : null, ) ); } return ( (t.$$typeof = ye), (t.render = t), (t.prototype.isReactComponent = t.__f = !0), (t.displayName = "ForwardRef(" + (e.displayName || e.name) + ")"), t ); }, unstable_batchedUpdates: function (e, t) { return e(t); }, StrictMode: O, Suspense: Se, SuspenseList: we, lazy: function (e) { var t, n, r; function o(o) { if ( (t || (t = e()).then( function (e) { n = e.default || e; }, function (e) { r = e; }, ), r) ) throw r; if (!n) throw t; return g(n, o); } return (o.displayName = "Lazy"), (o.__f = !0), o; }, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Ue, }, Ve = ["facetName", "facetQuery"]; function Ke(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 We(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? Ke(Object(n), !0).forEach(function (t) { ze(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Ke(Object(n)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); }); } return e; } function ze(e, t, n) { return ( t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0, }) : (e[t] = n), e ); } function Je() { return ( (Je = 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; }), Je.apply(this, arguments) ); } function $e(e, t) { if (null == e) return {}; var n, r, o = (function (e, t) { if (null == e) return {}; var n, r, o = {}, i = Object.keys(e); for (r = 0; r < i.length; r++) (n = i[r]), t.indexOf(n) >= 0 || (o[n] = e[n]); return o; })(e, t); if (Object.getOwnPropertySymbols) { var i = Object.getOwnPropertySymbols(e); for (r = 0; r < i.length; r++) (n = i[r]), t.indexOf(n) >= 0 || (Object.prototype.propertyIsEnumerable.call(e, n) && (o[n] = e[n])); } return o; } function Ze(e, t) { return ( (function (e) { if (Array.isArray(e)) return e; })(e) || (function (e, t) { var n = null == e ? null : ("undefined" != typeof Symbol && e[Symbol.iterator]) || e["@@iterator"]; if (null != n) { var r, o, i = [], c = !0, a = !1; try { for ( n = n.call(e); !(c = (r = n.next()).done) && (i.push(r.value), !t || i.length !== t); c = !0 ); } catch (e) { (a = !0), (o = e); } finally { try { c || null == n.return || n.return(); } finally { if (a) throw o; } } return i; } })(e, t) || Qe(e, t) || (function () { throw new TypeError( "Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.", ); })() ); } function Qe(e, t) { if (e) { if ("string" == typeof e) return Ye(e, t); var n = Object.prototype.toString.call(e).slice(8, -1); return ( "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? Ye(e, t) : void 0 ); } } function Ye(e, t) { (null == t || t > e.length) && (t = e.length); for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n]; return r; } function Ge() { return Be.createElement( "svg", { width: "15", height: "15", className: "DocSearch-Control-Key-Icon" }, Be.createElement("path", { d: "M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953", strokeWidth: "1.2", stroke: "currentColor", fill: "none", strokeLinecap: "square", }), ); } function Xe() { return Be.createElement( "svg", { width: "20", height: "20", className: "DocSearch-Search-Icon", viewBox: "0 0 20 20", "aria-hidden": "true", }, Be.createElement("path", { d: "M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z", stroke: "currentColor", fill: "none", fillRule: "evenodd", strokeLinecap: "round", strokeLinejoin: "round", }), ); } var et = ["translations"], tt = Be.forwardRef(function (e, t) { var n = e.translations, r = void 0 === n ? {} : n, o = $e(e, et), i = r.buttonText, c = void 0 === i ? "Search" : i, a = r.buttonAriaLabel, u = void 0 === a ? "Search" : a, l = Ze(ne(null), 2), s = l[0], f = l[1]; return ( oe(function () { "undefined" != typeof navigator && (/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ? f("⌘") : f("Ctrl")); }, []), Be.createElement( "button", Je( { type: "button", className: "DocSearch DocSearch-Button", "aria-label": u, }, o, { ref: t }, ), Be.createElement( "span", { className: "DocSearch-Button-Container" }, Be.createElement(Xe, null), Be.createElement( "span", { className: "DocSearch-Button-Placeholder" }, c, ), ), Be.createElement( "span", { className: "DocSearch-Button-Keys" }, null !== s && Be.createElement( Be.Fragment, null, Be.createElement( nt, { reactsToKey: "Ctrl" === s ? "Ctrl" : "Meta" }, "Ctrl" === s ? Be.createElement(Ge, null) : s, ), Be.createElement(nt, { reactsToKey: "k" }, "K"), ), ), ) ); }); function nt(e) { var t = e.reactsToKey, n = e.children, r = Ze(ne(!1), 2), o = r[0], i = r[1]; return ( oe( function () { if (t) return ( window.addEventListener("keydown", e), window.addEventListener("keyup", n), function () { window.removeEventListener("keydown", e), window.removeEventListener("keyup", n); } ); function e(e) { e.key === t && i(!0); } function n(e) { (e.key !== t && "Meta" !== e.key) || i(!1); } }, [t], ), Be.createElement( "kbd", { className: o ? "DocSearch-Button-Key DocSearch-Button-Key--pressed" : "DocSearch-Button-Key", }, n, ) ); } function rt(e, t) { var n = void 0; return function () { for (var r = arguments.length, o = new Array(r), i = 0; i < r; i++) o[i] = arguments[i]; n && clearTimeout(n), (n = setTimeout(function () { return e.apply(void 0, o); }, t)); }; } function ot(e) { return e.reduce(function (e, t) { return e.concat(t); }, []); } var it = 0; function ct(e) { return 0 === e.collections.length ? 0 : e.collections.reduce(function (e, t) { return e + t.items.length; }, 0); } function at(e) { return e !== Object(e); } function ut(e, t) { if (e === t) return !0; if (at(e) || at(t) || "function" == typeof e || "function" == typeof t) return e === t; if (Object.keys(e).length !== Object.keys(t).length) return !1; for (var n = 0, r = Object.keys(e); n < r.length; n++) { var o = r[n]; if (!(o in t)) return !1; if (!ut(e[o], t[o])) return !1; } return !0; } var lt = function () {}, st = [{ segment: "autocomplete-core", version: "1.9.3" }]; function ft(e) { var t = e.item, n = e.items; return { index: t.__autocomplete_indexName, items: [t], positions: [ 1 + n.findIndex(function (e) { return e.objectID === t.objectID; }), ], queryID: t.__autocomplete_queryID, algoliaSource: ["autocomplete"], }; } function pt(e, t) { (null == t || t > e.length) && (t = e.length); for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n]; return r; } var mt = ["items"], dt = ["items"]; function vt(e) { return ( (vt = "function" == typeof Symbol && "symbol" == n(Symbol.iterator) ? function (e) { return n(e); } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : n(e); }), vt(e) ); } function ht(e) { return ( (function (e) { if (Array.isArray(e)) return yt(e); })(e) || (function (e) { if ( ("undefined" != typeof Symbol && null != e[Symbol.iterator]) || null != e["@@iterator"] ) return Array.from(e); })(e) || (function (e, t) { if (e) { if ("string" == typeof e) return yt(e, t); var n = Object.prototype.toString.call(e).slice(8, -1); return ( "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? yt(e, t) : void 0 ); } })(e) || (function () { throw new TypeError( "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.", ); })() ); } function yt(e, t) { (null == t || t > e.length) && (t = e.length); for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n]; return r; } function _t(e, t) { if (null == e) return {}; var n, r, o = (function (e, t) { if (null == e) return {}; var n, r, o = {}, i = Object.keys(e); for (r = 0; r < i.length; r++) (n = i[r]), t.indexOf(n) >= 0 || (o[n] = e[n]); return o; })(e, t); if (Object.getOwnPropertySymbols) { var i = Object.getOwnPropertySymbols(e); for (r = 0; r < i.length; r++) (n = i[r]), t.indexOf(n) >= 0 || (Object.prototype.propertyIsEnumerable.call(e, n) && (o[n] = e[n])); } return o; } function bt(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 gt(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? bt(Object(n), !0).forEach(function (t) { St(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : bt(Object(n)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); }); } return e; } function St(e, t, n) { return ( (t = (function (e) { var t = (function (e, t) { if ("object" !== vt(e) || null === e) return e; var n = e[Symbol.toPrimitive]; if (void 0 !== n) { var r = n.call(e, t); if ("object" !== vt(r)) return r; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(e); })(e, "string"); return "symbol" === vt(t) ? t : String(t); })(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0, }) : (e[t] = n), e ); } function Ot(e) { for ( var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 20, n = [], r = 0; r < e.objectIDs.length; r += t ) n.push(gt(gt({}, e), {}, { objectIDs: e.objectIDs.slice(r, r + t) })); return n; } function wt(e) { return e.map(function (e) { var t = e.items, n = _t(e, mt); return gt( gt({}, n), {}, { objectIDs: (null == t ? void 0 : t.map(function (e) { return e.objectID; })) || n.objectIDs, }, ); }); } function Et(e) { var t, n, r, o = ((t = (function (e, t) { return ( (function (e) { if (Array.isArray(e)) return e; })(e) || (function (e, t) { var n = null == e ? null : ("undefined" != typeof Symbol && e[Symbol.iterator]) || e["@@iterator"]; if (null != n) { var r, o, i, c, a = [], u = !0, l = !1; try { if (((i = (n = n.call(e)).next), 0 === t)) { if (Object(n) !== n) return; u = !1; } else for ( ; !(u = (r = i.call(n)).done) && (a.push(r.value), a.length !== t); u = !0 ); } catch (e) { (l = !0), (o = e); } finally { try { if ( !u && null != n.return && ((c = n.return()), Object(c) !== c) ) return; } finally { if (l) throw o; } } return a; } })(e, t) || (function (e, t) { if (e) { if ("string" == typeof e) return pt(e, t); var n = Object.prototype.toString.call(e).slice(8, -1); return ( "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? pt(e, t) : void 0 ); } })(e, t) || (function () { throw new TypeError( "Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.", ); })() ); })((e.version || "").split(".").map(Number), 2)), (n = t[0]), (r = t[1]), n >= 3 || (2 === n && r >= 4) || (1 === n && r >= 10)); function i(t, n, r) { if (o && void 0 !== r) { var i = r[0].__autocomplete_algoliaCredentials, c = { "X-Algolia-Application-Id": i.appId, "X-Algolia-API-Key": i.apiKey, }; e.apply(void 0, [t].concat(ht(n), [{ headers: c }])); } else e.apply(void 0, [t].concat(ht(n))); } return { init: function (t, n) { e("init", { appId: t, apiKey: n }); }, setUserToken: function (t) { e("setUserToken", t); }, clickedObjectIDsAfterSearch: function () { for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]; t.length > 0 && i("clickedObjectIDsAfterSearch", wt(t), t[0].items); }, clickedObjectIDs: function () { for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]; t.length > 0 && i("clickedObjectIDs", wt(t), t[0].items); }, clickedFilters: function () { for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++) n[r] = arguments[r]; n.length > 0 && e.apply(void 0, ["clickedFilters"].concat(n)); }, convertedObjectIDsAfterSearch: function () { for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]; t.length > 0 && i("convertedObjectIDsAfterSearch", wt(t), t[0].items); }, convertedObjectIDs: function () { for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]; t.length > 0 && i("convertedObjectIDs", wt(t), t[0].items); }, convertedFilters: function () { for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++) n[r] = arguments[r]; n.length > 0 && e.apply(void 0, ["convertedFilters"].concat(n)); }, viewedObjectIDs: function () { for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]; t.length > 0 && t .reduce(function (e, t) { var n = t.items, r = _t(t, dt); return [].concat( ht(e), ht( Ot( gt( gt({}, r), {}, { objectIDs: (null == n ? void 0 : n.map(function (e) { return e.objectID; })) || r.objectIDs, }, ), ).map(function (e) { return { items: n, payload: e }; }), ), ); }, []) .forEach(function (e) { var t = e.items; return i("viewedObjectIDs", [e.payload], t); }); }, viewedFilters: function () { for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++) n[r] = arguments[r]; n.length > 0 && e.apply(void 0, ["viewedFilters"].concat(n)); }, }; } function jt(e) { var t = e.items.reduce(function (e, t) { var n; return ( (e[t.__autocomplete_indexName] = ( null !== (n = e[t.__autocomplete_indexName]) && void 0 !== n ? n : [] ).concat(t)), e ); }, {}); return Object.keys(t).map(function (e) { return { index: e, items: t[e], algoliaSource: ["autocomplete"] }; }); } function Pt(e) { return e.objectID && e.__autocomplete_indexName && e.__autocomplete_queryID; } function It(e) { return ( (It = "function" == typeof Symbol && "symbol" == n(Symbol.iterator) ? function (e) { return n(e); } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : n(e); }), It(e) ); } function Dt(e) { return ( (function (e) { if (Array.isArray(e)) return kt(e); })(e) || (function (e) { if ( ("undefined" != typeof Symbol && null != e[Symbol.iterator]) || null != e["@@iterator"] ) return Array.from(e); })(e) || (function (e, t) { if (e) { if ("string" == typeof e) return kt(e, t); var n = Object.prototype.toString.call(e).slice(8, -1); return ( "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? kt(e, t) : void 0 ); } })(e) || (function () { throw new TypeError( "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.", ); })() ); } function kt(e, t) { (null == t || t > e.length) && (t = e.length); for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n]; return r; } function Ct(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 At(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? Ct(Object(n), !0).forEach(function (t) { xt(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Ct(Object(n)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); }); } return e; } function xt(e, t, n) { return ( (t = (function (e) { var t = (function (e, t) { if ("object" !== It(e) || null === e) return e; var n = e[Symbol.toPrimitive]; if (void 0 !== n) { var r = n.call(e, t); if ("object" !== It(r)) return r; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(e); })(e, "string"); return "symbol" === It(t) ? t : String(t); })(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0, }) : (e[t] = n), e ); } var Nt = "https://cdn.jsdelivr.net/npm/search-insights@".concat( "2.6.0", "/dist/search-insights.min.js", ), Tt = rt(function (e) { var t = e.onItemsChange, n = e.items, r = e.insights, o = e.state; t({ insights: r, insightsEvents: jt({ items: n }).map(function (e) { return At({ eventName: "Items Viewed" }, e); }), state: o, }); }, 400); function Rt(e) { var t = (function (e) { return At( { onItemsChange: function (e) { var t = e.insights, n = e.insightsEvents; t.viewedObjectIDs.apply( t, Dt( n.map(function (e) { return At( At({}, e), {}, { algoliaSource: [].concat(Dt(e.algoliaSource || []), [ "autocomplete-internal", ]), }, ); }), ), ); }, onSelect: function (e) { var t = e.insights, n = e.insightsEvents; t.clickedObjectIDsAfterSearch.apply( t, Dt( n.map(function (e) { return At( At({}, e), {}, { algoliaSource: [].concat(Dt(e.algoliaSource || []), [ "autocomplete-internal", ]), }, ); }), ), ); }, onActive: lt, }, e, ); })(e), n = t.insightsClient, r = t.onItemsChange, o = t.onSelect, i = t.onActive, c = n; n || ("undefined" != typeof window && (function (e) { var t = e.window, n = t.AlgoliaAnalyticsObject || "aa"; "string" == typeof n && (c = t[n]), c || ((t.AlgoliaAnalyticsObject = n), t[n] || (t[n] = function () { t[n].queue || (t[n].queue = []); for ( var e = arguments.length, r = new Array(e), o = 0; o < e; o++ ) r[o] = arguments[o]; t[n].queue.push(r); }), (t[n].version = "2.6.0"), (c = t[n]), (function (e) { var t = "[Autocomplete]: Could not load search-insights.js. Please load it manually following https://alg.li/insights-autocomplete"; try { var n = e.document.createElement("script"); (n.async = !0), (n.src = Nt), (n.onerror = function () { console.error(t); }), document.body.appendChild(n); } catch (e) { console.error(t); } })(t)); })({ window: window })); var a = Et(c), u = { current: [] }, l = rt(function (e) { var t = e.state; if (t.isOpen) { var n = t.collections .reduce(function (e, t) { return [].concat(Dt(e), Dt(t.items)); }, []) .filter(Pt); ut( u.current.map(function (e) { return e.objectID; }), n.map(function (e) { return e.objectID; }), ) || ((u.current = n), n.length > 0 && Tt({ onItemsChange: r, items: n, insights: a, state: t })); } }, 0); return { name: "aa.algoliaInsightsPlugin", subscribe: function (e) { var t = e.setContext, n = e.onSelect, r = e.onActive; c("addAlgoliaAgent", "insights-plugin"), t({ algoliaInsightsPlugin: { __algoliaSearchParameters: { clickAnalytics: !0 }, insights: a, }, }), n(function (e) { var t = e.item, n = e.state, r = e.event; Pt(t) && o({ state: n, event: r, insights: a, item: t, insightsEvents: [ At( { eventName: "Item Selected" }, ft({ item: t, items: u.current }), ), ], }); }), r(function (e) { var t = e.item, n = e.state, r = e.event; Pt(t) && i({ state: n, event: r, insights: a, item: t, insightsEvents: [ At( { eventName: "Item Active" }, ft({ item: t, items: u.current }), ), ], }); }); }, onStateChange: function (e) { var t = e.state; l({ state: t }); }, __autocomplete_pluginOptions: e, }; } function qt(e, t) { var n = t; return { then: function (t, r) { return qt(e.then(Mt(t, n, e), Mt(r, n, e)), n); }, catch: function (t) { return qt(e.catch(Mt(t, n, e)), n); }, finally: function (t) { return ( t && n.onCancelList.push(t), qt( e.finally( Mt( t && function () { return (n.onCancelList = []), t(); }, n, e, ), ), n, ) ); }, cancel: function () { n.isCanceled = !0; var e = n.onCancelList; (n.onCancelList = []), e.forEach(function (e) { e(); }); }, isCanceled: function () { return !0 === n.isCanceled; }, }; } function Lt(e) { return qt(e, { isCanceled: !1, onCancelList: [] }); } function Mt(e, t, n) { return e ? function (n) { return t.isCanceled ? n : e(n); } : n; } function Ht(e, t, n, r) { if (!n) return null; if (e < 0 && (null === t || (null !== r && 0 === t))) return n + e; var o = (null === t ? -1 : t) + e; return o <= -1 || o >= n ? (null === r ? null : 0) : o; } function Ut(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 Ft(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? Ut(Object(n), !0).forEach(function (t) { Bt(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Ut(Object(n)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); }); } return e; } function Bt(e, t, n) { return ( (t = (function (e) { var t = (function (e, t) { if ("object" !== Vt(e) || null === e) return e; var n = e[Symbol.toPrimitive]; if (void 0 !== n) { var r = n.call(e, t); if ("object" !== Vt(r)) return r; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(e); })(e, "string"); return "symbol" === Vt(t) ? t : String(t); })(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0, }) : (e[t] = n), e ); } function Vt(e) { return ( (Vt = "function" == typeof Symbol && "symbol" == n(Symbol.iterator) ? function (e) { return n(e); } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : n(e); }), Vt(e) ); } function Kt(e) { var t = (function (e) { var t = e.collections .map(function (e) { return e.items.length; }) .reduce(function (e, t, n) { var r = (e[n - 1] || 0) + t; return e.push(r), e; }, []) .reduce(function (t, n) { return n <= e.activeItemId ? t + 1 : t; }, 0); return e.collections[t]; })(e); if (!t) return null; var n = t.items[ (function (e) { for ( var t = e.state, n = e.collection, r = !1, o = 0, i = 0; !1 === r; ) { var c = t.collections[o]; if (c === n) { r = !0; break; } (i += c.items.length), o++; } return t.activeItemId - i; })({ state: e, collection: t }) ], r = t.source; return { item: n, itemInputValue: r.getItemInputValue({ item: n, state: e }), itemUrl: r.getItemUrl({ item: n, state: e }), source: r, }; } var Wt = /((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i; function zt(e) { return ( (zt = "function" == typeof Symbol && "symbol" == n(Symbol.iterator) ? function (e) { return n(e); } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : n(e); }), zt(e) ); } function Jt(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 $t(e, t, n) { return ( (t = (function (e) { var t = (function (e, t) { if ("object" !== zt(e) || null === e) return e; var n = e[Symbol.toPrimitive]; if (void 0 !== n) { var r = n.call(e, t); if ("object" !== zt(r)) return r; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(e); })(e, "string"); return "symbol" === zt(t) ? t : String(t); })(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0, }) : (e[t] = n), e ); } function Zt(e) { return ( (Zt = "function" == typeof Symbol && "symbol" == n(Symbol.iterator) ? function (e) { return n(e); } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : n(e); }), Zt(e) ); } function Qt(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 Yt(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? Qt(Object(n), !0).forEach(function (t) { Gt(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Qt(Object(n)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); }); } return e; } function Gt(e, t, n) { return ( (t = (function (e) { var t = (function (e, t) { if ("object" !== Zt(e) || null === e) return e; var n = e[Symbol.toPrimitive]; if (void 0 !== n) { var r = n.call(e, t); if ("object" !== Zt(r)) return r; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(e); })(e, "string"); return "symbol" === Zt(t) ? t : String(t); })(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0, }) : (e[t] = n), e ); } function Xt(e) { return ( (Xt = "function" == typeof Symbol && "symbol" == n(Symbol.iterator) ? function (e) { return n(e); } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : n(e); }), Xt(e) ); } function en(e, t) { (null == t || t > e.length) && (t = e.length); for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n]; return r; } function tn(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 nn(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? tn(Object(n), !0).forEach(function (t) { rn(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : tn(Object(n)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); }); } return e; } function rn(e, t, n) { return ( (t = (function (e) { var t = (function (e, t) { if ("object" !== Xt(e) || null === e) return e; var n = e[Symbol.toPrimitive]; if (void 0 !== n) { var r = n.call(e, t); if ("object" !== Xt(r)) return r; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(e); })(e, "string"); return "symbol" === Xt(t) ? t : String(t); })(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0, }) : (e[t] = n), e ); } function on(e, t) { var n, r = "undefined" != typeof window ? window : {}, o = e.plugins || []; return nn( nn( { debug: !1, openOnFocus: !1, placeholder: "", autoFocus: !1, defaultActiveItemId: null, stallThreshold: 300, insights: !1, environment: r, shouldPanelOpen: function (e) { return ct(e.state) > 0; }, reshape: function (e) { return e.sources; }, }, e, ), {}, { id: null !== (n = e.id) && void 0 !== n ? n : "autocomplete-".concat(it++), plugins: o, initialState: nn( { activeItemId: null, query: "", completion: null, collections: [], isOpen: !1, status: "idle", context: {}, }, e.initialState, ), onStateChange: function (t) { var n; null === (n = e.onStateChange) || void 0 === n || n.call(e, t), o.forEach(function (e) { var n; return null === (n = e.onStateChange) || void 0 === n ? void 0 : n.call(e, t); }); }, onSubmit: function (t) { var n; null === (n = e.onSubmit) || void 0 === n || n.call(e, t), o.forEach(function (e) { var n; return null === (n = e.onSubmit) || void 0 === n ? void 0 : n.call(e, t); }); }, onReset: function (t) { var n; null === (n = e.onReset) || void 0 === n || n.call(e, t), o.forEach(function (e) { var n; return null === (n = e.onReset) || void 0 === n ? void 0 : n.call(e, t); }); }, getSources: function (n) { return Promise.all( [] .concat( (function (e) { return ( (function (e) { if (Array.isArray(e)) return en(e); })(e) || (function (e) { if ( ("undefined" != typeof Symbol && null != e[Symbol.iterator]) || null != e["@@iterator"] ) return Array.from(e); })(e) || (function (e, t) { if (e) { if ("string" == typeof e) return en(e, t); var n = Object.prototype.toString.call(e).slice(8, -1); return ( "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? en(e, t) : void 0 ); } })(e) || (function () { throw new TypeError( "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.", ); })() ); })( o.map(function (e) { return e.getSources; }), ), [e.getSources], ) .filter(Boolean) .map(function (e) { return (function (e, t) { var n = []; return Promise.resolve(e(t)).then(function (e) { return Promise.all( e .filter(function (e) { return Boolean(e); }) .map(function (e) { if ((e.sourceId, n.includes(e.sourceId))) throw new Error( "[Autocomplete] The `sourceId` ".concat( JSON.stringify(e.sourceId), " is not unique.", ), ); n.push(e.sourceId); var t = { getItemInputValue: function (e) { return e.state.query; }, getItemUrl: function () {}, onSelect: function (e) { (0, e.setIsOpen)(!1); }, onActive: lt, onResolve: lt, }; Object.keys(t).forEach(function (e) { t[e].__default = !0; }); var r = Ft(Ft({}, t), e); return Promise.resolve(r); }), ); }); })(e, n); }), ) .then(function (e) { return ot(e); }) .then(function (e) { return e.map(function (e) { return nn( nn({}, e), {}, { onSelect: function (n) { e.onSelect(n), t.forEach(function (e) { var t; return null === (t = e.onSelect) || void 0 === t ? void 0 : t.call(e, n); }); }, onActive: function (n) { e.onActive(n), t.forEach(function (e) { var t; return null === (t = e.onActive) || void 0 === t ? void 0 : t.call(e, n); }); }, onResolve: function (n) { e.onResolve(n), t.forEach(function (e) { var t; return null === (t = e.onResolve) || void 0 === t ? void 0 : t.call(e, n); }); }, }, ); }); }); }, navigator: nn( { navigate: function (e) { var t = e.itemUrl; r.location.assign(t); }, navigateNewTab: function (e) { var t = e.itemUrl, n = r.open(t, "_blank", "noopener"); null == n || n.focus(); }, navigateNewWindow: function (e) { var t = e.itemUrl; r.open(t, "_blank", "noopener"); }, }, e.navigator, ), }, ); } function cn(e) { return ( (cn = "function" == typeof Symbol && "symbol" == n(Symbol.iterator) ? function (e) { return n(e); } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : n(e); }), cn(e) ); } function an(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 un(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? an(Object(n), !0).forEach(function (t) { ln(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : an(Object(n)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); }); } return e; } function ln(e, t, n) { return ( (t = (function (e) { var t = (function (e, t) { if ("object" !== cn(e) || null === e) return e; var n = e[Symbol.toPrimitive]; if (void 0 !== n) { var r = n.call(e, t); if ("object" !== cn(r)) return r; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(e); })(e, "string"); return "symbol" === cn(t) ? t : String(t); })(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0, }) : (e[t] = n), e ); } function sn(e) { return ( (sn = "function" == typeof Symbol && "symbol" == n(Symbol.iterator) ? function (e) { return n(e); } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : n(e); }), sn(e) ); } function fn(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 pn(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? fn(Object(n), !0).forEach(function (t) { mn(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : fn(Object(n)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); }); } return e; } function mn(e, t, n) { return ( (t = (function (e) { var t = (function (e, t) { if ("object" !== sn(e) || null === e) return e; var n = e[Symbol.toPrimitive]; if (void 0 !== n) { var r = n.call(e, t); if ("object" !== sn(r)) return r; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(e); })(e, "string"); return "symbol" === sn(t) ? t : String(t); })(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0, }) : (e[t] = n), e ); } function dn(e) { return ( (function (e) { if (Array.isArray(e)) return vn(e); })(e) || (function (e) { if ( ("undefined" != typeof Symbol && null != e[Symbol.iterator]) || null != e["@@iterator"] ) return Array.from(e); })(e) || (function (e, t) { if (e) { if ("string" == typeof e) return vn(e, t); var n = Object.prototype.toString.call(e).slice(8, -1); return ( "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? vn(e, t) : void 0 ); } })(e) || (function () { throw new TypeError( "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.", ); })() ); } function vn(e, t) { (null == t || t > e.length) && (t = e.length); for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n]; return r; } function hn(e) { return Boolean(e.execute); } function yn(e) { var t = e .reduce(function (e, t) { if (!hn(t)) return e.push(t), e; var n = t.searchClient, r = t.execute, o = t.requesterId, i = t.requests, c = e.find(function (e) { return ( hn(t) && hn(e) && e.searchClient === n && Boolean(o) && e.requesterId === o ); }); if (c) { var a; (a = c.items).push.apply(a, dn(i)); } else { var u = { execute: r, requesterId: o, items: i, searchClient: n }; e.push(u); } return e; }, []) .map(function (e) { if (!hn(e)) return Promise.resolve(e); var t = e, n = t.execute, r = t.items; return n({ searchClient: t.searchClient, requests: r }); }); return Promise.all(t).then(function (e) { return ot(e); }); } function _n(e) { return ( (_n = "function" == typeof Symbol && "symbol" == n(Symbol.iterator) ? function (e) { return n(e); } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : n(e); }), _n(e) ); } var bn = ["event", "nextState", "props", "query", "refresh", "store"]; function gn(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 Sn(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? gn(Object(n), !0).forEach(function (t) { On(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : gn(Object(n)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); }); } return e; } function On(e, t, n) { return ( (t = (function (e) { var t = (function (e, t) { if ("object" !== _n(e) || null === e) return e; var n = e[Symbol.toPrimitive]; if (void 0 !== n) { var r = n.call(e, t); if ("object" !== _n(r)) return r; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(e); })(e, "string"); return "symbol" === _n(t) ? t : String(t); })(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0, }) : (e[t] = n), e ); } var wn, En, jn, Pn = null, In = ((wn = -1), (En = -1), (jn = void 0), function (e) { var t = ++wn; return Promise.resolve(e).then(function (e) { return jn && t < En ? jn : ((En = t), (jn = e), e); }); }); function Dn(e) { var t = e.event, n = e.nextState, r = void 0 === n ? {} : n, o = e.props, i = e.query, c = e.refresh, a = e.store, u = (function (e, t) { if (null == e) return {}; var n, r, o = (function (e, t) { if (null == e) return {}; var n, r, o = {}, i = Object.keys(e); for (r = 0; r < i.length; r++) (n = i[r]), t.indexOf(n) >= 0 || (o[n] = e[n]); return o; })(e, t); if (Object.getOwnPropertySymbols) { var i = Object.getOwnPropertySymbols(e); for (r = 0; r < i.length; r++) (n = i[r]), t.indexOf(n) >= 0 || (Object.prototype.propertyIsEnumerable.call(e, n) && (o[n] = e[n])); } return o; })(e, bn); Pn && o.environment.clearTimeout(Pn); var l = u.setCollections, s = u.setIsOpen, f = u.setQuery, p = u.setActiveItemId, m = u.setStatus; if ((f(i), p(o.defaultActiveItemId), !i && !1 === o.openOnFocus)) { var d, v = a.getState().collections.map(function (e) { return Sn(Sn({}, e), {}, { items: [] }); }); m("idle"), l(v), s( null !== (d = r.isOpen) && void 0 !== d ? d : o.shouldPanelOpen({ state: a.getState() }), ); var h = Lt( In(v).then(function () { return Promise.resolve(); }), ); return a.pendingRequests.add(h); } m("loading"), (Pn = o.environment.setTimeout(function () { m("stalled"); }, o.stallThreshold)); var y = Lt( In( o .getSources(Sn({ query: i, refresh: c, state: a.getState() }, u)) .then(function (e) { return Promise.all( e.map(function (e) { return Promise.resolve( e.getItems( Sn({ query: i, refresh: c, state: a.getState() }, u), ), ).then(function (t) { return (function (e, t, n) { if (((o = e), Boolean(null == o ? void 0 : o.execute))) { var r = "algolia" === e.requesterId ? Object.assign.apply( Object, [{}].concat( dn( Object.keys(n.context).map(function (e) { var t; return null === (t = n.context[e]) || void 0 === t ? void 0 : t.__algoliaSearchParameters; }), ), ), ) : {}; return pn( pn({}, e), {}, { requests: e.queries.map(function (n) { return { query: "algolia" === e.requesterId ? pn( pn({}, n), {}, { params: pn(pn({}, r), n.params) }, ) : n, sourceId: t, transformResponse: e.transformResponse, }; }), }, ); } var o; return { items: e, sourceId: t }; })(t, e.sourceId, a.getState()); }); }), ) .then(yn) .then(function (t) { return (function (e, t, n) { return t.map(function (t) { var r, o = e.filter(function (e) { return e.sourceId === t.sourceId; }), i = o.map(function (e) { return e.items; }), c = o[0].transformResponse, a = c ? c({ results: (r = i), hits: r .map(function (e) { return e.hits; }) .filter(Boolean), facetHits: r .map(function (e) { var t; return null === (t = e.facetHits) || void 0 === t ? void 0 : t.map(function (e) { return { label: e.value, count: e.count, _highlightResult: { label: { value: e.highlighted }, }, }; }); }) .filter(Boolean), }) : i; return ( t.onResolve({ source: t, results: i, items: a, state: n.getState(), }), a.every(Boolean), 'The `getItems` function from source "' .concat( t.sourceId, '" must return an array of items but returned ', ) .concat( JSON.stringify(void 0), ".\n\nDid you forget to return items?\n\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems", ), { source: t, items: a } ); }); })(t, e, a); }) .then(function (e) { return (function (e) { var t = e.props, n = e.state, r = e.collections.reduce(function (e, t) { return un( un({}, e), {}, ln( {}, t.source.sourceId, un( un({}, t.source), {}, { getItems: function () { return ot(t.items); }, }, ), ), ); }, {}), o = t.plugins.reduce( function (e, t) { return t.reshape ? t.reshape(e) : e; }, { sourcesBySourceId: r, state: n }, ).sourcesBySourceId; return ot( t.reshape({ sourcesBySourceId: o, sources: Object.values(o), state: n, }), ) .filter(Boolean) .map(function (e) { return { source: e, items: e.getItems() }; }); })({ collections: e, props: o, state: a.getState() }); }); }), ), ) .then(function (e) { var n; m("idle"), l(e); var f = o.shouldPanelOpen({ state: a.getState() }); s( null !== (n = r.isOpen) && void 0 !== n ? n : (o.openOnFocus && !i && f) || f, ); var p = Kt(a.getState()); if (null !== a.getState().activeItemId && p) { var d = p.item, v = p.itemInputValue, h = p.itemUrl, y = p.source; y.onActive( Sn( { event: t, item: d, itemInputValue: v, itemUrl: h, refresh: c, source: y, state: a.getState(), }, u, ), ); } }) .finally(function () { m("idle"), Pn && o.environment.clearTimeout(Pn); }); return a.pendingRequests.add(y); } function kn(e) { return ( (kn = "function" == typeof Symbol && "symbol" == n(Symbol.iterator) ? function (e) { return n(e); } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : n(e); }), kn(e) ); } var Cn = ["event", "props", "refresh", "store"]; function An(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 xn(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? An(Object(n), !0).forEach(function (t) { Nn(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : An(Object(n)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); }); } return e; } function Nn(e, t, n) { return ( (t = (function (e) { var t = (function (e, t) { if ("object" !== kn(e) || null === e) return e; var n = e[Symbol.toPrimitive]; if (void 0 !== n) { var r = n.call(e, t); if ("object" !== kn(r)) return r; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(e); })(e, "string"); return "symbol" === kn(t) ? t : String(t); })(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0, }) : (e[t] = n), e ); } function Tn(e) { return ( (Tn = "function" == typeof Symbol && "symbol" == n(Symbol.iterator) ? function (e) { return n(e); } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : n(e); }), Tn(e) ); } var Rn = ["props", "refresh", "store"], qn = ["inputElement", "formElement", "panelElement"], Ln = ["inputElement"], Mn = ["inputElement", "maxLength"], Hn = ["sourceIndex"], Un = ["sourceIndex"], Fn = ["item", "source", "sourceIndex"]; function Bn(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 Vn(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? Bn(Object(n), !0).forEach(function (t) { Kn(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Bn(Object(n)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); }); } return e; } function Kn(e, t, n) { return ( (t = (function (e) { var t = (function (e, t) { if ("object" !== Tn(e) || null === e) return e; var n = e[Symbol.toPrimitive]; if (void 0 !== n) { var r = n.call(e, t); if ("object" !== Tn(r)) return r; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(e); })(e, "string"); return "symbol" === Tn(t) ? t : String(t); })(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0, }) : (e[t] = n), e ); } function Wn(e, t) { if (null == e) return {}; var n, r, o = (function (e, t) { if (null == e) return {}; var n, r, o = {}, i = Object.keys(e); for (r = 0; r < i.length; r++) (n = i[r]), t.indexOf(n) >= 0 || (o[n] = e[n]); return o; })(e, t); if (Object.getOwnPropertySymbols) { var i = Object.getOwnPropertySymbols(e); for (r = 0; r < i.length; r++) (n = i[r]), t.indexOf(n) >= 0 || (Object.prototype.propertyIsEnumerable.call(e, n) && (o[n] = e[n])); } return o; } function zn(e) { var t = e.props, n = e.refresh, r = e.store, o = Wn(e, Rn), i = function (e, t) { return void 0 !== t ? "".concat(e, "-").concat(t) : e; }; return { getEnvironmentProps: function (e) { var n = e.inputElement, o = e.formElement, i = e.panelElement; function c(e) { (!r.getState().isOpen && r.pendingRequests.isEmpty()) || e.target === n || (!1 === [o, i].some(function (t) { return (n = t) === (r = e.target) || n.contains(r); var n, r; }) && (r.dispatch("blur", null), t.debug || r.pendingRequests.cancelAll())); } return Vn( { onTouchStart: c, onMouseDown: c, onTouchMove: function (e) { !1 !== r.getState().isOpen && n === t.environment.document.activeElement && e.target !== n && n.blur(); }, }, Wn(e, qn), ); }, getRootProps: function (e) { return Vn( { role: "combobox", "aria-expanded": r.getState().isOpen, "aria-haspopup": "listbox", "aria-owns": r.getState().isOpen ? "".concat(t.id, "-list") : void 0, "aria-labelledby": "".concat(t.id, "-label"), }, e, ); }, getFormProps: function (e) { return ( e.inputElement, Vn( { action: "", noValidate: !0, role: "search", onSubmit: function (i) { var c; i.preventDefault(), t.onSubmit( Vn({ event: i, refresh: n, state: r.getState() }, o), ), r.dispatch("submit", null), null === (c = e.inputElement) || void 0 === c || c.blur(); }, onReset: function (i) { var c; i.preventDefault(), t.onReset( Vn({ event: i, refresh: n, state: r.getState() }, o), ), r.dispatch("reset", null), null === (c = e.inputElement) || void 0 === c || c.focus(); }, }, Wn(e, Ln), ) ); }, getLabelProps: function (e) { var n = e || {}, r = n.sourceIndex, o = Wn(n, Hn); return Vn( { htmlFor: "".concat(i(t.id, r), "-input"), id: "".concat(i(t.id, r), "-label"), }, o, ); }, getInputProps: function (e) { var i; function c(e) { (t.openOnFocus || Boolean(r.getState().query)) && Dn( Vn( { event: e, props: t, query: r.getState().completion || r.getState().query, refresh: n, store: r, }, o, ), ), r.dispatch("focus", null); } var a = e || {}, u = (a.inputElement, a.maxLength), l = void 0 === u ? 512 : u, s = Wn(a, Mn), f = Kt(r.getState()), p = (function (e) { return Boolean(e && e.match(Wt)); })( (null === (i = t.environment.navigator) || void 0 === i ? void 0 : i.userAgent) || "", ), m = null != f && f.itemUrl && !p ? "go" : "search"; return Vn( { "aria-autocomplete": "both", "aria-activedescendant": r.getState().isOpen && null !== r.getState().activeItemId ? "".concat(t.id, "-item-").concat(r.getState().activeItemId) : void 0, "aria-controls": r.getState().isOpen ? "".concat(t.id, "-list") : void 0, "aria-labelledby": "".concat(t.id, "-label"), value: r.getState().completion || r.getState().query, id: "".concat(t.id, "-input"), autoComplete: "off", autoCorrect: "off", autoCapitalize: "off", enterKeyHint: m, spellCheck: "false", autoFocus: t.autoFocus, placeholder: t.placeholder, maxLength: l, type: "search", onChange: function (e) { Dn( Vn( { event: e, props: t, query: e.currentTarget.value.slice(0, l), refresh: n, store: r, }, o, ), ); }, onKeyDown: function (e) { !(function (e) { var t = e.event, n = e.props, r = e.refresh, o = e.store, i = (function (e, t) { if (null == e) return {}; var n, r, o = (function (e, t) { if (null == e) return {}; var n, r, o = {}, i = Object.keys(e); for (r = 0; r < i.length; r++) (n = i[r]), t.indexOf(n) >= 0 || (o[n] = e[n]); return o; })(e, t); if (Object.getOwnPropertySymbols) { var i = Object.getOwnPropertySymbols(e); for (r = 0; r < i.length; r++) (n = i[r]), t.indexOf(n) >= 0 || (Object.prototype.propertyIsEnumerable.call(e, n) && (o[n] = e[n])); } return o; })(e, Cn); if ("ArrowUp" === t.key || "ArrowDown" === t.key) { var c = function () { var e = n.environment.document.getElementById( "" .concat(n.id, "-item-") .concat(o.getState().activeItemId), ); e && (e.scrollIntoViewIfNeeded ? e.scrollIntoViewIfNeeded(!1) : e.scrollIntoView(!1)); }, a = function () { var e = Kt(o.getState()); if (null !== o.getState().activeItemId && e) { var n = e.item, c = e.itemInputValue, a = e.itemUrl, u = e.source; u.onActive( xn( { event: t, item: n, itemInputValue: c, itemUrl: a, refresh: r, source: u, state: o.getState(), }, i, ), ); } }; t.preventDefault(), !1 === o.getState().isOpen && (n.openOnFocus || Boolean(o.getState().query)) ? Dn( xn( { event: t, props: n, query: o.getState().query, refresh: r, store: o, }, i, ), ).then(function () { o.dispatch(t.key, { nextActiveItemId: n.defaultActiveItemId, }), a(), setTimeout(c, 0); }) : (o.dispatch(t.key, {}), a(), c()); } else if ("Escape" === t.key) t.preventDefault(), o.dispatch(t.key, null), o.pendingRequests.cancelAll(); else if ("Tab" === t.key) o.dispatch("blur", null), o.pendingRequests.cancelAll(); else if ("Enter" === t.key) { if ( null === o.getState().activeItemId || o.getState().collections.every(function (e) { return 0 === e.items.length; }) ) return void (n.debug || o.pendingRequests.cancelAll()); t.preventDefault(); var u = Kt(o.getState()), l = u.item, s = u.itemInputValue, f = u.itemUrl, p = u.source; if (t.metaKey || t.ctrlKey) void 0 !== f && (p.onSelect( xn( { event: t, item: l, itemInputValue: s, itemUrl: f, refresh: r, source: p, state: o.getState(), }, i, ), ), n.navigator.navigateNewTab({ itemUrl: f, item: l, state: o.getState(), })); else if (t.shiftKey) void 0 !== f && (p.onSelect( xn( { event: t, item: l, itemInputValue: s, itemUrl: f, refresh: r, source: p, state: o.getState(), }, i, ), ), n.navigator.navigateNewWindow({ itemUrl: f, item: l, state: o.getState(), })); else if (t.altKey); else { if (void 0 !== f) return ( p.onSelect( xn( { event: t, item: l, itemInputValue: s, itemUrl: f, refresh: r, source: p, state: o.getState(), }, i, ), ), void n.navigator.navigate({ itemUrl: f, item: l, state: o.getState(), }) ); Dn( xn( { event: t, nextState: { isOpen: !1 }, props: n, query: s, refresh: r, store: o, }, i, ), ).then(function () { p.onSelect( xn( { event: t, item: l, itemInputValue: s, itemUrl: f, refresh: r, source: p, state: o.getState(), }, i, ), ); }); } } })(Vn({ event: e, props: t, refresh: n, store: r }, o)); }, onFocus: c, onBlur: lt, onClick: function (n) { e.inputElement !== t.environment.document.activeElement || r.getState().isOpen || c(n); }, }, s, ); }, getPanelProps: function (e) { return Vn( { onMouseDown: function (e) { e.preventDefault(); }, onMouseLeave: function () { r.dispatch("mouseleave", null); }, }, e, ); }, getListProps: function (e) { var n = e || {}, r = n.sourceIndex, o = Wn(n, Un); return Vn( { role: "listbox", "aria-labelledby": "".concat(i(t.id, r), "-label"), id: "".concat(i(t.id, r), "-list"), }, o, ); }, getItemProps: function (e) { var c = e.item, a = e.source, u = e.sourceIndex, l = Wn(e, Fn); return Vn( { id: "".concat(i(t.id, u), "-item-").concat(c.__autocomplete_id), role: "option", "aria-selected": r.getState().activeItemId === c.__autocomplete_id, onMouseMove: function (e) { if (c.__autocomplete_id !== r.getState().activeItemId) { r.dispatch("mousemove", c.__autocomplete_id); var t = Kt(r.getState()); if (null !== r.getState().activeItemId && t) { var i = t.item, a = t.itemInputValue, u = t.itemUrl, l = t.source; l.onActive( Vn( { event: e, item: i, itemInputValue: a, itemUrl: u, refresh: n, source: l, state: r.getState(), }, o, ), ); } } }, onMouseDown: function (e) { e.preventDefault(); }, onClick: function (e) { var i = a.getItemInputValue({ item: c, state: r.getState() }), u = a.getItemUrl({ item: c, state: r.getState() }); (u ? Promise.resolve() : Dn( Vn( { event: e, nextState: { isOpen: !1 }, props: t, query: i, refresh: n, store: r, }, o, ), ) ).then(function () { a.onSelect( Vn( { event: e, item: c, itemInputValue: i, itemUrl: u, refresh: n, source: a, state: r.getState(), }, o, ), ); }); }, }, l, ); }, }; } function Jn(e) { return ( (Jn = "function" == typeof Symbol && "symbol" == n(Symbol.iterator) ? function (e) { return n(e); } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : n(e); }), Jn(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 Zn(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? $n(Object(n), !0).forEach(function (t) { Qn(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : $n(Object(n)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); }); } return e; } function Qn(e, t, n) { return ( (t = (function (e) { var t = (function (e, t) { if ("object" !== Jn(e) || null === e) return e; var n = e[Symbol.toPrimitive]; if (void 0 !== n) { var r = n.call(e, t); if ("object" !== Jn(r)) return r; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(e); })(e, "string"); return "symbol" === Jn(t) ? t : String(t); })(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0, }) : (e[t] = n), e ); } function Yn(e) { var t, n, r, o, i = e.plugins, c = e.options, a = null === (t = ((null === (n = c.__autocomplete_metadata) || void 0 === n ? void 0 : n.userAgents) || [])[0]) || void 0 === t ? void 0 : t.segment, u = a ? Qn( {}, a, Object.keys( (null === (r = c.__autocomplete_metadata) || void 0 === r ? void 0 : r.options) || {}, ), ) : {}; return { plugins: i.map(function (e) { return { name: e.name, options: Object.keys(e.__autocomplete_pluginOptions || []), }; }), options: Zn({ "autocomplete-core": Object.keys(c) }, u), ua: st.concat( (null === (o = c.__autocomplete_metadata) || void 0 === o ? void 0 : o.userAgents) || [], ), }; } function Gn(e) { var t, n = e.state; return !1 === n.isOpen || null === n.activeItemId ? null : (null === (t = Kt(n)) || void 0 === t ? void 0 : t.itemInputValue) || null; } function Xn(e) { return ( (Xn = "function" == typeof Symbol && "symbol" == n(Symbol.iterator) ? function (e) { return n(e); } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : n(e); }), Xn(e) ); } function er(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 tr(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? er(Object(n), !0).forEach(function (t) { nr(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : er(Object(n)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); }); } return e; } function nr(e, t, n) { return ( (t = (function (e) { var t = (function (e, t) { if ("object" !== Xn(e) || null === e) return e; var n = e[Symbol.toPrimitive]; if (void 0 !== n) { var r = n.call(e, t); if ("object" !== Xn(r)) return r; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(e); })(e, "string"); return "symbol" === Xn(t) ? t : String(t); })(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0, }) : (e[t] = n), e ); } var rr = function (e, t) { switch (t.type) { case "setActiveItemId": case "mousemove": return tr(tr({}, e), {}, { activeItemId: t.payload }); case "setQuery": return tr(tr({}, e), {}, { query: t.payload, completion: null }); case "setCollections": return tr(tr({}, e), {}, { collections: t.payload }); case "setIsOpen": return tr(tr({}, e), {}, { isOpen: t.payload }); case "setStatus": return tr(tr({}, e), {}, { status: t.payload }); case "setContext": return tr(tr({}, e), {}, { context: tr(tr({}, e.context), t.payload) }); case "ArrowDown": var n = tr( tr({}, e), {}, { activeItemId: t.payload.hasOwnProperty("nextActiveItemId") ? t.payload.nextActiveItemId : Ht(1, e.activeItemId, ct(e), t.props.defaultActiveItemId), }, ); return tr(tr({}, n), {}, { completion: Gn({ state: n }) }); case "ArrowUp": var r = tr( tr({}, e), {}, { activeItemId: Ht( -1, e.activeItemId, ct(e), t.props.defaultActiveItemId, ), }, ); return tr(tr({}, r), {}, { completion: Gn({ state: r }) }); case "Escape": return e.isOpen ? tr( tr({}, e), {}, { activeItemId: null, isOpen: !1, completion: null }, ) : tr( tr({}, e), {}, { activeItemId: null, query: "", status: "idle", collections: [], }, ); case "submit": return tr( tr({}, e), {}, { activeItemId: null, isOpen: !1, status: "idle" }, ); case "reset": return tr( tr({}, e), {}, { activeItemId: !0 === t.props.openOnFocus ? t.props.defaultActiveItemId : null, status: "idle", query: "", }, ); case "focus": return tr( tr({}, e), {}, { activeItemId: t.props.defaultActiveItemId, isOpen: (t.props.openOnFocus || Boolean(e.query)) && t.props.shouldPanelOpen({ state: e }), }, ); case "blur": return t.props.debug ? e : tr(tr({}, e), {}, { isOpen: !1, activeItemId: null }); case "mouseleave": return tr(tr({}, e), {}, { activeItemId: t.props.defaultActiveItemId }); default: return ( "The reducer action ".concat( JSON.stringify(t.type), " is not supported.", ), e ); } }; function or(e) { return ( (or = "function" == typeof Symbol && "symbol" == n(Symbol.iterator) ? function (e) { return n(e); } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : n(e); }), or(e) ); } function ir(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 cr(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? ir(Object(n), !0).forEach(function (t) { ar(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ir(Object(n)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); }); } return e; } function ar(e, t, n) { return ( (t = (function (e) { var t = (function (e, t) { if ("object" !== or(e) || null === e) return e; var n = e[Symbol.toPrimitive]; if (void 0 !== n) { var r = n.call(e, t); if ("object" !== or(r)) return r; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(e); })(e, "string"); return "symbol" === or(t) ? t : String(t); })(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0, }) : (e[t] = n), e ); } function ur(e) { var t = [], n = on(e, t), r = (function (e, t, n) { var r, o = t.initialState; return { getState: function () { return o; }, dispatch: function (r, i) { var c = (function (e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? Jt(Object(n), !0).forEach(function (t) { $t(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties( e, Object.getOwnPropertyDescriptors(n), ) : Jt(Object(n)).forEach(function (t) { Object.defineProperty( e, t, Object.getOwnPropertyDescriptor(n, t), ); }); } return e; })({}, o); (o = e(o, { type: r, props: t, payload: i })), n({ state: o, prevState: c }); }, pendingRequests: ((r = []), { add: function (e) { return ( r.push(e), e.finally(function () { r = r.filter(function (t) { return t !== e; }); }) ); }, cancelAll: function () { r.forEach(function (e) { return e.cancel(); }); }, isEmpty: function () { return 0 === r.length; }, }), }; })(rr, n, function (e) { var t = e.prevState, r = e.state; n.onStateChange( cr({ prevState: t, state: r, refresh: c, navigator: n.navigator }, o), ); }), o = (function (e) { var t = e.store; return { setActiveItemId: function (e) { t.dispatch("setActiveItemId", e); }, setQuery: function (e) { t.dispatch("setQuery", e); }, setCollections: function (e) { var n = 0, r = e.map(function (e) { return Yt( Yt({}, e), {}, { items: ot(e.items).map(function (e) { return Yt(Yt({}, e), {}, { __autocomplete_id: n++ }); }), }, ); }); t.dispatch("setCollections", r); }, setIsOpen: function (e) { t.dispatch("setIsOpen", e); }, setStatus: function (e) { t.dispatch("setStatus", e); }, setContext: function (e) { t.dispatch("setContext", e); }, }; })({ store: r }), i = zn(cr({ props: n, refresh: c, store: r, navigator: n.navigator }, o)); function c() { return Dn( cr( { event: new Event("input"), nextState: { isOpen: r.getState().isOpen }, props: n, navigator: n.navigator, query: r.getState().query, refresh: c, store: r, }, o, ), ); } if ( e.insights && !n.plugins.some(function (e) { return "aa.algoliaInsightsPlugin" === e.name; }) ) { var a = "boolean" == typeof e.insights ? {} : e.insights; n.plugins.push(Rt(a)); } return ( n.plugins.forEach(function (e) { var r; return null === (r = e.subscribe) || void 0 === r ? void 0 : r.call( e, cr( cr({}, o), {}, { navigator: n.navigator, refresh: c, onSelect: function (e) { t.push({ onSelect: e }); }, onActive: function (e) { t.push({ onActive: e }); }, onResolve: function (e) { t.push({ onResolve: e }); }, }, ), ); }), (function (e) { var t, n, r = e.metadata, o = e.environment; if ( null === (t = o.navigator) || void 0 === t || null === (n = t.userAgent) || void 0 === n ? void 0 : n.includes("Algolia Crawler") ) { var i = o.document.createElement("meta"), c = o.document.querySelector("head"); (i.name = "algolia:metadata"), setTimeout(function () { (i.content = JSON.stringify(r)), c.appendChild(i); }, 0); } })({ metadata: Yn({ plugins: n.plugins, options: e }), environment: n.environment, }), cr(cr({ refresh: c, navigator: n.navigator }, i), o) ); } function lr(e) { var t = e.translations, n = (void 0 === t ? {} : t).searchByText, r = void 0 === n ? "Search by" : n; return Be.createElement( "a", { href: "https://www.algolia.com/ref/docsearch/?utm_source=".concat( window.location.hostname, "&utm_medium=referral&utm_content=powered_by&utm_campaign=docsearch", ), target: "_blank", rel: "noopener noreferrer", }, Be.createElement("span", { className: "DocSearch-Label" }, r), Be.createElement( "svg", { width: "77", height: "19", "aria-label": "Algolia", role: "img", id: "Layer_1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 2196.2 500", }, Be.createElement( "defs", null, Be.createElement( "style", null, ".cls-1,.cls-2{fill:#003dff;}.cls-2{fill-rule:evenodd;}", ), ), Be.createElement("path", { className: "cls-2", d: "M1070.38,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z", }), Be.createElement("rect", { className: "cls-1", x: "1845.88", y: "104.73", width: "62.58", height: "277.9", rx: "5.9", ry: "5.9", }), Be.createElement("path", { className: "cls-2", d: "M1851.78,71.38h50.77c3.26,0,5.9-2.64,5.9-5.9V5.9c0-3.62-3.24-6.39-6.82-5.83l-50.77,7.95c-2.87,.45-4.99,2.92-4.99,5.83v51.62c0,3.26,2.64,5.9,5.9,5.9Z", }), Be.createElement("path", { className: "cls-2", d: "M1764.03,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z", }), Be.createElement("path", { className: "cls-2", d: "M1631.95,142.72c-11.14-12.25-24.83-21.65-40.78-28.31-15.92-6.53-33.26-9.85-52.07-9.85-18.78,0-36.15,3.17-51.92,9.85-15.59,6.66-29.29,16.05-40.76,28.31-11.47,12.23-20.38,26.87-26.76,44.03-6.38,17.17-9.24,37.37-9.24,58.36,0,20.99,3.19,36.87,9.55,54.21,6.38,17.32,15.14,32.11,26.45,44.36,11.29,12.23,24.83,21.62,40.6,28.46,15.77,6.83,40.12,10.33,52.4,10.48,12.25,0,36.78-3.82,52.7-10.48,15.92-6.68,29.46-16.23,40.78-28.46,11.29-12.25,20.05-27.04,26.25-44.36,6.22-17.34,9.24-33.22,9.24-54.21,0-20.99-3.34-41.19-10.03-58.36-6.38-17.17-15.14-31.8-26.43-44.03Zm-44.43,163.75c-11.47,15.75-27.56,23.7-48.09,23.7-20.55,0-36.63-7.8-48.1-23.7-11.47-15.75-17.21-34.01-17.21-61.2,0-26.89,5.59-49.14,17.06-64.87,11.45-15.75,27.54-23.52,48.07-23.52,20.55,0,36.63,7.78,48.09,23.52,11.47,15.57,17.36,37.98,17.36,64.87,0,27.19-5.72,45.3-17.19,61.2Z", }), Be.createElement("path", { className: "cls-2", d: "M894.42,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z", }), Be.createElement("path", { className: "cls-2", d: "M2133.97,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z", }), Be.createElement("path", { className: "cls-2", d: "M1314.05,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-11.79,18.34-19.6,39.64-22.11,62.59-.58,5.3-.88,10.68-.88,16.14s.31,11.15,.93,16.59c4.28,38.09,23.14,71.61,50.66,94.52,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47h0c17.99,0,34.61-5.93,48.16-15.97,16.29-11.58,28.88-28.54,34.48-47.75v50.26h-.11v11.08c0,21.84-5.71,38.27-17.34,49.36-11.61,11.08-31.04,16.63-58.25,16.63-11.12,0-28.79-.59-46.6-2.41-2.83-.29-5.46,1.5-6.27,4.22l-12.78,43.11c-1.02,3.46,1.27,7.02,4.83,7.53,21.52,3.08,42.52,4.68,54.65,4.68,48.91,0,85.16-10.75,108.89-32.21,21.48-19.41,33.15-48.89,35.2-88.52V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,64.1s.65,139.13,0,143.36c-12.08,9.77-27.11,13.59-43.49,14.7-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-1.32,0-2.63-.03-3.94-.1-40.41-2.11-74.52-37.26-74.52-79.38,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33Z", }), Be.createElement("path", { className: "cls-1", d: "M249.83,0C113.3,0,2,110.09,.03,246.16c-2,138.19,110.12,252.7,248.33,253.5,42.68,.25,83.79-10.19,120.3-30.03,3.56-1.93,4.11-6.83,1.08-9.51l-23.38-20.72c-4.75-4.21-11.51-5.4-17.36-2.92-25.48,10.84-53.17,16.38-81.71,16.03-111.68-1.37-201.91-94.29-200.13-205.96,1.76-110.26,92-199.41,202.67-199.41h202.69V407.41l-115-102.18c-3.72-3.31-9.42-2.66-12.42,1.31-18.46,24.44-48.53,39.64-81.93,37.34-46.33-3.2-83.87-40.5-87.34-86.81-4.15-55.24,39.63-101.52,94-101.52,49.18,0,89.68,37.85,93.91,85.95,.38,4.28,2.31,8.27,5.52,11.12l29.95,26.55c3.4,3.01,8.79,1.17,9.63-3.3,2.16-11.55,2.92-23.58,2.07-35.92-4.82-70.34-61.8-126.93-132.17-131.26-80.68-4.97-148.13,58.14-150.27,137.25-2.09,77.1,61.08,143.56,138.19,145.26,32.19,.71,62.03-9.41,86.14-26.95l150.26,133.2c6.44,5.71,16.61,1.14,16.61-7.47V9.48C499.66,4.25,495.42,0,490.18,0H249.83Z", }), ), ); } function sr(e) { return Be.createElement( "svg", { width: "15", height: "15", "aria-label": e.ariaLabel, role: "img" }, Be.createElement( "g", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.2", }, e.children, ), ); } function fr(e) { var t = e.translations, n = void 0 === t ? {} : t, r = n.selectText, o = void 0 === r ? "to select" : r, i = n.selectKeyAriaLabel, c = void 0 === i ? "Enter key" : i, a = n.navigateText, u = void 0 === a ? "to navigate" : a, l = n.navigateUpKeyAriaLabel, s = void 0 === l ? "Arrow up" : l, f = n.navigateDownKeyAriaLabel, p = void 0 === f ? "Arrow down" : f, m = n.closeText, d = void 0 === m ? "to close" : m, v = n.closeKeyAriaLabel, h = void 0 === v ? "Escape key" : v, y = n.searchByText, _ = void 0 === y ? "Search by" : y; return Be.createElement( Be.Fragment, null, Be.createElement( "div", { className: "DocSearch-Logo" }, Be.createElement(lr, { translations: { searchByText: _ } }), ), Be.createElement( "ul", { className: "DocSearch-Commands" }, Be.createElement( "li", null, Be.createElement( "kbd", { className: "DocSearch-Commands-Key" }, Be.createElement( sr, { ariaLabel: c }, Be.createElement("path", { d: "M12 3.53088v3c0 1-1 2-2 2H4M7 11.53088l-3-3 3-3", }), ), ), Be.createElement("span", { className: "DocSearch-Label" }, o), ), Be.createElement( "li", null, Be.createElement( "kbd", { className: "DocSearch-Commands-Key" }, Be.createElement( sr, { ariaLabel: p }, Be.createElement("path", { d: "M7.5 3.5v8M10.5 8.5l-3 3-3-3" }), ), ), Be.createElement( "kbd", { className: "DocSearch-Commands-Key" }, Be.createElement( sr, { ariaLabel: s }, Be.createElement("path", { d: "M7.5 11.5v-8M10.5 6.5l-3-3-3 3" }), ), ), Be.createElement("span", { className: "DocSearch-Label" }, u), ), Be.createElement( "li", null, Be.createElement( "kbd", { className: "DocSearch-Commands-Key" }, Be.createElement( sr, { ariaLabel: h }, Be.createElement("path", { d: "M13.6167 8.936c-.1065.3583-.6883.962-1.4875.962-.7993 0-1.653-.9165-1.653-2.1258v-.5678c0-1.2548.7896-2.1016 1.653-2.1016.8634 0 1.3601.4778 1.4875 1.0724M9 6c-.1352-.4735-.7506-.9219-1.46-.8972-.7092.0246-1.344.57-1.344 1.2166s.4198.8812 1.3445.9805C8.465 7.3992 8.968 7.9337 9 8.5c.032.5663-.454 1.398-1.4595 1.398C6.6593 9.898 6 9 5.963 8.4851m-1.4748.5368c-.2635.5941-.8099.876-1.5443.876s-1.7073-.6248-1.7073-2.204v-.4603c0-1.0416.721-2.131 1.7073-2.131.9864 0 1.6425 1.031 1.5443 2.2492h-2.956", }), ), ), Be.createElement("span", { className: "DocSearch-Label" }, d), ), ), ); } function pr(e) { var t = e.hit, n = e.children; return Be.createElement("a", { href: t.url }, n); } function mr() { return Be.createElement( "svg", { viewBox: "0 0 38 38", stroke: "currentColor", strokeOpacity: ".5" }, Be.createElement( "g", { fill: "none", fillRule: "evenodd" }, Be.createElement( "g", { transform: "translate(1 1)", strokeWidth: "2" }, Be.createElement("circle", { strokeOpacity: ".3", cx: "18", cy: "18", r: "18", }), Be.createElement( "path", { d: "M36 18c0-9.94-8.06-18-18-18" }, Be.createElement("animateTransform", { attributeName: "transform", type: "rotate", from: "0 18 18", to: "360 18 18", dur: "1s", repeatCount: "indefinite", }), ), ), ), ); } function dr() { return Be.createElement( "svg", { width: "20", height: "20", viewBox: "0 0 20 20" }, Be.createElement( "g", { stroke: "currentColor", fill: "none", fillRule: "evenodd", strokeLinecap: "round", strokeLinejoin: "round", }, Be.createElement("path", { d: "M3.18 6.6a8.23 8.23 0 1112.93 9.94h0a8.23 8.23 0 01-11.63 0", }), Be.createElement("path", { d: "M6.44 7.25H2.55V3.36M10.45 6v5.6M10.45 11.6L13 13", }), ), ); } function vr() { return Be.createElement( "svg", { width: "20", height: "20", viewBox: "0 0 20 20" }, Be.createElement("path", { d: "M10 10l5.09-5.09L10 10l5.09 5.09L10 10zm0 0L4.91 4.91 10 10l-5.09 5.09L10 10z", stroke: "currentColor", fill: "none", fillRule: "evenodd", strokeLinecap: "round", strokeLinejoin: "round", }), ); } function hr() { return Be.createElement( "svg", { className: "DocSearch-Hit-Select-Icon", width: "20", height: "20", viewBox: "0 0 20 20", }, Be.createElement( "g", { stroke: "currentColor", fill: "none", fillRule: "evenodd", strokeLinecap: "round", strokeLinejoin: "round", }, Be.createElement("path", { d: "M18 3v4c0 2-2 4-4 4H2" }), Be.createElement("path", { d: "M8 17l-6-6 6-6" }), ), ); } var yr = function () { return Be.createElement( "svg", { width: "20", height: "20", viewBox: "0 0 20 20" }, Be.createElement("path", { d: "M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4", stroke: "currentColor", fill: "none", fillRule: "evenodd", strokeLinejoin: "round", }), ); }; function _r(e) { switch (e.type) { case "lvl1": return Be.createElement(yr, null); case "content": return Be.createElement(gr, null); default: return Be.createElement(br, null); } } function br() { return Be.createElement( "svg", { width: "20", height: "20", viewBox: "0 0 20 20" }, Be.createElement("path", { d: "M13 13h4-4V8H7v5h6v4-4H7V8H3h4V3v5h6V3v5h4-4v5zm-6 0v4-4H3h4z", stroke: "currentColor", fill: "none", fillRule: "evenodd", strokeLinecap: "round", strokeLinejoin: "round", }), ); } function gr() { return Be.createElement( "svg", { width: "20", height: "20", viewBox: "0 0 20 20" }, Be.createElement("path", { d: "M17 5H3h14zm0 5H3h14zm0 5H3h14z", stroke: "currentColor", fill: "none", fillRule: "evenodd", strokeLinejoin: "round", }), ); } function Sr() { return Be.createElement( "svg", { width: "20", height: "20", viewBox: "0 0 20 20" }, Be.createElement("path", { d: "M10 14.2L5 17l1-5.6-4-4 5.5-.7 2.5-5 2.5 5 5.6.8-4 4 .9 5.5z", stroke: "currentColor", fill: "none", fillRule: "evenodd", strokeLinejoin: "round", }), ); } function Or() { return Be.createElement( "svg", { width: "40", height: "40", viewBox: "0 0 20 20", fill: "none", fillRule: "evenodd", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", }, Be.createElement("path", { d: "M19 4.8a16 16 0 00-2-1.2m-3.3-1.2A16 16 0 001.1 4.7M16.7 8a12 12 0 00-2.8-1.4M10 6a12 12 0 00-6.7 2M12.3 14.7a4 4 0 00-4.5 0M14.5 11.4A8 8 0 0010 10M3 16L18 2M10 18h0", }), ); } function wr() { return Be.createElement( "svg", { width: "40", height: "40", viewBox: "0 0 20 20", fill: "none", fillRule: "evenodd", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", }, Be.createElement("path", { d: "M15.5 4.8c2 3 1.7 7-1 9.7h0l4.3 4.3-4.3-4.3a7.8 7.8 0 01-9.8 1m-2.2-2.2A7.8 7.8 0 0113.2 2.4M2 18L18 2", }), ); } function Er(e) { var t = e.translations, n = void 0 === t ? {} : t, r = n.titleText, o = void 0 === r ? "Unable to fetch results" : r, i = n.helpText, c = void 0 === i ? "You might want to check your network connection." : i; return Be.createElement( "div", { className: "DocSearch-ErrorScreen" }, Be.createElement( "div", { className: "DocSearch-Screen-Icon" }, Be.createElement(Or, null), ), Be.createElement("p", { className: "DocSearch-Title" }, o), Be.createElement("p", { className: "DocSearch-Help" }, c), ); } var jr = ["translations"]; function Pr(e) { var t = e.translations, n = void 0 === t ? {} : t, r = $e(e, jr), o = n.noResultsText, i = void 0 === o ? "No results for" : o, c = n.suggestedQueryText, a = void 0 === c ? "Try searching for" : c, u = n.reportMissingResultsText, l = void 0 === u ? "Believe this query should return results?" : u, s = n.reportMissingResultsLinkText, f = void 0 === s ? "Let us know." : s, p = r.state.context.searchSuggestions; return Be.createElement( "div", { className: "DocSearch-NoResults" }, Be.createElement( "div", { className: "DocSearch-Screen-Icon" }, Be.createElement(wr, null), ), Be.createElement( "p", { className: "DocSearch-Title" }, i, ' "', Be.createElement("strong", null, r.state.query), '"', ), p && p.length > 0 && Be.createElement( "div", { className: "DocSearch-NoResults-Prefill-List" }, Be.createElement("p", { className: "DocSearch-Help" }, a, ":"), Be.createElement( "ul", null, p.slice(0, 3).reduce(function (e, t) { return [].concat( (function (e) { return ( (function (e) { if (Array.isArray(e)) return Ye(e); })(e) || (function (e) { if ( ("undefined" != typeof Symbol && null != e[Symbol.iterator]) || null != e["@@iterator"] ) return Array.from(e); })(e) || Qe(e) || (function () { throw new TypeError( "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.", ); })() ); })(e), [ Be.createElement( "li", { key: t }, Be.createElement( "button", { className: "DocSearch-Prefill", key: t, type: "button", onClick: function () { r.setQuery(t.toLowerCase() + " "), r.refresh(), r.inputRef.current.focus(); }, }, t, ), ), ], ); }, []), ), ), r.getMissingResultsUrl && Be.createElement( "p", { className: "DocSearch-Help" }, "".concat(l, " "), Be.createElement( "a", { href: r.getMissingResultsUrl({ query: r.state.query }), target: "_blank", rel: "noopener noreferrer", }, f, ), ), ); } var Ir = ["hit", "attribute", "tagName"]; function Dr(e, t) { return t.split(".").reduce(function (e, t) { return null != e && e[t] ? e[t] : null; }, e); } function kr(e) { var t = e.hit, n = e.attribute, r = e.tagName; return g( void 0 === r ? "span" : r, We( We({}, $e(e, Ir)), {}, { dangerouslySetInnerHTML: { __html: Dr(t, "_snippetResult.".concat(n, ".value")) || Dr(t, n), }, }, ), ); } function Cr(e) { return e.collection && 0 !== e.collection.items.length ? Be.createElement( "section", { className: "DocSearch-Hits" }, Be.createElement( "div", { className: "DocSearch-Hit-source" }, e.title, ), Be.createElement( "ul", e.getListProps(), e.collection.items.map(function (t, n) { return Be.createElement( Ar, Je( { key: [e.title, t.objectID].join(":"), item: t, index: n }, e, ), ); }), ), ) : null; } function Ar(e) { var t = e.item, n = e.index, r = e.renderIcon, o = e.renderAction, i = e.getItemProps, c = e.onItemClick, a = e.collection, u = e.hitComponent, l = Ze(Be.useState(!1), 2), s = l[0], f = l[1], p = Ze(Be.useState(!1), 2), m = p[0], d = p[1], v = Be.useRef(null), h = u; return Be.createElement( "li", Je( { className: [ "DocSearch-Hit", t.__docsearch_parent && "DocSearch-Hit--Child", s && "DocSearch-Hit--deleting", m && "DocSearch-Hit--favoriting", ] .filter(Boolean) .join(" "), onTransitionEnd: function () { v.current && v.current(); }, }, i({ item: t, source: a.source, onClick: function (e) { c(t, e); }, }), ), Be.createElement( h, { hit: t }, Be.createElement( "div", { className: "DocSearch-Hit-Container" }, r({ item: t, index: n }), t.hierarchy[t.type] && "lvl1" === t.type && Be.createElement( "div", { className: "DocSearch-Hit-content-wrapper" }, Be.createElement(kr, { className: "DocSearch-Hit-title", hit: t, attribute: "hierarchy.lvl1", }), t.content && Be.createElement(kr, { className: "DocSearch-Hit-path", hit: t, attribute: "content", }), ), t.hierarchy[t.type] && ("lvl2" === t.type || "lvl3" === t.type || "lvl4" === t.type || "lvl5" === t.type || "lvl6" === t.type) && Be.createElement( "div", { className: "DocSearch-Hit-content-wrapper" }, Be.createElement(kr, { className: "DocSearch-Hit-title", hit: t, attribute: "hierarchy.".concat(t.type), }), Be.createElement(kr, { className: "DocSearch-Hit-path", hit: t, attribute: "hierarchy.lvl1", }), ), "content" === t.type && Be.createElement( "div", { className: "DocSearch-Hit-content-wrapper" }, Be.createElement(kr, { className: "DocSearch-Hit-title", hit: t, attribute: "content", }), Be.createElement(kr, { className: "DocSearch-Hit-path", hit: t, attribute: "hierarchy.lvl1", }), ), o({ item: t, runDeleteTransition: function (e) { f(!0), (v.current = e); }, runFavoriteTransition: function (e) { d(!0), (v.current = e); }, }), ), ), ); } function xr(e, t, n) { return e.reduce(function (e, r) { var o = t(r); return ( e.hasOwnProperty(o) || (e[o] = []), e[o].length < (n || 5) && e[o].push(r), e ); }, {}); } function Nr(e) { return e; } function Tr(e) { return 1 === e.button || e.altKey || e.ctrlKey || e.metaKey || e.shiftKey; } function Rr() {} var qr = /(|<\/mark>)/g, Lr = RegExp(qr.source); function Mr(e) { var t, n, r = e; if (!r.__docsearch_parent && !e._highlightResult) return e.hierarchy.lvl0; var o = ( (r.__docsearch_parent ? null === (t = r.__docsearch_parent) || void 0 === t || null === (t = t._highlightResult) || void 0 === t || null === (t = t.hierarchy) || void 0 === t ? void 0 : t.lvl0 : null === (n = e._highlightResult) || void 0 === n || null === (n = n.hierarchy) || void 0 === n ? void 0 : n.lvl0) || {} ).value; return o && Lr.test(o) ? o.replace(qr, "") : o; } function Hr(e) { return Be.createElement( "div", { className: "DocSearch-Dropdown-Container" }, e.state.collections.map(function (t) { if (0 === t.items.length) return null; var n = Mr(t.items[0]); return Be.createElement( Cr, Je({}, e, { key: t.source.sourceId, title: n, collection: t, renderIcon: function (e) { var n, r = e.item, o = e.index; return Be.createElement( Be.Fragment, null, r.__docsearch_parent && Be.createElement( "svg", { className: "DocSearch-Hit-Tree", viewBox: "0 0 24 54" }, Be.createElement( "g", { stroke: "currentColor", fill: "none", fillRule: "evenodd", strokeLinecap: "round", strokeLinejoin: "round", }, r.__docsearch_parent !== (null === (n = t.items[o + 1]) || void 0 === n ? void 0 : n.__docsearch_parent) ? Be.createElement("path", { d: "M8 6v21M20 27H8.3" }) : Be.createElement("path", { d: "M8 6v42M20 27H8.3" }), ), ), Be.createElement( "div", { className: "DocSearch-Hit-icon" }, Be.createElement(_r, { type: r.type }), ), ); }, renderAction: function () { return Be.createElement( "div", { className: "DocSearch-Hit-action" }, Be.createElement(hr, null), ); }, }), ); }), e.resultsFooterComponent && Be.createElement( "section", { className: "DocSearch-HitsFooter" }, Be.createElement(e.resultsFooterComponent, { state: e.state }), ), ); } var Ur = ["translations"]; function Fr(e) { var t = e.translations, n = void 0 === t ? {} : t, r = $e(e, Ur), o = n.recentSearchesTitle, i = void 0 === o ? "Recent" : o, c = n.noRecentSearchesText, a = void 0 === c ? "No recent searches" : c, u = n.saveRecentSearchButtonTitle, l = void 0 === u ? "Save this search" : u, s = n.removeRecentSearchButtonTitle, f = void 0 === s ? "Remove this search from history" : s, p = n.favoriteSearchesTitle, m = void 0 === p ? "Favorite" : p, d = n.removeFavoriteSearchButtonTitle, v = void 0 === d ? "Remove this search from favorites" : d; return "idle" === r.state.status && !1 === r.hasCollections ? r.disableUserPersonalization ? null : Be.createElement( "div", { className: "DocSearch-StartScreen" }, Be.createElement("p", { className: "DocSearch-Help" }, a), ) : !1 === r.hasCollections ? null : Be.createElement( "div", { className: "DocSearch-Dropdown-Container" }, Be.createElement( Cr, Je({}, r, { title: i, collection: r.state.collections[0], renderIcon: function () { return Be.createElement( "div", { className: "DocSearch-Hit-icon" }, Be.createElement(dr, null), ); }, renderAction: function (e) { var t = e.item, n = e.runFavoriteTransition, o = e.runDeleteTransition; return Be.createElement( Be.Fragment, null, Be.createElement( "div", { className: "DocSearch-Hit-action" }, Be.createElement( "button", { className: "DocSearch-Hit-action-button", title: l, type: "submit", onClick: function (e) { e.preventDefault(), e.stopPropagation(), n(function () { r.favoriteSearches.add(t), r.recentSearches.remove(t), r.refresh(); }); }, }, Be.createElement(Sr, null), ), ), Be.createElement( "div", { className: "DocSearch-Hit-action" }, Be.createElement( "button", { className: "DocSearch-Hit-action-button", title: f, type: "submit", onClick: function (e) { e.preventDefault(), e.stopPropagation(), o(function () { r.recentSearches.remove(t), r.refresh(); }); }, }, Be.createElement(vr, null), ), ), ); }, }), ), Be.createElement( Cr, Je({}, r, { title: m, collection: r.state.collections[1], renderIcon: function () { return Be.createElement( "div", { className: "DocSearch-Hit-icon" }, Be.createElement(Sr, null), ); }, renderAction: function (e) { var t = e.item, n = e.runDeleteTransition; return Be.createElement( "div", { className: "DocSearch-Hit-action" }, Be.createElement( "button", { className: "DocSearch-Hit-action-button", title: v, type: "submit", onClick: function (e) { e.preventDefault(), e.stopPropagation(), n(function () { r.favoriteSearches.remove(t), r.refresh(); }); }, }, Be.createElement(vr, null), ), ); }, }), ), ); } var Br = ["translations"], Vr = Be.memo( function (e) { var t = e.translations, n = void 0 === t ? {} : t, r = $e(e, Br); if ("error" === r.state.status) return Be.createElement(Er, { translations: null == n ? void 0 : n.errorScreen, }); var o = r.state.collections.some(function (e) { return e.items.length > 0; }); return r.state.query ? !1 === o ? Be.createElement( Pr, Je({}, r, { translations: null == n ? void 0 : n.noResultsScreen, }), ) : Be.createElement(Hr, r) : Be.createElement( Fr, Je({}, r, { hasCollections: o, translations: null == n ? void 0 : n.startScreen, }), ); }, function (e, t) { return "loading" === t.state.status || "stalled" === t.state.status; }, ), Kr = ["translations"]; function Wr(e) { var t = e.translations, n = void 0 === t ? {} : t, r = $e(e, Kr), o = n.resetButtonTitle, i = void 0 === o ? "Clear the query" : o, c = n.resetButtonAriaLabel, a = void 0 === c ? "Clear the query" : c, u = n.cancelButtonText, l = void 0 === u ? "Cancel" : u, s = n.cancelButtonAriaLabel, f = void 0 === s ? "Cancel" : s, p = n.searchInputLabel, m = void 0 === p ? "Search" : p, d = r.getFormProps({ inputElement: r.inputRef.current }).onReset; return ( Be.useEffect( function () { r.autoFocus && r.inputRef.current && r.inputRef.current.focus(); }, [r.autoFocus, r.inputRef], ), Be.useEffect( function () { r.isFromSelection && r.inputRef.current && r.inputRef.current.select(); }, [r.isFromSelection, r.inputRef], ), Be.createElement( Be.Fragment, null, Be.createElement( "form", { className: "DocSearch-Form", onSubmit: function (e) { e.preventDefault(); }, onReset: d, }, Be.createElement( "label", Je({ className: "DocSearch-MagnifierLabel" }, r.getLabelProps()), Be.createElement(Xe, null), Be.createElement( "span", { className: "DocSearch-VisuallyHiddenForAccessibility" }, m, ), ), Be.createElement( "div", { className: "DocSearch-LoadingIndicator" }, Be.createElement(mr, null), ), Be.createElement( "input", Je( { className: "DocSearch-Input", ref: r.inputRef }, r.getInputProps({ inputElement: r.inputRef.current, autoFocus: r.autoFocus, maxLength: 64, }), ), ), Be.createElement( "button", { type: "reset", title: i, className: "DocSearch-Reset", "aria-label": a, hidden: !r.state.query, }, Be.createElement(vr, null), ), ), Be.createElement( "button", { className: "DocSearch-Cancel", type: "reset", "aria-label": f, onClick: r.onClose, }, l, ), ) ); } var zr = ["_highlightResult", "_snippetResult"]; function Jr(e) { var t = e.key, n = e.limit, r = void 0 === n ? 5 : n, o = (function (e) { return !1 === (function () { var e = "__TEST_KEY__"; try { return ( localStorage.setItem(e, ""), localStorage.removeItem(e), !0 ); } catch (e) { return !1; } })() ? { setItem: function () {}, getItem: function () { return []; }, } : { setItem: function (t) { return window.localStorage.setItem(e, JSON.stringify(t)); }, getItem: function () { var t = window.localStorage.getItem(e); return t ? JSON.parse(t) : []; }, }; })(t), i = o.getItem().slice(0, r); return { add: function (e) { var t = e, n = (t._highlightResult, t._snippetResult, $e(t, zr)), c = i.findIndex(function (e) { return e.objectID === n.objectID; }); c > -1 && i.splice(c, 1), i.unshift(n), (i = i.slice(0, r)), o.setItem(i); }, remove: function (e) { (i = i.filter(function (t) { return t.objectID !== e.objectID; })), o.setItem(i); }, getAll: function () { return i; }, }; } function $r(e) { var t, n = "algoliasearch-client-js-".concat(e.key), r = function () { return void 0 === t && (t = e.localStorage || window.localStorage), t; }, o = function () { return JSON.parse(r().getItem(n) || "{}"); }, i = function (e) { r().setItem(n, JSON.stringify(e)); }; return { get: function (t, n) { var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : { miss: function () { return Promise.resolve(); }, }; return Promise.resolve() .then(function () { !(function () { var t = e.timeToLive ? 1e3 * e.timeToLive : null, n = o(), r = Object.fromEntries( Object.entries(n).filter(function (e) { return void 0 !== c(e, 2)[1].timestamp; }), ); if ((i(r), t)) { var a = Object.fromEntries( Object.entries(r).filter(function (e) { var n = c(e, 2)[1], r = new Date().getTime(); return !(n.timestamp + t < r); }), ); i(a); } })(); var n = JSON.stringify(t); return o()[n]; }) .then(function (e) { return Promise.all([e ? e.value : n(), void 0 !== e]); }) .then(function (e) { var t = c(e, 2), n = t[0], o = t[1]; return Promise.all([n, o || r.miss(n)]); }) .then(function (e) { return c(e, 1)[0]; }); }, set: function (e, t) { return Promise.resolve().then(function () { var i = o(); return ( (i[JSON.stringify(e)] = { timestamp: new Date().getTime(), value: t, }), r().setItem(n, JSON.stringify(i)), t ); }); }, delete: function (e) { return Promise.resolve().then(function () { var t = o(); delete t[JSON.stringify(e)], r().setItem(n, JSON.stringify(t)); }); }, clear: function () { return Promise.resolve().then(function () { r().removeItem(n); }); }, }; } function Zr(e) { var t = a(e.caches), n = t.shift(); return void 0 === n ? { get: function (e, t) { var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : { miss: function () { return Promise.resolve(); }, }; return t() .then(function (e) { return Promise.all([e, n.miss(e)]); }) .then(function (e) { return c(e, 1)[0]; }); }, set: function (e, t) { return Promise.resolve(t); }, delete: function (e) { return Promise.resolve(); }, clear: function () { return Promise.resolve(); }, } : { get: function (e, r) { var o = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : { miss: function () { return Promise.resolve(); }, }; return n.get(e, r, o).catch(function () { return Zr({ caches: t }).get(e, r, o); }); }, set: function (e, r) { return n.set(e, r).catch(function () { return Zr({ caches: t }).set(e, r); }); }, delete: function (e) { return n.delete(e).catch(function () { return Zr({ caches: t }).delete(e); }); }, clear: function () { return n.clear().catch(function () { return Zr({ caches: t }).clear(); }); }, }; } function Qr() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : { serializable: !0 }, t = {}; return { get: function (n, r) { var o = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : { miss: function () { return Promise.resolve(); }, }, i = JSON.stringify(n); if (i in t) return Promise.resolve(e.serializable ? JSON.parse(t[i]) : t[i]); var c = r(), a = (o && o.miss) || function () { return Promise.resolve(); }; return c .then(function (e) { return a(e); }) .then(function () { return c; }); }, set: function (n, r) { return ( (t[JSON.stringify(n)] = e.serializable ? JSON.stringify(r) : r), Promise.resolve(r) ); }, delete: function (e) { return delete t[JSON.stringify(e)], Promise.resolve(); }, clear: function () { return (t = {}), Promise.resolve(); }, }; } function Yr(e) { for (var t = e.length - 1; t > 0; t--) { var n = Math.floor(Math.random() * (t + 1)), r = e[t]; (e[t] = e[n]), (e[n] = r); } return e; } function Gr(e, t) { return t ? (Object.keys(t).forEach(function (n) { e[n] = t[n](e); }), e) : e; } function Xr(e) { for ( var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++ ) n[r - 1] = arguments[r]; var o = 0; return e.replace(/%s/g, function () { return encodeURIComponent(n[o++]); }); } var eo = 0, to = 1; function no(e, t) { var n = e || {}, r = n.data || {}; return ( Object.keys(n).forEach(function (e) { -1 === [ "timeout", "headers", "queryParameters", "data", "cacheable", ].indexOf(e) && (r[e] = n[e]); }), { data: Object.entries(r).length > 0 ? r : void 0, timeout: n.timeout || t, headers: n.headers || {}, queryParameters: n.queryParameters || {}, cacheable: n.cacheable, } ); } var ro = { Read: 1, Write: 2, Any: 3 }; function oo(e) { var n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1; return t(t({}, e), {}, { status: n, lastUpdate: Date.now() }); } function io(e) { return "string" == typeof e ? { protocol: "https", url: e, accept: ro.Any } : { protocol: e.protocol || "https", url: e.url, accept: e.accept || ro.Any, }; } var co = "GET", ao = "POST"; function uo(e, n, r, o) { var i = [], c = (function (e, n) { if (e.method !== co && (void 0 !== e.data || void 0 !== n.data)) { var r = Array.isArray(e.data) ? e.data : t(t({}, e.data), n.data); return JSON.stringify(r); } })(r, o), u = (function (e, n) { var r = t(t({}, e.headers), n.headers), o = {}; return ( Object.keys(r).forEach(function (e) { var t = r[e]; o[e.toLowerCase()] = t; }), o ); })(e, o), l = r.method, s = r.method !== co ? {} : t(t({}, r.data), o.data), f = t( t(t({ "x-algolia-agent": e.userAgent.value }, e.queryParameters), s), o.queryParameters, ), p = 0, m = function t(n, a) { var s = n.pop(); if (void 0 === s) throw { name: "RetryError", message: "Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.", transporterStackTrace: po(i), }; var m = { data: c, headers: u, method: l, url: so(s, r.path, f), connectTimeout: a(p, e.timeouts.connect), responseTimeout: a(p, o.timeout), }, d = function (e) { var t = { request: m, response: e, host: s, triesLeft: n.length }; return i.push(t), t; }, v = { onSuccess: function (e) { return (function (e) { try { return JSON.parse(e.content); } catch (t) { throw (function (e, t) { return { name: "DeserializationError", message: e, response: t, }; })(t.message, e); } })(e); }, onRetry: function (r) { var o = d(r); return ( r.isTimedOut && p++, Promise.all([ e.logger.info("Retryable failure", mo(o)), e.hostsCache.set(s, oo(s, r.isTimedOut ? 3 : 2)), ]).then(function () { return t(n, a); }) ); }, onFail: function (e) { throw ( (d(e), (function (e, t) { var n = e.content, r = e.status, o = n; try { o = JSON.parse(n).message; } catch (n) {} return (function (e, t, n) { return { name: "ApiError", message: e, status: t, transporterStackTrace: n, }; })(o, r, t); })(e, po(i))) ); }, }; return e.requester.send(m).then(function (e) { return (function (e, t) { return (function (e) { var t = e.status; return ( e.isTimedOut || (function (e) { var t = e.isTimedOut, n = e.status; return !t && 0 == ~~n; })(e) || (2 != ~~(t / 100) && 4 != ~~(t / 100)) ); })(e) ? t.onRetry(e) : ((n = e), 2 == ~~(n.status / 100) ? t.onSuccess(e) : t.onFail(e)); var n; })(e, v); }); }; return (function (e, t) { return Promise.all( t.map(function (t) { return e.get(t, function () { return Promise.resolve(oo(t)); }); }), ).then(function (e) { var n = e.filter(function (e) { return (function (e) { return 1 === e.status || Date.now() - e.lastUpdate > 12e4; })(e); }), r = e.filter(function (e) { return (function (e) { return 3 === e.status && Date.now() - e.lastUpdate <= 12e4; })(e); }), o = [].concat(a(n), a(r)); return { getTimeout: function (e, t) { return (0 === r.length && 0 === e ? 1 : r.length + 3 + e) * t; }, statelessHosts: o.length > 0 ? o.map(function (e) { return io(e); }) : t, }; }); })(e.hostsCache, n).then(function (e) { return m(a(e.statelessHosts).reverse(), e.getTimeout); }); } function lo(e) { var t = { value: "Algolia for JavaScript (".concat(e, ")"), add: function (e) { var n = "; " .concat(e.segment) .concat(void 0 !== e.version ? " (".concat(e.version, ")") : ""); return ( -1 === t.value.indexOf(n) && (t.value = "".concat(t.value).concat(n)), t ); }, }; return t; } function so(e, t, n) { var r = fo(n), o = "" .concat(e.protocol, "://") .concat(e.url, "/") .concat("/" === t.charAt(0) ? t.substr(1) : t); return r.length && (o += "?".concat(r)), o; } function fo(e) { return Object.keys(e) .map(function (t) { return Xr( "%s=%s", t, ((n = e[t]), "[object Object]" === Object.prototype.toString.call(n) || "[object Array]" === Object.prototype.toString.call(n) ? JSON.stringify(e[t]) : e[t]), ); var n; }) .join("&"); } function po(e) { return e.map(function (e) { return mo(e); }); } function mo(e) { var n = e.request.headers["x-algolia-api-key"] ? { "x-algolia-api-key": "*****" } : {}; return t( t({}, e), {}, { request: t( t({}, e.request), {}, { headers: t(t({}, e.request.headers), n) }, ), }, ); } var vo = function (e) { return function (t, n) { return t.method === co ? e.transporter.read(t, n) : e.transporter.write(t, n); }; }, ho = function (e) { return function (t) { var n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; return Gr( { transporter: e.transporter, appId: e.appId, indexName: t }, n.methods, ); }; }, yo = function (e) { return function (n, r) { var o = n.map(function (e) { return t(t({}, e), {}, { params: fo(e.params || {}) }); }); return e.transporter.read( { method: ao, path: "1/indexes/*/queries", data: { requests: o }, cacheable: !0, }, r, ); }; }, _o = function (e) { return function (n, r) { return Promise.all( n.map(function (n) { var o = n.params, c = o.facetName, a = o.facetQuery, u = i(o, Ve); return ho(e)(n.indexName, { methods: { searchForFacetValues: So }, }).searchForFacetValues(c, a, t(t({}, r), u)); }), ); }; }, bo = function (e) { return function (t, n, r) { return e.transporter.read( { method: ao, path: Xr("1/answers/%s/prediction", e.indexName), data: { query: t, queryLanguages: n }, cacheable: !0, }, r, ); }; }, go = function (e) { return function (t, n) { return e.transporter.read( { method: ao, path: Xr("1/indexes/%s/query", e.indexName), data: { query: t }, cacheable: !0, }, n, ); }; }, So = function (e) { return function (t, n, r) { return e.transporter.read( { method: ao, path: Xr("1/indexes/%s/facets/%s/query", e.indexName, t), data: { facetQuery: n }, cacheable: !0, }, r, ); }; }; function Oo(e, n, r) { var o = { appId: e, apiKey: n, timeouts: { connect: 1, read: 2, write: 30 }, requester: { send: function (e) { return new Promise(function (t) { var n = new XMLHttpRequest(); n.open(e.method, e.url, !0), Object.keys(e.headers).forEach(function (t) { return n.setRequestHeader(t, e.headers[t]); }); var r, o = function (e, r) { return setTimeout(function () { n.abort(), t({ status: 0, content: r, isTimedOut: !0 }); }, 1e3 * e); }, i = o(e.connectTimeout, "Connection timeout"); (n.onreadystatechange = function () { n.readyState > n.OPENED && void 0 === r && (clearTimeout(i), (r = o(e.responseTimeout, "Socket timeout"))); }), (n.onerror = function () { 0 === n.status && (clearTimeout(i), clearTimeout(r), t({ content: n.responseText || "Network request failed", status: n.status, isTimedOut: !1, })); }), (n.onload = function () { clearTimeout(i), clearTimeout(r), t({ content: n.responseText, status: n.status, isTimedOut: !1, }); }), n.send(e.data); }); }, }, logger: (3, { debug: function (e, t) { return Promise.resolve(); }, info: function (e, t) { return Promise.resolve(); }, error: function (e, t) { return console.error(e, t), Promise.resolve(); }, }), responsesCache: Qr(), requestsCache: Qr({ serializable: !1 }), hostsCache: Zr({ caches: [$r({ key: "4.19.1-".concat(e) }), Qr()] }), userAgent: lo("4.19.1").add({ segment: "Browser", version: "lite" }), authMode: eo, }; return (function (e) { var n = e.appId, r = (function (e, t, n) { var r = { "x-algolia-api-key": n, "x-algolia-application-id": t }; return { headers: function () { return e === to ? r : {}; }, queryParameters: function () { return e === eo ? r : {}; }, }; })(void 0 !== e.authMode ? e.authMode : to, n, e.apiKey), o = (function (e) { var t = e.hostsCache, n = e.logger, r = e.requester, o = e.requestsCache, i = e.responsesCache, a = e.timeouts, u = e.userAgent, l = e.hosts, s = e.queryParameters, f = { hostsCache: t, logger: n, requester: r, requestsCache: o, responsesCache: i, timeouts: a, userAgent: u, headers: e.headers, queryParameters: s, hosts: l.map(function (e) { return io(e); }), read: function (e, t) { var n = no(t, f.timeouts.read), r = function () { return uo( f, f.hosts.filter(function (e) { return 0 != (e.accept & ro.Read); }), e, n, ); }; if (!0 !== (void 0 !== n.cacheable ? n.cacheable : e.cacheable)) return r(); var o = { request: e, mappedRequestOptions: n, transporter: { queryParameters: f.queryParameters, headers: f.headers, }, }; return f.responsesCache.get( o, function () { return f.requestsCache.get(o, function () { return f.requestsCache .set(o, r()) .then( function (e) { return Promise.all([f.requestsCache.delete(o), e]); }, function (e) { return Promise.all([ f.requestsCache.delete(o), Promise.reject(e), ]); }, ) .then(function (e) { var t = c(e, 2); return t[0], t[1]; }); }); }, { miss: function (e) { return f.responsesCache.set(o, e); }, }, ); }, write: function (e, t) { return uo( f, f.hosts.filter(function (e) { return 0 != (e.accept & ro.Write); }), e, no(t, f.timeouts.write), ); }, }; return f; })( t( t( { hosts: [ { url: "".concat(n, "-dsn.algolia.net"), accept: ro.Read }, { url: "".concat(n, ".algolia.net"), accept: ro.Write }, ].concat( Yr([ { url: "".concat(n, "-1.algolianet.com") }, { url: "".concat(n, "-2.algolianet.com") }, { url: "".concat(n, "-3.algolianet.com") }, ]), ), }, e, ), {}, { headers: t( t({}, r.headers()), {}, { "content-type": "application/x-www-form-urlencoded" }, e.headers, ), queryParameters: t(t({}, r.queryParameters()), e.queryParameters), }, ), ), i = { transporter: o, appId: n, addAlgoliaAgent: function (e, t) { o.userAgent.add({ segment: e, version: t }); }, clearCache: function () { return Promise.all([ o.requestsCache.clear(), o.responsesCache.clear(), ]).then(function () {}); }, }; return Gr(i, e.methods); })( t( t(t({}, o), r), {}, { methods: { search: yo, searchForFacetValues: _o, multipleQueries: yo, multipleSearchForFacetValues: _o, customRequest: vo, initIndex: function (e) { return function (t) { return ho(e)(t, { methods: { search: go, searchForFacetValues: So, findAnswers: bo, }, }); }; }, }, }, ), ); } Oo.version = "4.19.1"; var wo = ["footer", "searchBox"]; function Eo(e) { var t = e.appId, n = e.apiKey, r = e.indexName, o = e.placeholder, i = void 0 === o ? "Search docs" : o, c = e.searchParameters, a = e.maxResultsPerGroup, u = e.onClose, l = void 0 === u ? Rr : u, s = e.transformItems, f = void 0 === s ? Nr : s, p = e.hitComponent, m = void 0 === p ? pr : p, d = e.resultsFooterComponent, v = void 0 === d ? function () { return null; } : d, h = e.navigator, y = e.initialScrollY, _ = void 0 === y ? 0 : y, b = e.transformSearchClient, g = void 0 === b ? Nr : b, S = e.disableUserPersonalization, O = void 0 !== S && S, w = e.initialQuery, E = void 0 === w ? "" : w, j = e.translations, P = void 0 === j ? {} : j, I = e.getMissingResultsUrl, D = e.insights, k = void 0 !== D && D, C = P.footer, A = P.searchBox, x = $e(P, wo), N = Ze( Be.useState({ query: "", collections: [], completion: null, context: {}, isOpen: !1, activeItemId: null, status: "idle", }), 2, ), T = N[0], R = N[1], q = Be.useRef(null), L = Be.useRef(null), M = Be.useRef(null), H = Be.useRef(null), U = Be.useRef(null), F = Be.useRef(10), B = Be.useRef( "undefined" != typeof window ? window.getSelection().toString().slice(0, 64) : "", ).current, V = Be.useRef(E || B).current, K = (function (e, t, n) { return Be.useMemo( function () { var r = Oo(e, t); return ( r.addAlgoliaAgent("docsearch", "3.6.1"), !1 === /docsearch.js \(.*\)/.test(r.transporter.userAgent.value) && r.addAlgoliaAgent("docsearch-react", "3.6.1"), n(r) ); }, [e, t, n], ); })(t, n, g), W = Be.useRef( Jr({ key: "__DOCSEARCH_FAVORITE_SEARCHES__".concat(r), limit: 10 }), ).current, z = Be.useRef( Jr({ key: "__DOCSEARCH_RECENT_SEARCHES__".concat(r), limit: 0 === W.getAll().length ? 7 : 4, }), ).current, J = Be.useCallback( function (e) { if (!O) { var t = "content" === e.type ? e.__docsearch_parent : e; t && -1 === W.getAll().findIndex(function (e) { return e.objectID === t.objectID; }) && z.add(t); } }, [W, z, O], ), $ = Be.useCallback( function (e) { if (T.context.algoliaInsightsPlugin && e.__autocomplete_id) { var t = e, n = { eventName: "Item Selected", index: t.__autocomplete_indexName, items: [t], positions: [e.__autocomplete_id], queryID: t.__autocomplete_queryID, }; T.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch( n, ); } }, [T.context.algoliaInsightsPlugin], ), Z = Be.useMemo( function () { return ur({ id: "docsearch", defaultActiveItemId: 0, placeholder: i, openOnFocus: !0, initialState: { query: V, context: { searchSuggestions: [] } }, insights: k, navigator: h, onStateChange: function (e) { R(e.state); }, getSources: function (e) { var o = e.query, i = e.state, u = e.setContext, s = e.setStatus; if (!o) return O ? [] : [ { sourceId: "recentSearches", onSelect: function (e) { var t = e.item, n = e.event; J(t), Tr(n) || l(); }, getItemUrl: function (e) { return e.item.url; }, getItems: function () { return z.getAll(); }, }, { sourceId: "favoriteSearches", onSelect: function (e) { var t = e.item, n = e.event; J(t), Tr(n) || l(); }, getItemUrl: function (e) { return e.item.url; }, getItems: function () { return W.getAll(); }, }, ]; var p = Boolean(k); return K.search([ { query: o, indexName: r, params: We( { attributesToRetrieve: [ "hierarchy.lvl0", "hierarchy.lvl1", "hierarchy.lvl2", "hierarchy.lvl3", "hierarchy.lvl4", "hierarchy.lvl5", "hierarchy.lvl6", "content", "type", "url", ], attributesToSnippet: [ "hierarchy.lvl1:".concat(F.current), "hierarchy.lvl2:".concat(F.current), "hierarchy.lvl3:".concat(F.current), "hierarchy.lvl4:".concat(F.current), "hierarchy.lvl5:".concat(F.current), "hierarchy.lvl6:".concat(F.current), "content:".concat(F.current), ], snippetEllipsisText: "…", highlightPreTag: "", highlightPostTag: "", hitsPerPage: 20, clickAnalytics: p, }, c, ), }, ]) .catch(function (e) { throw ("RetryError" === e.name && s("error"), e); }) .then(function (e) { var o = e.results[0], c = o.hits, s = o.nbHits, m = xr( c, function (e) { return Mr(e); }, a, ); i.context.searchSuggestions.length < Object.keys(m).length && u({ searchSuggestions: Object.keys(m) }), u({ nbHits: s }); var d = {}; return ( p && (d = { __autocomplete_indexName: r, __autocomplete_queryID: o.queryID, __autocomplete_algoliaCredentials: { appId: t, apiKey: n, }, }), Object.values(m).map(function (e, t) { return { sourceId: "hits".concat(t), onSelect: function (e) { var t = e.item, n = e.event; J(t), Tr(n) || l(); }, getItemUrl: function (e) { return e.item.url; }, getItems: function () { return Object.values( xr( e, function (e) { return e.hierarchy.lvl1; }, a, ), ) .map(f) .map(function (e) { return e.map(function (t) { var n = null, r = e.find(function (e) { return ( "lvl1" === e.type && e.hierarchy.lvl1 === t.hierarchy.lvl1 ); }); return ( "lvl1" !== t.type && r && (n = r), We( We({}, t), {}, { __docsearch_parent: n }, d, ) ); }); }) .flat(); }, }; }) ); }); }, }); }, [r, c, a, K, l, z, W, J, V, i, h, f, O, k, t, n], ), Q = Z.getEnvironmentProps, Y = Z.getRootProps, G = Z.refresh; return ( (function (e) { var t = e.getEnvironmentProps, n = e.panelElement, r = e.formElement, o = e.inputElement; Be.useEffect( function () { if (n && r && o) { var e = t({ panelElement: n, formElement: r, inputElement: o }), i = e.onTouchStart, c = e.onTouchMove; return ( window.addEventListener("touchstart", i), window.addEventListener("touchmove", c), function () { window.removeEventListener("touchstart", i), window.removeEventListener("touchmove", c); } ); } }, [t, n, r, o], ); })({ getEnvironmentProps: Q, panelElement: H.current, formElement: M.current, inputElement: U.current, }), (function (e) { var t = e.container; Be.useEffect( function () { if (t) { var e = t.querySelectorAll( "a[href]:not([disabled]), button:not([disabled]), input:not([disabled])", ), n = e[0], r = e[e.length - 1]; return ( t.addEventListener("keydown", o), function () { t.removeEventListener("keydown", o); } ); } function o(e) { "Tab" === e.key && (e.shiftKey ? document.activeElement === n && (e.preventDefault(), r.focus()) : document.activeElement === r && (e.preventDefault(), n.focus())); } }, [t], ); })({ container: q.current }), Be.useEffect(function () { return ( document.body.classList.add("DocSearch--active"), function () { var e, t; document.body.classList.remove("DocSearch--active"), null === (e = (t = window).scrollTo) || void 0 === e || e.call(t, 0, _); } ); }, []), Be.useEffect(function () { window.matchMedia("(max-width: 768px)").matches && (F.current = 5); }, []), Be.useEffect( function () { H.current && (H.current.scrollTop = 0); }, [T.query], ), Be.useEffect( function () { V.length > 0 && (G(), U.current && U.current.focus()); }, [V, G], ), Be.useEffect(function () { function e() { if (L.current) { var e = 0.01 * window.innerHeight; L.current.style.setProperty("--docsearch-vh", "".concat(e, "px")); } } return ( e(), window.addEventListener("resize", e), function () { window.removeEventListener("resize", e); } ); }, []), Be.createElement( "div", Je({ ref: q }, Y({ "aria-expanded": !0 }), { className: [ "DocSearch", "DocSearch-Container", "stalled" === T.status && "DocSearch-Container--Stalled", "error" === T.status && "DocSearch-Container--Errored", ] .filter(Boolean) .join(" "), role: "button", tabIndex: 0, onMouseDown: function (e) { e.target === e.currentTarget && l(); }, }), Be.createElement( "div", { className: "DocSearch-Modal", ref: L }, Be.createElement( "header", { className: "DocSearch-SearchBar", ref: M }, Be.createElement( Wr, Je({}, Z, { state: T, autoFocus: 0 === V.length, inputRef: U, isFromSelection: Boolean(V) && V === B, translations: A, onClose: l, }), ), ), Be.createElement( "div", { className: "DocSearch-Dropdown", ref: H }, Be.createElement( Vr, Je({}, Z, { indexName: r, state: T, hitComponent: m, resultsFooterComponent: v, disableUserPersonalization: O, recentSearches: z, favoriteSearches: W, inputRef: U, translations: x, getMissingResultsUrl: I, onItemClick: function (e, t) { $(e), J(e), Tr(t) || l(); }, }), ), ), Be.createElement( "footer", { className: "DocSearch-Footer" }, Be.createElement(fr, { translations: C }), ), ), ) ); } function jo(e) { var t, n, r = Be.useRef(null), o = Ze(Be.useState(!1), 2), i = o[0], c = o[1], a = Ze(Be.useState((null == e ? void 0 : e.initialQuery) || void 0), 2), u = a[0], l = a[1], s = Be.useCallback( function () { c(!0); }, [c], ), f = Be.useCallback( function () { c(!1); }, [c], ); return ( (function (e) { var t = e.isOpen, n = e.onOpen, r = e.onClose, o = e.onInput, i = e.searchButtonRef; Be.useEffect( function () { function e(e) { var c; ((27 === e.keyCode && t) || ("k" === (null === (c = e.key) || void 0 === c ? void 0 : c.toLowerCase()) && (e.metaKey || e.ctrlKey)) || (!(function (e) { var t = e.target, n = t.tagName; return ( t.isContentEditable || "INPUT" === n || "SELECT" === n || "TEXTAREA" === n ); })(e) && "/" === e.key && !t)) && (e.preventDefault(), t ? r() : document.body.classList.contains("DocSearch--active") || document.body.classList.contains("DocSearch--active") || n()), i && i.current === document.activeElement && o && /[a-zA-Z0-9]/.test(String.fromCharCode(e.keyCode)) && o(e); } return ( window.addEventListener("keydown", e), function () { window.removeEventListener("keydown", e); } ); }, [t, n, r, o, i], ); })({ isOpen: i, onOpen: s, onClose: f, onInput: Be.useCallback( function (e) { c(!0), l(e.key); }, [c, l], ), searchButtonRef: r, }), Be.createElement( Be.Fragment, null, Be.createElement(tt, { ref: r, translations: null == e || null === (t = e.translations) || void 0 === t ? void 0 : t.button, onClick: s, }), i && Ie( Be.createElement( Eo, Je({}, e, { initialScrollY: window.scrollY, initialQuery: u, translations: null == e || null === (n = e.translations) || void 0 === n ? void 0 : n.modal, onClose: f, }), ), document.body, ), ) ); } return function (e) { Ae( Be.createElement( jo, o({}, e, { transformSearchClient: function (t) { return ( t.addAlgoliaAgent("docsearch.js", "3.6.1"), e.transformSearchClient ? e.transformSearchClient(t) : t ); }, }), ), (function (e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : window; return "string" == typeof e ? t.document.querySelector(e) : e; })(e.container, e.environment), ); }; }); //# sourceMappingURL=index.js.map docsearch({ container: "#docsearch", appId: "74VN1YECLR", indexName: "gpt-index", apiKey: "c4b0e099fa9004f69855e474b3e7d3bb", }); console.log(docsearch); console.log("Docsearch loaded"); ================================================ FILE: docs/api_docs/docs/api_reference/_static/js/leadfeeder.js ================================================ (function (ss, ex) { window.ldfdr = window.ldfdr || function () { (ldfdr._q = ldfdr._q || []).push([].slice.call(arguments)); }; (function (d, s) { fs = d.getElementsByTagName(s)[0]; function ce(src) { var cs = d.createElement(s); cs.src = src; cs.async = 1; fs.parentNode.insertBefore(cs, fs); } ce( "https://sc.lfeeder.com/lftracker_v1_" + ss + (ex ? "_" + ex : "") + ".js", ); })(document, "script"); })("Xbp1oaEnqwn8EdVj"); ================================================ FILE: docs/api_docs/docs/api_reference/context.md ================================================ ::: workflows.context.Context options: show_root_heading: true show_root_full_path: false members: - collect_events - from_dict - get_result - is_running - retry_info - send_event - store - to_dict - wait_for_event - write_event_to_stream ::: workflows.context.state_store options: members: - DictState - InMemoryStateStore ::: workflows.context.serializers options: members: - BaseSerializer - JsonSerializer - PickleSerializer ================================================ FILE: docs/api_docs/docs/api_reference/decorators.md ================================================ ::: workflows.decorators options: members: - step - catch_error ================================================ FILE: docs/api_docs/docs/api_reference/errors.md ================================================ ::: workflows.errors ================================================ FILE: docs/api_docs/docs/api_reference/events.md ================================================ ::: workflows.events options: members: - Event - InputRequiredEvent - HumanResponseEvent - StartEvent - StopEvent - WorkflowTimedOutEvent - WorkflowCancelledEvent - WorkflowFailedEvent - StepFailedEvent ================================================ FILE: docs/api_docs/docs/api_reference/handler.md ================================================ ::: workflows.handler ================================================ FILE: docs/api_docs/docs/api_reference/index.md ================================================ # Workflows API reference For conceptual guides, patterns, and end-to-end examples, see the main [Agent Workflows documentation](/python/llamaagents/workflows/). This API reference focuses on signatures, parameters, and behavior of individual classes and functions. ## Installation Install the core Workflows SDK from PyPI: ```bash pip install llama-index-workflows ``` ## What this reference covers - **Workflow**: The event-driven orchestrator (`Workflow`) that defines and runs your application flows using typed steps. See [`Workflow`](./workflow/). - **Context**: Execution context and state management across steps and runs. - **Events**: Typed events that steps receive and emit (including `StartEvent`, `StopEvent`, and custom events). - **Decorators**: The `@step` decorator and related utilities for defining workflow steps. - **Handler**: `WorkflowHandler`, used to await results and stream intermediate events. - **Retry policy**: `RetryPolicy`, retry conditions, wait strategies, and stop conditions for per-step retry behavior. - **Errors**: Exception types raised by the runtime (validation, configuration, and runtime errors). - **Resource**: Resource and dependency injection primitives used by steps. Use this reference together with the live examples on the main docs site, such as the [`Workflow` page on developers.llamaindex.ai](https://developers.llamaindex.ai/python/workflows-api-reference/workflow/), when you need both conceptual context and exact API details. ================================================ FILE: docs/api_docs/docs/api_reference/resource.md ================================================ ::: workflows.resource.Resource ::: workflows.resource.ResourceConfig ================================================ FILE: docs/api_docs/docs/api_reference/retry_policy.md ================================================ # Retry Policy The retry API is built from three families of callables modeled after [tenacity](https://tenacity.readthedocs.io/en/latest/): - **[Retry conditions](#retry-conditions)** decide whether an exception should be retried. - **[Wait strategies](#wait-strategies)** decide how long to sleep before the next attempt. - **[Stop conditions](#stop-conditions)** decide when retries should stop. You can compose them into a policy with `retry_policy(retry=..., wait=..., stop=...)`. Retry conditions support `|` and `&`, wait strategies support `+`, and stop conditions support `|` and `&`. ## Quick Example ```python from workflows.retry_policy import ( retry_policy, retry_if_exception_message, retry_if_exception_type, stop_after_attempt, stop_before_delay, wait_fixed, wait_random, ) policy = retry_policy( retry=retry_if_exception_type((TimeoutError, ConnectionError)) | retry_if_exception_message(match="rate limit|temporarily unavailable"), wait=wait_fixed(1) + wait_random(0, 1), stop=stop_after_attempt(5) | stop_before_delay(30), ) ``` ## Policy Constructor ::: workflows.retry_policy options: members: - retry_policy - RetryPolicy ## Retry Introspection Types exposed to step bodies via `Context.retry_info()` and to `@catch_error` handlers via `StepFailedEvent.exception`. ::: workflows.retry_policy options: members: - RetryInfo ## Retry Conditions Modeled after [tenacity retry functions](https://tenacity.readthedocs.io/en/latest/api.html#retry-functions). ::: workflows.retry_policy options: members: - retry_if_exception - retry_if_exception_type - retry_if_not_exception_type - retry_unless_exception_type - retry_if_exception_message - retry_if_not_exception_message - retry_if_exception_cause_type - retry_any - retry_all - retry_always - retry_never ## Wait Strategies Modeled after [tenacity wait functions](https://tenacity.readthedocs.io/en/latest/api.html#wait-functions). ::: workflows.retry_policy options: members: - wait_fixed - wait_none - wait_exponential - wait_incrementing - wait_random - wait_exponential_jitter - wait_random_exponential - wait_full_jitter - wait_chain - wait_combine ## Stop Conditions Modeled after [tenacity stop functions](https://tenacity.readthedocs.io/en/latest/api.html#stop-functions). ::: workflows.retry_policy options: members: - stop_after_attempt - stop_after_delay - stop_before_delay - stop_any - stop_all - stop_never ## Deprecated Constructors The following helpers predate the composable API and are kept for backwards compatibility. Prefer `retry_policy(...)` with explicit retry, wait, and stop arguments. ::: workflows.retry_policy options: members: - ConstantDelayRetryPolicy - ExponentialBackoffRetryPolicy ================================================ FILE: docs/api_docs/docs/api_reference/workflow.md ================================================ ::: workflows.workflow options: members: - Workflow filters: ["!^_", "^__init__$"] ================================================ FILE: docs/api_docs/docs/api_reference/workflow_server/client.md ================================================ ::: llama_agents.client.WorkflowClient options: show_root_heading: true show_root_full_path: false merge_init_into_class: false filters: ["!^get_result$"] ::: llama_agents.client.EventStream options: show_root_heading: true show_root_full_path: false merge_init_into_class: false ================================================ FILE: docs/api_docs/docs/api_reference/workflow_server/models.md ================================================ ::: llama_agents.client.EventEnvelopeWithMetadata options: show_root_heading: true show_root_full_path: false merge_init_into_class: false ::: llama_agents.client.HandlerData options: show_root_heading: true show_root_full_path: false merge_init_into_class: false ::: llama_agents.client.HandlersListResponse options: show_root_heading: true show_root_full_path: false merge_init_into_class: false ::: llama_agents.client.SendEventResponse options: show_root_heading: true show_root_full_path: false merge_init_into_class: false ::: llama_agents.client.CancelHandlerResponse options: show_root_heading: true show_root_full_path: false merge_init_into_class: false ================================================ FILE: docs/api_docs/docs/api_reference/workflow_server/server.md ================================================ ::: llama_agents.server.WorkflowServer options: show_root_heading: true show_root_full_path: false merge_init_into_class: true ================================================ FILE: docs/api_docs/docs/css/algolia.css ================================================ /** * Skipped minification because the original files appears to be already minified. * Original file: /npm/@docsearch/css@3.6.1/dist/style.css * * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files */ /*! @docsearch/css 3.6.1 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */ :root { --docsearch-primary-color: #5468ff; --docsearch-text-color: #1c1e21; --docsearch-spacing: 12px; --docsearch-icon-stroke-width: 1.4; --docsearch-highlight-color: var(--docsearch-primary-color); --docsearch-muted-color: #969faf; --docsearch-container-background: rgba(101, 108, 133, 0.8); --docsearch-logo-color: #5468ff; --docsearch-modal-width: 560px; --docsearch-modal-height: 600px; --docsearch-modal-background: #f5f6f7; --docsearch-modal-shadow: inset 1px 1px 0 0 hsla(0, 0%, 100%, 0.5), 0 3px 8px 0 #555a64; --docsearch-searchbox-height: 56px; --docsearch-searchbox-background: #ebedf0; --docsearch-searchbox-focus-background: #fff; --docsearch-searchbox-shadow: inset 0 0 0 2px var(--docsearch-primary-color); --docsearch-hit-height: 56px; --docsearch-hit-color: #444950; --docsearch-hit-active-color: #fff; --docsearch-hit-background: #fff; --docsearch-hit-shadow: 0 1px 3px 0 #d4d9e1; --docsearch-key-gradient: linear-gradient(-225deg, #d5dbe4, #f8f8f8); --docsearch-key-shadow: inset 0 -2px 0 0 #cdcde6, inset 0 0 1px 1px #fff, 0 1px 2px 1px rgba(30, 35, 90, 0.4); --docsearch-key-pressed-shadow: inset 0 -2px 0 0 #cdcde6, inset 0 0 1px 1px #fff, 0 1px 1px 0 rgba(30, 35, 90, 0.4); --docsearch-footer-height: 44px; --docsearch-footer-background: #fff; --docsearch-footer-shadow: 0 -1px 0 0 #e0e3e8, 0 -3px 6px 0 rgba(69, 98, 155, 0.12); } html[data-theme="dark"] { --docsearch-text-color: #f5f6f7; --docsearch-container-background: rgba(9, 10, 17, 0.8); --docsearch-modal-background: #15172a; --docsearch-modal-shadow: inset 1px 1px 0 0 #2c2e40, 0 3px 8px 0 #000309; --docsearch-searchbox-background: #090a11; --docsearch-searchbox-focus-background: #000; --docsearch-hit-color: #bec3c9; --docsearch-hit-shadow: none; --docsearch-hit-background: #090a11; --docsearch-key-gradient: linear-gradient(-26.5deg, #565872, #31355b); --docsearch-key-shadow: inset 0 -2px 0 0 #282d55, inset 0 0 1px 1px #51577d, 0 2px 2px 0 rgba(3, 4, 9, 0.3); --docsearch-key-pressed-shadow: inset 0 -2px 0 0 #282d55, inset 0 0 1px 1px #51577d, 0 1px 1px 0 rgba(3, 4, 9, 0.30196078431372547); --docsearch-footer-background: #1e2136; --docsearch-footer-shadow: inset 0 1px 0 0 rgba(73, 76, 106, 0.5), 0 -4px 8px 0 rgba(0, 0, 0, 0.2); --docsearch-logo-color: #fff; --docsearch-muted-color: #7f8497; } .DocSearch-Button { align-items: center; background: var(--docsearch-searchbox-background); border: 0; border-radius: 40px; color: var(--docsearch-muted-color); cursor: pointer; display: flex; font-weight: 500; height: 36px; justify-content: space-between; margin: 0 0 0 16px; padding: 0 8px; user-select: none; } .DocSearch-Button:active, .DocSearch-Button:focus, .DocSearch-Button:hover { background: var(--docsearch-searchbox-focus-background); box-shadow: var(--docsearch-searchbox-shadow); color: var(--docsearch-text-color); outline: none; } .DocSearch-Button-Container { align-items: center; display: flex; } .DocSearch-Search-Icon { stroke-width: 1.6; } .DocSearch-Button .DocSearch-Search-Icon { color: var(--docsearch-text-color); } .DocSearch-Button-Placeholder { font-size: 1rem; padding: 0 12px 0 6px; } .DocSearch-Button-Keys { display: flex; min-width: calc(40px + 0.8em); } .DocSearch-Button-Key { align-items: center; background: var(--docsearch-key-gradient); border-radius: 3px; box-shadow: var(--docsearch-key-shadow); color: var(--docsearch-muted-color); display: flex; height: 18px; justify-content: center; margin-right: 0.4em; position: relative; padding: 0 0 2px; border: 0; top: -1px; width: 20px; } .DocSearch-Button-Key--pressed { transform: translate3d(0, 1px, 0); box-shadow: var(--docsearch-key-pressed-shadow); } @media (max-width: 768px) { .DocSearch-Button-Keys, .DocSearch-Button-Placeholder { display: none; } } .DocSearch--active { overflow: hidden !important; } .DocSearch-Container, .DocSearch-Container * { box-sizing: border-box; } .DocSearch-Container { background-color: var(--docsearch-container-background); height: 100vh; left: 0; position: fixed; top: 0; width: 100vw; z-index: 200; } .DocSearch-Container a { text-decoration: none; } .DocSearch-Link { appearance: none; background: none; border: 0; color: var(--docsearch-highlight-color); cursor: pointer; font: inherit; margin: 0; padding: 0; } .DocSearch-Modal { background: var(--docsearch-modal-background); border-radius: 6px; box-shadow: var(--docsearch-modal-shadow); flex-direction: column; margin: 60px auto auto; max-width: var(--docsearch-modal-width); position: relative; } .DocSearch-SearchBar { display: flex; padding: var(--docsearch-spacing) var(--docsearch-spacing) 0; } .DocSearch-Form { align-items: center; background: var(--docsearch-searchbox-focus-background); border-radius: 4px; box-shadow: var(--docsearch-searchbox-shadow); display: flex; height: var(--docsearch-searchbox-height); margin: 0; padding: 0 var(--docsearch-spacing); position: relative; width: 100%; } .DocSearch-Input { appearance: none; background: transparent; border: 0; color: var(--docsearch-text-color); flex: 1; font: inherit; font-size: 1.2em; height: 100%; outline: none; padding: 0 0 0 8px; width: 80%; } .DocSearch-Input::placeholder { color: var(--docsearch-muted-color); opacity: 1; } .DocSearch-Input::-webkit-search-cancel-button, .DocSearch-Input::-webkit-search-decoration, .DocSearch-Input::-webkit-search-results-button, .DocSearch-Input::-webkit-search-results-decoration { display: none; } .DocSearch-LoadingIndicator, .DocSearch-MagnifierLabel, .DocSearch-Reset { margin: 0; padding: 0; } .DocSearch-MagnifierLabel, .DocSearch-Reset { align-items: center; color: var(--docsearch-highlight-color); display: flex; justify-content: center; } .DocSearch-Container--Stalled .DocSearch-MagnifierLabel, .DocSearch-LoadingIndicator { display: none; } .DocSearch-Container--Stalled .DocSearch-LoadingIndicator { align-items: center; color: var(--docsearch-highlight-color); display: flex; justify-content: center; } @media screen and (prefers-reduced-motion: reduce) { .DocSearch-Reset { animation: none; appearance: none; background: none; border: 0; border-radius: 50%; color: var(--docsearch-icon-color); cursor: pointer; right: 0; stroke-width: var(--docsearch-icon-stroke-width); } } .DocSearch-Reset { animation: fade-in 0.1s ease-in forwards; appearance: none; background: none; border: 0; border-radius: 50%; color: var(--docsearch-icon-color); cursor: pointer; padding: 2px; right: 0; stroke-width: var(--docsearch-icon-stroke-width); } .DocSearch-Reset[hidden] { display: none; } .DocSearch-Reset:hover { color: var(--docsearch-highlight-color); } .DocSearch-LoadingIndicator svg, .DocSearch-MagnifierLabel svg { height: 24px; width: 24px; } .DocSearch-Cancel { display: none; } .DocSearch-Dropdown { max-height: calc( var(--docsearch-modal-height) - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height) ); min-height: var(--docsearch-spacing); overflow-y: auto; overflow-y: overlay; padding: 0 var(--docsearch-spacing); scrollbar-color: var(--docsearch-muted-color) var(--docsearch-modal-background); scrollbar-width: thin; } .DocSearch-Dropdown::-webkit-scrollbar { width: 12px; } .DocSearch-Dropdown::-webkit-scrollbar-track { background: transparent; } .DocSearch-Dropdown::-webkit-scrollbar-thumb { background-color: var(--docsearch-muted-color); border: 3px solid var(--docsearch-modal-background); border-radius: 20px; } .DocSearch-Dropdown ul { list-style: none; margin: 0; padding: 0; } .DocSearch-Label { font-size: 0.75em; line-height: 1.6em; } .DocSearch-Help, .DocSearch-Label { color: var(--docsearch-muted-color); } .DocSearch-Help { font-size: 0.9em; margin: 0; user-select: none; } .DocSearch-Title { font-size: 1.2em; } .DocSearch-Logo a { display: flex; } .DocSearch-Logo svg { color: var(--docsearch-logo-color); margin-left: 8px; } .DocSearch-Hits:last-of-type { margin-bottom: 24px; } .DocSearch-Hits mark { background: none; color: var(--docsearch-highlight-color); } .DocSearch-HitsFooter { color: var(--docsearch-muted-color); display: flex; font-size: 0.85em; justify-content: center; margin-bottom: var(--docsearch-spacing); padding: var(--docsearch-spacing); } .DocSearch-HitsFooter a { border-bottom: 1px solid; color: inherit; } .DocSearch-Hit { border-radius: 4px; display: flex; padding-bottom: 4px; position: relative; } @media screen and (prefers-reduced-motion: reduce) { .DocSearch-Hit--deleting { transition: none; } } .DocSearch-Hit--deleting { opacity: 0; transition: all 0.25s linear; } @media screen and (prefers-reduced-motion: reduce) { .DocSearch-Hit--favoriting { transition: none; } } .DocSearch-Hit--favoriting { transform: scale(0); transform-origin: top center; transition: all 0.25s linear; transition-delay: 0.25s; } .DocSearch-Hit a { background: var(--docsearch-hit-background); border-radius: 4px; box-shadow: var(--docsearch-hit-shadow); display: block; padding-left: var(--docsearch-spacing); width: 100%; } .DocSearch-Hit-source { background: var(--docsearch-modal-background); color: var(--docsearch-highlight-color); font-size: 0.85em; font-weight: 600; line-height: 32px; margin: 0 -4px; padding: 8px 4px 0; position: sticky; top: 0; z-index: 10; } .DocSearch-Hit-Tree { color: var(--docsearch-muted-color); height: var(--docsearch-hit-height); opacity: 0.5; stroke-width: var(--docsearch-icon-stroke-width); width: 24px; } .DocSearch-Hit[aria-selected="true"] a { background-color: var(--docsearch-highlight-color); } .DocSearch-Hit[aria-selected="true"] mark { text-decoration: underline; } .DocSearch-Hit-Container { align-items: center; color: var(--docsearch-hit-color); display: flex; flex-direction: row; height: var(--docsearch-hit-height); padding: 0 var(--docsearch-spacing) 0 0; } .DocSearch-Hit-icon { height: 20px; width: 20px; } .DocSearch-Hit-action, .DocSearch-Hit-icon { color: var(--docsearch-muted-color); stroke-width: var(--docsearch-icon-stroke-width); } .DocSearch-Hit-action { align-items: center; display: flex; height: 22px; width: 22px; } .DocSearch-Hit-action svg { display: block; height: 18px; width: 18px; } .DocSearch-Hit-action + .DocSearch-Hit-action { margin-left: 6px; } .DocSearch-Hit-action-button { appearance: none; background: none; border: 0; border-radius: 50%; color: inherit; cursor: pointer; padding: 2px; } svg.DocSearch-Hit-Select-Icon { display: none; } .DocSearch-Hit[aria-selected="true"] .DocSearch-Hit-Select-Icon { display: block; } .DocSearch-Hit-action-button:focus, .DocSearch-Hit-action-button:hover { background: rgba(0, 0, 0, 0.2); transition: background-color 0.1s ease-in; } @media screen and (prefers-reduced-motion: reduce) { .DocSearch-Hit-action-button:focus, .DocSearch-Hit-action-button:hover { transition: none; } } .DocSearch-Hit-action-button:focus path, .DocSearch-Hit-action-button:hover path { fill: #fff; } .DocSearch-Hit-content-wrapper { display: flex; flex: 1 1 auto; flex-direction: column; font-weight: 500; justify-content: center; line-height: 1.7em; margin: 0 8px; overflow-x: hidden; overflow-y: hidden; position: relative; text-overflow: ellipsis; white-space: nowrap; width: 80%; } .DocSearch-Hit-title { font-size: 1.5em; } .DocSearch-Hit-path { color: var(--docsearch-muted-color); font-size: 0.75em; } .DocSearch-Hit[aria-selected="true"] .DocSearch-Hit-action, .DocSearch-Hit[aria-selected="true"] .DocSearch-Hit-icon, .DocSearch-Hit[aria-selected="true"] .DocSearch-Hit-path, .DocSearch-Hit[aria-selected="true"] .DocSearch-Hit-text, .DocSearch-Hit[aria-selected="true"] .DocSearch-Hit-title, .DocSearch-Hit[aria-selected="true"] .DocSearch-Hit-Tree, .DocSearch-Hit[aria-selected="true"] mark { color: var(--docsearch-hit-active-color) !important; } @media screen and (prefers-reduced-motion: reduce) { .DocSearch-Hit-action-button:focus, .DocSearch-Hit-action-button:hover { background: rgba(0, 0, 0, 0.2); transition: none; } } .DocSearch-ErrorScreen, .DocSearch-NoResults, .DocSearch-StartScreen { font-size: 0.9em; margin: 0 auto; padding: 36px 0; text-align: center; width: 80%; } .DocSearch-Screen-Icon { color: var(--docsearch-muted-color); padding-bottom: 12px; } .DocSearch-NoResults-Prefill-List { display: inline-block; padding-bottom: 24px; text-align: left; } .DocSearch-NoResults-Prefill-List ul { display: inline-block; padding: 8px 0 0; } .DocSearch-NoResults-Prefill-List li { list-style-position: inside; list-style-type: "» "; } .DocSearch-Prefill { appearance: none; background: none; border: 0; border-radius: 1em; color: var(--docsearch-highlight-color); cursor: pointer; display: inline-block; font-size: 1em; font-weight: 700; padding: 0; } .DocSearch-Prefill:focus, .DocSearch-Prefill:hover { outline: none; text-decoration: underline; } .DocSearch-Footer { align-items: center; background: var(--docsearch-footer-background); border-radius: 0 0 8px 8px; box-shadow: var(--docsearch-footer-shadow); display: flex; flex-direction: row-reverse; flex-shrink: 0; height: var(--docsearch-footer-height); justify-content: space-between; padding: 0 var(--docsearch-spacing); position: relative; user-select: none; width: 100%; z-index: 300; } .DocSearch-Commands { color: var(--docsearch-muted-color); display: flex; list-style: none; margin: 0; padding: 0; } .DocSearch-Commands li { align-items: center; display: flex; } .DocSearch-Commands li:not(:last-of-type) { margin-right: 0.8em; } .DocSearch-Commands-Key { align-items: center; background: var(--docsearch-key-gradient); border-radius: 2px; box-shadow: var(--docsearch-key-shadow); display: flex; height: 18px; justify-content: center; margin-right: 0.4em; padding: 0 0 1px; color: var(--docsearch-muted-color); border: 0; width: 20px; } .DocSearch-VisuallyHiddenForAccessibility { clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; } @media (max-width: 768px) { :root { --docsearch-spacing: 10px; --docsearch-footer-height: 40px; } .DocSearch-Dropdown { height: 100%; } .DocSearch-Container { height: 100vh; height: -webkit-fill-available; height: calc(var(--docsearch-vh, 1vh) * 100); position: absolute; } .DocSearch-Footer { border-radius: 0; bottom: 0; position: absolute; } .DocSearch-Hit-content-wrapper { display: flex; position: relative; width: 80%; } .DocSearch-Modal { border-radius: 0; box-shadow: none; height: 100vh; height: -webkit-fill-available; height: calc(var(--docsearch-vh, 1vh) * 100); margin: 0; max-width: 100%; width: 100%; } .DocSearch-Dropdown { max-height: calc( var(--docsearch-vh, 1vh) * 100 - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height) ); } .DocSearch-Cancel { appearance: none; background: none; border: 0; color: var(--docsearch-highlight-color); cursor: pointer; display: inline-block; flex: none; font: inherit; font-size: 1em; font-weight: 500; margin-left: var(--docsearch-spacing); outline: none; overflow: hidden; padding: 0; user-select: none; white-space: nowrap; } .DocSearch-Commands, .DocSearch-Hit-Tree { display: none; } } @keyframes fade-in { 0% { opacity: 0; } to { opacity: 1; } } /* hide superfluous second search icon */ label.md-icon[for="__search"] { display: none; } ================================================ FILE: docs/api_docs/docs/css/custom.css ================================================ #my-component-root *, #headlessui-portal-root * { z-index: 1000000000000; font-size: 100%; } textarea { border: 0; padding: 0; } article p { margin-bottom: 10px !important; } ================================================ FILE: docs/api_docs/docs/css/style.css ================================================ .md-container .jp-Cell-outputWrapper .jp-OutputPrompt.jp-OutputArea-prompt, .md-container .jp-Cell-inputWrapper .jp-InputPrompt.jp-InputArea-prompt { display: none !important; } /* CSS styles for side-by-side layout */ .container { display: flex-col; justify-content: space-between; margin-bottom: 20px; /* Adjust spacing between sections */ position: sticky; top: 2.4rem; z-index: 1000; /* Ensure it's above other content */ background-color: white; /* Match your page background */ padding: 0.2rem; } .example-heading { margin: 0.2rem !important; } .usage-examples { width: 100%; /* Adjust the width as needed */ border: 1px solid var(--md-default-fg-color--light); border-radius: 2px; padding: 0.2rem; } /* Additional styling for the toggle */ .toggle-example { cursor: pointer; color: white; text-decoration: underline; background-color: var(--md-primary-fg-color); padding: 0.2rem; border-radius: 2px; } .hidden { display: none; } /* mendable search styling */ #my-component-root > div { bottom: 100px; } ================================================ FILE: docs/api_docs/docs/javascript/algolia.js ================================================ /** * Skipped minification because the original files appears to be already minified. * Original file: /npm/@docsearch/js@3.6.1/dist/umd/index.js * * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files */ /*! @docsearch/js 3.6.1 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */ !(function (e, t) { "object" == typeof exports && "undefined" != typeof module ? (module.exports = t()) : "function" == typeof define && define.amd ? define(t) : ((e = e || self).docsearch = t()); })(this, function () { "use strict"; function e(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 t(t) { for (var n = 1; n < arguments.length; n++) { var o = null != arguments[n] ? arguments[n] : {}; n % 2 ? e(Object(o), !0).forEach(function (e) { r(t, e, o[e]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(o)) : e(Object(o)).forEach(function (e) { Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(o, e)); }); } return t; } function n(e) { return ( (n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) { return typeof e; } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }), n(e) ); } 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 ); } function o() { return ( (o = 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; }), o.apply(this, arguments) ); } function i(e, t) { if (null == e) return {}; var n, r, o = (function (e, t) { if (null == e) return {}; var n, r, o = {}, i = Object.keys(e); for (r = 0; r < i.length; r++) (n = i[r]), t.indexOf(n) >= 0 || (o[n] = e[n]); return o; })(e, t); if (Object.getOwnPropertySymbols) { var i = Object.getOwnPropertySymbols(e); for (r = 0; r < i.length; r++) (n = i[r]), t.indexOf(n) >= 0 || (Object.prototype.propertyIsEnumerable.call(e, n) && (o[n] = e[n])); } return o; } function c(e, t) { return ( (function (e) { if (Array.isArray(e)) return e; })(e) || (function (e, t) { var n = null == e ? null : ("undefined" != typeof Symbol && e[Symbol.iterator]) || e["@@iterator"]; if (null == n) return; var r, o, i = [], c = !0, a = !1; try { for ( n = n.call(e); !(c = (r = n.next()).done) && (i.push(r.value), !t || i.length !== t); c = !0 ); } catch (e) { (a = !0), (o = e); } finally { try { c || null == n.return || n.return(); } finally { if (a) throw o; } } return i; })(e, t) || u(e, t) || (function () { throw new TypeError( "Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.", ); })() ); } function a(e) { return ( (function (e) { if (Array.isArray(e)) return l(e); })(e) || (function (e) { if ( ("undefined" != typeof Symbol && null != e[Symbol.iterator]) || null != e["@@iterator"] ) return Array.from(e); })(e) || u(e) || (function () { throw new TypeError( "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.", ); })() ); } function u(e, t) { if (e) { if ("string" == typeof e) return l(e, t); var n = Object.prototype.toString.call(e).slice(8, -1); return ( "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? l(e, t) : void 0 ); } } function l(e, t) { (null == t || t > e.length) && (t = e.length); for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n]; return r; } var s, f, p, m, d, v = {}, h = [], y = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i; function _(e, t) { for (var n in t) e[n] = t[n]; return e; } function b(e) { var t = e.parentNode; t && t.removeChild(e); } function g(e, t, n) { var r, o, i, c = arguments, a = {}; for (i in t) "key" == i ? (r = t[i]) : "ref" == i ? (o = t[i]) : (a[i] = t[i]); if (arguments.length > 3) for (n = [n], i = 3; i < arguments.length; i++) n.push(c[i]); if ( (null != n && (a.children = n), "function" == typeof e && null != e.defaultProps) ) for (i in e.defaultProps) void 0 === a[i] && (a[i] = e.defaultProps[i]); return S(e, a, r, o, null); } function S(e, t, n, r, o) { var i = { type: e, props: t, key: n, ref: r, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: null == o ? ++s.__v : o, }; return null != s.vnode && s.vnode(i), i; } function O(e) { return e.children; } function w(e, t) { (this.props = e), (this.context = t); } function E(e, t) { if (null == t) return e.__ ? E(e.__, e.__.__k.indexOf(e) + 1) : null; for (var n; t < e.__k.length; t++) if (null != (n = e.__k[t]) && null != n.__e) return n.__e; return "function" == typeof e.type ? E(e) : null; } function j(e) { var t, n; if (null != (e = e.__) && null != e.__c) { for (e.__e = e.__c.base = null, t = 0; t < e.__k.length; t++) if (null != (n = e.__k[t]) && null != n.__e) { e.__e = e.__c.base = n.__e; break; } return j(e); } } function P(e) { ((!e.__d && (e.__d = !0) && f.push(e) && !I.__r++) || m !== s.debounceRendering) && ((m = s.debounceRendering) || p)(I); } function I() { for (var e; (I.__r = f.length); ) (e = f.sort(function (e, t) { return e.__v.__b - t.__v.__b; })), (f = []), e.some(function (e) { var t, n, r, o, i, c; e.__d && ((i = (o = (t = e).__v).__e), (c = t.__P) && ((n = []), ((r = _({}, o)).__v = o.__v + 1), q( c, o, r, t.__n, void 0 !== c.ownerSVGElement, null != o.__h ? [i] : null, n, null == i ? E(o) : i, o.__h, ), L(n, o), o.__e != i && j(o))); }); } function D(e, t, n, r, o, i, c, a, u, l) { var s, f, p, m, d, y, _, b = (r && r.__k) || h, g = b.length; for (n.__k = [], s = 0; s < t.length; s++) if ( null != (m = n.__k[s] = null == (m = t[s]) || "boolean" == typeof m ? null : "string" == typeof m || "number" == typeof m ? S(null, m, null, null, m) : Array.isArray(m) ? S(O, { children: m }, null, null, null) : m.__b > 0 ? S(m.type, m.props, m.key, null, m.__v) : m) ) { if ( ((m.__ = n), (m.__b = n.__b + 1), null === (p = b[s]) || (p && m.key == p.key && m.type === p.type)) ) b[s] = void 0; else for (f = 0; f < g; f++) { if ((p = b[f]) && m.key == p.key && m.type === p.type) { b[f] = void 0; break; } p = null; } q(e, m, (p = p || v), o, i, c, a, u, l), (d = m.__e), (f = m.ref) && p.ref != f && (_ || (_ = []), p.ref && _.push(p.ref, null, m), _.push(f, m.__c || d, m)), null != d ? (null == y && (y = d), "function" == typeof m.type && null != m.__k && m.__k === p.__k ? (m.__d = u = k(m, u, e)) : (u = A(e, m, p, b, d, u)), l || "option" !== n.type ? "function" == typeof n.type && (n.__d = u) : (e.value = "")) : u && p.__e == u && u.parentNode != e && (u = E(p)); } for (n.__e = y, s = g; s--; ) null != b[s] && ("function" == typeof n.type && null != b[s].__e && b[s].__e == n.__d && (n.__d = E(r, s + 1)), U(b[s], b[s])); if (_) for (s = 0; s < _.length; s++) H(_[s], _[++s], _[++s]); } function k(e, t, n) { var r, o; for (r = 0; r < e.__k.length; r++) (o = e.__k[r]) && ((o.__ = e), (t = "function" == typeof o.type ? k(o, t, n) : A(n, o, o, e.__k, o.__e, t))); return t; } function C(e, t) { return ( (t = t || []), null == e || "boolean" == typeof e || (Array.isArray(e) ? e.some(function (e) { C(e, t); }) : t.push(e)), t ); } function A(e, t, n, r, o, i) { var c, a, u; if (void 0 !== t.__d) (c = t.__d), (t.__d = void 0); else if (null == n || o != i || null == o.parentNode) e: if (null == i || i.parentNode !== e) e.appendChild(o), (c = null); else { for (a = i, u = 0; (a = a.nextSibling) && u < r.length; u += 2) if (a == o) break e; e.insertBefore(o, i), (c = i); } return void 0 !== c ? c : o.nextSibling; } function x(e, t, n) { "-" === t[0] ? e.setProperty(t, n) : (e[t] = null == n ? "" : "number" != typeof n || y.test(t) ? n : n + "px"); } function N(e, t, n, r, o) { var i; e: if ("style" === t) if ("string" == typeof n) e.style.cssText = n; else { if (("string" == typeof r && (e.style.cssText = r = ""), r)) for (t in r) (n && t in n) || x(e.style, t, ""); if (n) for (t in n) (r && n[t] === r[t]) || x(e.style, t, n[t]); } else if ("o" === t[0] && "n" === t[1]) (i = t !== (t = t.replace(/Capture$/, ""))), (t = t.toLowerCase() in e ? t.toLowerCase().slice(2) : t.slice(2)), e.l || (e.l = {}), (e.l[t + i] = n), n ? r || e.addEventListener(t, i ? R : T, i) : e.removeEventListener(t, i ? R : T, i); else if ("dangerouslySetInnerHTML" !== t) { if (o) t = t.replace(/xlink[H:h]/, "h").replace(/sName$/, "s"); else if ( "href" !== t && "list" !== t && "form" !== t && "download" !== t && t in e ) try { e[t] = null == n ? "" : n; break e; } catch (e) {} "function" == typeof n || (null != n && (!1 !== n || ("a" === t[0] && "r" === t[1])) ? e.setAttribute(t, n) : e.removeAttribute(t)); } } function T(e) { this.l[e.type + !1](s.event ? s.event(e) : e); } function R(e) { this.l[e.type + !0](s.event ? s.event(e) : e); } function q(e, t, n, r, o, i, c, a, u) { var l, f, p, m, d, v, h, y, b, g, S, E = t.type; if (void 0 !== t.constructor) return null; null != n.__h && ((u = n.__h), (a = t.__e = n.__e), (t.__h = null), (i = [a])), (l = s.__b) && l(t); try { e: if ("function" == typeof E) { if ( ((y = t.props), (b = (l = E.contextType) && r[l.__c]), (g = l ? (b ? b.props.value : l.__) : r), n.__c ? (h = (f = t.__c = n.__c).__ = f.__E) : ("prototype" in E && E.prototype.render ? (t.__c = f = new E(y, g)) : ((t.__c = f = new w(y, g)), (f.constructor = E), (f.render = F)), b && b.sub(f), (f.props = y), f.state || (f.state = {}), (f.context = g), (f.__n = r), (p = f.__d = !0), (f.__h = [])), null == f.__s && (f.__s = f.state), null != E.getDerivedStateFromProps && (f.__s == f.state && (f.__s = _({}, f.__s)), _(f.__s, E.getDerivedStateFromProps(y, f.__s))), (m = f.props), (d = f.state), p) ) null == E.getDerivedStateFromProps && null != f.componentWillMount && f.componentWillMount(), null != f.componentDidMount && f.__h.push(f.componentDidMount); else { if ( (null == E.getDerivedStateFromProps && y !== m && null != f.componentWillReceiveProps && f.componentWillReceiveProps(y, g), (!f.__e && null != f.shouldComponentUpdate && !1 === f.shouldComponentUpdate(y, f.__s, g)) || t.__v === n.__v) ) { (f.props = y), (f.state = f.__s), t.__v !== n.__v && (f.__d = !1), (f.__v = t), (t.__e = n.__e), (t.__k = n.__k), f.__h.length && c.push(f); break e; } null != f.componentWillUpdate && f.componentWillUpdate(y, f.__s, g), null != f.componentDidUpdate && f.__h.push(function () { f.componentDidUpdate(m, d, v); }); } (f.context = g), (f.props = y), (f.state = f.__s), (l = s.__r) && l(t), (f.__d = !1), (f.__v = t), (f.__P = e), (l = f.render(f.props, f.state, f.context)), (f.state = f.__s), null != f.getChildContext && (r = _(_({}, r), f.getChildContext())), p || null == f.getSnapshotBeforeUpdate || (v = f.getSnapshotBeforeUpdate(m, d)), (S = null != l && l.type === O && null == l.key ? l.props.children : l), D(e, Array.isArray(S) ? S : [S], t, n, r, o, i, c, a, u), (f.base = t.__e), (t.__h = null), f.__h.length && c.push(f), h && (f.__E = f.__ = null), (f.__e = !1); } else null == i && t.__v === n.__v ? ((t.__k = n.__k), (t.__e = n.__e)) : (t.__e = M(n.__e, t, n, r, o, i, c, u)); (l = s.diffed) && l(t); } catch (e) { (t.__v = null), (u || null != i) && ((t.__e = a), (t.__h = !!u), (i[i.indexOf(a)] = null)), s.__e(e, t, n); } } function L(e, t) { s.__c && s.__c(t, e), e.some(function (t) { try { (e = t.__h), (t.__h = []), e.some(function (e) { e.call(t); }); } catch (e) { s.__e(e, t.__v); } }); } function M(e, t, n, r, o, i, c, a) { var u, l, s, f, p = n.props, m = t.props, d = t.type, y = 0; if (("svg" === d && (o = !0), null != i)) for (; y < i.length; y++) if ( (u = i[y]) && (u === e || (d ? u.localName == d : 3 == u.nodeType)) ) { (e = u), (i[y] = null); break; } if (null == e) { if (null === d) return document.createTextNode(m); (e = o ? document.createElementNS("http://www.w3.org/2000/svg", d) : document.createElement(d, m.is && m)), (i = null), (a = !1); } if (null === d) p === m || (a && e.data === m) || (e.data = m); else { if ( ((i = i && h.slice.call(e.childNodes)), (l = (p = n.props || v).dangerouslySetInnerHTML), (s = m.dangerouslySetInnerHTML), !a) ) { if (null != i) for (p = {}, f = 0; f < e.attributes.length; f++) p[e.attributes[f].name] = e.attributes[f].value; (s || l) && ((s && ((l && s.__html == l.__html) || s.__html === e.innerHTML)) || (e.innerHTML = (s && s.__html) || "")); } if ( ((function (e, t, n, r, o) { var i; for (i in n) "children" === i || "key" === i || i in t || N(e, i, null, n[i], r); for (i in t) (o && "function" != typeof t[i]) || "children" === i || "key" === i || "value" === i || "checked" === i || n[i] === t[i] || N(e, i, t[i], n[i], r); })(e, m, p, o, a), s) ) t.__k = []; else if ( ((y = t.props.children), D( e, Array.isArray(y) ? y : [y], t, n, r, o && "foreignObject" !== d, i, c, e.firstChild, a, ), null != i) ) for (y = i.length; y--; ) null != i[y] && b(i[y]); a || ("value" in m && void 0 !== (y = m.value) && (y !== e.value || ("progress" === d && !y)) && N(e, "value", y, p.value, !1), "checked" in m && void 0 !== (y = m.checked) && y !== e.checked && N(e, "checked", y, p.checked, !1)); } return e; } function H(e, t, n) { try { "function" == typeof e ? e(t) : (e.current = t); } catch (e) { s.__e(e, n); } } function U(e, t, n) { var r, o, i; if ( (s.unmount && s.unmount(e), (r = e.ref) && ((r.current && r.current !== e.__e) || H(r, null, t)), n || "function" == typeof e.type || (n = null != (o = e.__e)), (e.__e = e.__d = void 0), null != (r = e.__c)) ) { if (r.componentWillUnmount) try { r.componentWillUnmount(); } catch (e) { s.__e(e, t); } r.base = r.__P = null; } if ((r = e.__k)) for (i = 0; i < r.length; i++) r[i] && U(r[i], t, n); null != o && b(o); } function F(e, t, n) { return this.constructor(e, n); } function B(e, t, n) { var r, o, i; s.__ && s.__(e, t), (o = (r = "function" == typeof n) ? null : (n && n.__k) || t.__k), (i = []), q( t, (e = ((!r && n) || t).__k = g(O, null, [e])), o || v, v, void 0 !== t.ownerSVGElement, !r && n ? [n] : o ? null : t.firstChild ? h.slice.call(t.childNodes) : null, i, !r && n ? n : o ? o.__e : t.firstChild, r, ), L(i, e); } function V(e, t) { B(e, t, V); } function K(e, t, n) { var r, o, i, c = arguments, a = _({}, e.props); for (i in t) "key" == i ? (r = t[i]) : "ref" == i ? (o = t[i]) : (a[i] = t[i]); if (arguments.length > 3) for (n = [n], i = 3; i < arguments.length; i++) n.push(c[i]); return ( null != n && (a.children = n), S(e.type, a, r || e.key, o || e.ref, null) ); } (s = { __e: function (e, t) { for (var n, r, o; (t = t.__); ) if ((n = t.__c) && !n.__) try { if ( ((r = n.constructor) && null != r.getDerivedStateFromError && (n.setState(r.getDerivedStateFromError(e)), (o = n.__d)), null != n.componentDidCatch && (n.componentDidCatch(e), (o = n.__d)), o) ) return (n.__E = n); } catch (t) { e = t; } throw e; }, __v: 0, }), (w.prototype.setState = function (e, t) { var n; (n = null != this.__s && this.__s !== this.state ? this.__s : (this.__s = _({}, this.state))), "function" == typeof e && (e = e(_({}, n), this.props)), e && _(n, e), null != e && this.__v && (t && this.__h.push(t), P(this)); }), (w.prototype.forceUpdate = function (e) { this.__v && ((this.__e = !0), e && this.__h.push(e), P(this)); }), (w.prototype.render = O), (f = []), (p = "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout), (I.__r = 0), (d = 0); var W, z, J, $ = 0, Z = [], Q = s.__b, Y = s.__r, G = s.diffed, X = s.__c, ee = s.unmount; function te(e, t) { s.__h && s.__h(z, e, $ || t), ($ = 0); var n = z.__H || (z.__H = { __: [], __h: [] }); return e >= n.__.length && n.__.push({}), n.__[e]; } function ne(e) { return ($ = 1), re(pe, e); } function re(e, t, n) { var r = te(W++, 2); return ( (r.t = e), r.__c || ((r.__ = [ n ? n(t) : pe(void 0, t), function (e) { var t = r.t(r.__[0], e); r.__[0] !== t && ((r.__ = [t, r.__[1]]), r.__c.setState({})); }, ]), (r.__c = z)), r.__ ); } function oe(e, t) { var n = te(W++, 3); !s.__s && fe(n.__H, t) && ((n.__ = e), (n.__H = t), z.__H.__h.push(n)); } function ie(e, t) { var n = te(W++, 4); !s.__s && fe(n.__H, t) && ((n.__ = e), (n.__H = t), z.__h.push(n)); } function ce(e, t) { var n = te(W++, 7); return fe(n.__H, t) && ((n.__ = e()), (n.__H = t), (n.__h = e)), n.__; } function ae() { Z.forEach(function (e) { if (e.__P) try { e.__H.__h.forEach(le), e.__H.__h.forEach(se), (e.__H.__h = []); } catch (t) { (e.__H.__h = []), s.__e(t, e.__v); } }), (Z = []); } (s.__b = function (e) { (z = null), Q && Q(e); }), (s.__r = function (e) { Y && Y(e), (W = 0); var t = (z = e.__c).__H; t && (t.__h.forEach(le), t.__h.forEach(se), (t.__h = [])); }), (s.diffed = function (e) { G && G(e); var t = e.__c; t && t.__H && t.__H.__h.length && ((1 !== Z.push(t) && J === s.requestAnimationFrame) || ( (J = s.requestAnimationFrame) || function (e) { var t, n = function () { clearTimeout(r), ue && cancelAnimationFrame(t), setTimeout(e); }, r = setTimeout(n, 100); ue && (t = requestAnimationFrame(n)); } )(ae)), (z = void 0); }), (s.__c = function (e, t) { t.some(function (e) { try { e.__h.forEach(le), (e.__h = e.__h.filter(function (e) { return !e.__ || se(e); })); } catch (n) { t.some(function (e) { e.__h && (e.__h = []); }), (t = []), s.__e(n, e.__v); } }), X && X(e, t); }), (s.unmount = function (e) { ee && ee(e); var t = e.__c; if (t && t.__H) try { t.__H.__.forEach(le); } catch (e) { s.__e(e, t.__v); } }); var ue = "function" == typeof requestAnimationFrame; function le(e) { var t = z; "function" == typeof e.__c && e.__c(), (z = t); } function se(e) { var t = z; (e.__c = e.__()), (z = t); } function fe(e, t) { return ( !e || e.length !== t.length || t.some(function (t, n) { return t !== e[n]; }) ); } function pe(e, t) { return "function" == typeof t ? t(e) : t; } function me(e, t) { for (var n in t) e[n] = t[n]; return e; } function de(e, t) { for (var n in e) if ("__source" !== n && !(n in t)) return !0; for (var r in t) if ("__source" !== r && e[r] !== t[r]) return !0; return !1; } function ve(e) { this.props = e; } ((ve.prototype = new w()).isPureReactComponent = !0), (ve.prototype.shouldComponentUpdate = function (e, t) { return de(this.props, e) || de(this.state, t); }); var he = s.__b; s.__b = function (e) { e.type && e.type.__f && e.ref && ((e.props.ref = e.ref), (e.ref = null)), he && he(e); }; var ye = ("undefined" != typeof Symbol && Symbol.for && Symbol.for("react.forward_ref")) || 3911; var _e = function (e, t) { return null == e ? null : C(C(e).map(t)); }, be = { map: _e, forEach: _e, count: function (e) { return e ? C(e).length : 0; }, only: function (e) { var t = C(e); if (1 !== t.length) throw "Children.only"; return t[0]; }, toArray: C, }, ge = s.__e; function Se() { (this.__u = 0), (this.t = null), (this.__b = null); } function Oe(e) { var t = e.__.__c; return t && t.__e && t.__e(e); } function we() { (this.u = null), (this.o = null); } (s.__e = function (e, t, n) { if (e.then) for (var r, o = t; (o = o.__); ) if ((r = o.__c) && r.__c) return ( null == t.__e && ((t.__e = n.__e), (t.__k = n.__k)), r.__c(e, t) ); ge(e, t, n); }), ((Se.prototype = new w()).__c = function (e, t) { var n = t.__c, r = this; null == r.t && (r.t = []), r.t.push(n); var o = Oe(r.__v), i = !1, c = function () { i || ((i = !0), (n.componentWillUnmount = n.__c), o ? o(a) : a()); }; (n.__c = n.componentWillUnmount), (n.componentWillUnmount = function () { c(), n.__c && n.__c(); }); var a = function () { if (!--r.__u) { if (r.state.__e) { var e = r.state.__e; r.__v.__k[0] = (function e(t, n, r) { return ( t && ((t.__v = null), (t.__k = t.__k && t.__k.map(function (t) { return e(t, n, r); })), t.__c && t.__c.__P === n && (t.__e && r.insertBefore(t.__e, t.__d), (t.__c.__e = !0), (t.__c.__P = r))), t ); })(e, e.__c.__P, e.__c.__O); } var t; for (r.setState({ __e: (r.__b = null) }); (t = r.t.pop()); ) t.forceUpdate(); } }, u = !0 === t.__h; r.__u++ || u || r.setState({ __e: (r.__b = r.__v.__k[0]) }), e.then(c, c); }), (Se.prototype.componentWillUnmount = function () { this.t = []; }), (Se.prototype.render = function (e, t) { if (this.__b) { if (this.__v.__k) { var n = document.createElement("div"), r = this.__v.__k[0].__c; this.__v.__k[0] = (function e(t, n, r) { return ( t && (t.__c && t.__c.__H && (t.__c.__H.__.forEach(function (e) { "function" == typeof e.__c && e.__c(); }), (t.__c.__H = null)), null != (t = me({}, t)).__c && (t.__c.__P === r && (t.__c.__P = n), (t.__c = null)), (t.__k = t.__k && t.__k.map(function (t) { return e(t, n, r); }))), t ); })(this.__b, n, (r.__O = r.__P)); } this.__b = null; } var o = t.__e && g(O, null, e.fallback); return o && (o.__h = null), [g(O, null, t.__e ? null : e.children), o]; }); var Ee = function (e, t, n) { if ( (++n[1] === n[0] && e.o.delete(t), e.props.revealOrder && ("t" !== e.props.revealOrder[0] || !e.o.size)) ) for (n = e.u; n; ) { for (; n.length > 3; ) n.pop()(); if (n[1] < n[0]) break; e.u = n = n[2]; } }; function je(e) { return ( (this.getChildContext = function () { return e.context; }), e.children ); } function Pe(e) { var t = this, n = e.i; (t.componentWillUnmount = function () { B(null, t.l), (t.l = null), (t.i = null); }), t.i && t.i !== n && t.componentWillUnmount(), e.__v ? (t.l || ((t.i = n), (t.l = { nodeType: 1, parentNode: n, childNodes: [], appendChild: function (e) { this.childNodes.push(e), t.i.appendChild(e); }, insertBefore: function (e, n) { this.childNodes.push(e), t.i.appendChild(e); }, removeChild: function (e) { this.childNodes.splice(this.childNodes.indexOf(e) >>> 1, 1), t.i.removeChild(e); }, })), B(g(je, { context: t.context }, e.__v), t.l)) : t.l && t.componentWillUnmount(); } function Ie(e, t) { return g(Pe, { __v: e, i: t }); } ((we.prototype = new w()).__e = function (e) { var t = this, n = Oe(t.__v), r = t.o.get(e); return ( r[0]++, function (o) { var i = function () { t.props.revealOrder ? (r.push(o), Ee(t, e, r)) : o(); }; n ? n(i) : i(); } ); }), (we.prototype.render = function (e) { (this.u = null), (this.o = new Map()); var t = C(e.children); e.revealOrder && "b" === e.revealOrder[0] && t.reverse(); for (var n = t.length; n--; ) this.o.set(t[n], (this.u = [1, 0, this.u])); return e.children; }), (we.prototype.componentDidUpdate = we.prototype.componentDidMount = function () { var e = this; this.o.forEach(function (t, n) { Ee(e, n, t); }); }); var De = ("undefined" != typeof Symbol && Symbol.for && Symbol.for("react.element")) || 60103, ke = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, Ce = function (e) { return ( "undefined" != typeof Symbol && "symbol" == n(Symbol()) ? /fil|che|rad/i : /fil|che|ra/i ).test(e); }; function Ae(e, t, n) { return ( null == t.__k && (t.textContent = ""), B(e, t), "function" == typeof n && n(), e ? e.__c : null ); } (w.prototype.isReactComponent = {}), [ "componentWillMount", "componentWillReceiveProps", "componentWillUpdate", ].forEach(function (e) { Object.defineProperty(w.prototype, e, { configurable: !0, get: function () { return this["UNSAFE_" + e]; }, set: function (t) { Object.defineProperty(this, e, { configurable: !0, writable: !0, value: t, }); }, }); }); var xe = s.event; function Ne() {} function Te() { return this.cancelBubble; } function Re() { return this.defaultPrevented; } s.event = function (e) { return ( xe && (e = xe(e)), (e.persist = Ne), (e.isPropagationStopped = Te), (e.isDefaultPrevented = Re), (e.nativeEvent = e) ); }; var qe, Le = { configurable: !0, get: function () { return this.class; }, }, Me = s.vnode; s.vnode = function (e) { var t = e.type, n = e.props, r = n; if ("string" == typeof t) { for (var o in ((r = {}), n)) { var i = n[o]; ("value" === o && "defaultValue" in n && null == i) || ("defaultValue" === o && "value" in n && null == n.value ? (o = "value") : "download" === o && !0 === i ? (i = "") : /ondoubleclick/i.test(o) ? (o = "ondblclick") : /^onchange(textarea|input)/i.test(o + t) && !Ce(n.type) ? (o = "oninput") : /^on(Ani|Tra|Tou|BeforeInp)/.test(o) ? (o = o.toLowerCase()) : ke.test(o) ? (o = o.replace(/[A-Z0-9]/, "-$&").toLowerCase()) : null === i && (i = void 0), (r[o] = i)); } "select" == t && r.multiple && Array.isArray(r.value) && (r.value = C(n.children).forEach(function (e) { e.props.selected = -1 != r.value.indexOf(e.props.value); })), "select" == t && null != r.defaultValue && (r.value = C(n.children).forEach(function (e) { e.props.selected = r.multiple ? -1 != r.defaultValue.indexOf(e.props.value) : r.defaultValue == e.props.value; })), (e.props = r); } t && n.class != n.className && ((Le.enumerable = "className" in n), null != n.className && (r.class = n.className), Object.defineProperty(r, "className", Le)), (e.$$typeof = De), Me && Me(e); }; var He = s.__r; s.__r = function (e) { He && He(e), (qe = e.__c); }; var Ue = { ReactCurrentDispatcher: { current: { readContext: function (e) { return qe.__n[e.__c].props.value; }, }, }, }; "object" == ("undefined" == typeof performance ? "undefined" : n(performance)) && "function" == typeof performance.now && performance.now.bind(performance); function Fe(e) { return !!e && e.$$typeof === De; } var Be = { useState: ne, useReducer: re, useEffect: oe, useLayoutEffect: ie, useRef: function (e) { return ( ($ = 5), ce(function () { return { current: e }; }, []) ); }, useImperativeHandle: function (e, t, n) { ($ = 6), ie( function () { "function" == typeof e ? e(t()) : e && (e.current = t()); }, null == n ? n : n.concat(e), ); }, useMemo: ce, useCallback: function (e, t) { return ( ($ = 8), ce(function () { return e; }, t) ); }, useContext: function (e) { var t = z.context[e.__c], n = te(W++, 9); return ( (n.__c = e), t ? (null == n.__ && ((n.__ = !0), t.sub(z)), t.props.value) : e.__ ); }, useDebugValue: function (e, t) { s.useDebugValue && s.useDebugValue(t ? t(e) : e); }, version: "16.8.0", Children: be, render: Ae, hydrate: function (e, t, n) { return V(e, t), "function" == typeof n && n(), e ? e.__c : null; }, unmountComponentAtNode: function (e) { return !!e.__k && (B(null, e), !0); }, createPortal: Ie, createElement: g, createContext: function (e, t) { var n = { __c: (t = "__cC" + d++), __: e, Consumer: function (e, t) { return e.children(t); }, Provider: function (e) { var n, r; return ( this.getChildContext || ((n = []), ((r = {})[t] = this), (this.getChildContext = function () { return r; }), (this.shouldComponentUpdate = function (e) { this.props.value !== e.value && n.some(P); }), (this.sub = function (e) { n.push(e); var t = e.componentWillUnmount; e.componentWillUnmount = function () { n.splice(n.indexOf(e), 1), t && t.call(e); }; })), e.children ); }, }; return (n.Provider.__ = n.Consumer.contextType = n); }, createFactory: function (e) { return g.bind(null, e); }, cloneElement: function (e) { return Fe(e) ? K.apply(null, arguments) : e; }, createRef: function () { return { current: null }; }, Fragment: O, isValidElement: Fe, findDOMNode: function (e) { return (e && (e.base || (1 === e.nodeType && e))) || null; }, Component: w, PureComponent: ve, memo: function (e, t) { function n(e) { var n = this.props.ref, r = n == e.ref; return ( !r && n && (n.call ? n(null) : (n.current = null)), t ? !t(this.props, e) || !r : de(this.props, e) ); } function r(t) { return (this.shouldComponentUpdate = n), g(e, t); } return ( (r.displayName = "Memo(" + (e.displayName || e.name) + ")"), (r.prototype.isReactComponent = !0), (r.__f = !0), r ); }, forwardRef: function (e) { function t(t, r) { var o = me({}, t); return ( delete o.ref, e( o, (r = t.ref || r) && ("object" != n(r) || "current" in r) ? r : null, ) ); } return ( (t.$$typeof = ye), (t.render = t), (t.prototype.isReactComponent = t.__f = !0), (t.displayName = "ForwardRef(" + (e.displayName || e.name) + ")"), t ); }, unstable_batchedUpdates: function (e, t) { return e(t); }, StrictMode: O, Suspense: Se, SuspenseList: we, lazy: function (e) { var t, n, r; function o(o) { if ( (t || (t = e()).then( function (e) { n = e.default || e; }, function (e) { r = e; }, ), r) ) throw r; if (!n) throw t; return g(n, o); } return (o.displayName = "Lazy"), (o.__f = !0), o; }, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Ue, }, Ve = ["facetName", "facetQuery"]; function Ke(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 We(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? Ke(Object(n), !0).forEach(function (t) { ze(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Ke(Object(n)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); }); } return e; } function ze(e, t, n) { return ( t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0, }) : (e[t] = n), e ); } function Je() { return ( (Je = 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; }), Je.apply(this, arguments) ); } function $e(e, t) { if (null == e) return {}; var n, r, o = (function (e, t) { if (null == e) return {}; var n, r, o = {}, i = Object.keys(e); for (r = 0; r < i.length; r++) (n = i[r]), t.indexOf(n) >= 0 || (o[n] = e[n]); return o; })(e, t); if (Object.getOwnPropertySymbols) { var i = Object.getOwnPropertySymbols(e); for (r = 0; r < i.length; r++) (n = i[r]), t.indexOf(n) >= 0 || (Object.prototype.propertyIsEnumerable.call(e, n) && (o[n] = e[n])); } return o; } function Ze(e, t) { return ( (function (e) { if (Array.isArray(e)) return e; })(e) || (function (e, t) { var n = null == e ? null : ("undefined" != typeof Symbol && e[Symbol.iterator]) || e["@@iterator"]; if (null != n) { var r, o, i = [], c = !0, a = !1; try { for ( n = n.call(e); !(c = (r = n.next()).done) && (i.push(r.value), !t || i.length !== t); c = !0 ); } catch (e) { (a = !0), (o = e); } finally { try { c || null == n.return || n.return(); } finally { if (a) throw o; } } return i; } })(e, t) || Qe(e, t) || (function () { throw new TypeError( "Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.", ); })() ); } function Qe(e, t) { if (e) { if ("string" == typeof e) return Ye(e, t); var n = Object.prototype.toString.call(e).slice(8, -1); return ( "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? Ye(e, t) : void 0 ); } } function Ye(e, t) { (null == t || t > e.length) && (t = e.length); for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n]; return r; } function Ge() { return Be.createElement( "svg", { width: "15", height: "15", className: "DocSearch-Control-Key-Icon" }, Be.createElement("path", { d: "M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953", strokeWidth: "1.2", stroke: "currentColor", fill: "none", strokeLinecap: "square", }), ); } function Xe() { return Be.createElement( "svg", { width: "20", height: "20", className: "DocSearch-Search-Icon", viewBox: "0 0 20 20", "aria-hidden": "true", }, Be.createElement("path", { d: "M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z", stroke: "currentColor", fill: "none", fillRule: "evenodd", strokeLinecap: "round", strokeLinejoin: "round", }), ); } var et = ["translations"], tt = Be.forwardRef(function (e, t) { var n = e.translations, r = void 0 === n ? {} : n, o = $e(e, et), i = r.buttonText, c = void 0 === i ? "Search" : i, a = r.buttonAriaLabel, u = void 0 === a ? "Search" : a, l = Ze(ne(null), 2), s = l[0], f = l[1]; return ( oe(function () { "undefined" != typeof navigator && (/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ? f("⌘") : f("Ctrl")); }, []), Be.createElement( "button", Je( { type: "button", className: "DocSearch DocSearch-Button", "aria-label": u, }, o, { ref: t }, ), Be.createElement( "span", { className: "DocSearch-Button-Container" }, Be.createElement(Xe, null), Be.createElement( "span", { className: "DocSearch-Button-Placeholder" }, c, ), ), Be.createElement( "span", { className: "DocSearch-Button-Keys" }, null !== s && Be.createElement( Be.Fragment, null, Be.createElement( nt, { reactsToKey: "Ctrl" === s ? "Ctrl" : "Meta" }, "Ctrl" === s ? Be.createElement(Ge, null) : s, ), Be.createElement(nt, { reactsToKey: "k" }, "K"), ), ), ) ); }); function nt(e) { var t = e.reactsToKey, n = e.children, r = Ze(ne(!1), 2), o = r[0], i = r[1]; return ( oe( function () { if (t) return ( window.addEventListener("keydown", e), window.addEventListener("keyup", n), function () { window.removeEventListener("keydown", e), window.removeEventListener("keyup", n); } ); function e(e) { e.key === t && i(!0); } function n(e) { (e.key !== t && "Meta" !== e.key) || i(!1); } }, [t], ), Be.createElement( "kbd", { className: o ? "DocSearch-Button-Key DocSearch-Button-Key--pressed" : "DocSearch-Button-Key", }, n, ) ); } function rt(e, t) { var n = void 0; return function () { for (var r = arguments.length, o = new Array(r), i = 0; i < r; i++) o[i] = arguments[i]; n && clearTimeout(n), (n = setTimeout(function () { return e.apply(void 0, o); }, t)); }; } function ot(e) { return e.reduce(function (e, t) { return e.concat(t); }, []); } var it = 0; function ct(e) { return 0 === e.collections.length ? 0 : e.collections.reduce(function (e, t) { return e + t.items.length; }, 0); } function at(e) { return e !== Object(e); } function ut(e, t) { if (e === t) return !0; if (at(e) || at(t) || "function" == typeof e || "function" == typeof t) return e === t; if (Object.keys(e).length !== Object.keys(t).length) return !1; for (var n = 0, r = Object.keys(e); n < r.length; n++) { var o = r[n]; if (!(o in t)) return !1; if (!ut(e[o], t[o])) return !1; } return !0; } var lt = function () {}, st = [{ segment: "autocomplete-core", version: "1.9.3" }]; function ft(e) { var t = e.item, n = e.items; return { index: t.__autocomplete_indexName, items: [t], positions: [ 1 + n.findIndex(function (e) { return e.objectID === t.objectID; }), ], queryID: t.__autocomplete_queryID, algoliaSource: ["autocomplete"], }; } function pt(e, t) { (null == t || t > e.length) && (t = e.length); for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n]; return r; } var mt = ["items"], dt = ["items"]; function vt(e) { return ( (vt = "function" == typeof Symbol && "symbol" == n(Symbol.iterator) ? function (e) { return n(e); } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : n(e); }), vt(e) ); } function ht(e) { return ( (function (e) { if (Array.isArray(e)) return yt(e); })(e) || (function (e) { if ( ("undefined" != typeof Symbol && null != e[Symbol.iterator]) || null != e["@@iterator"] ) return Array.from(e); })(e) || (function (e, t) { if (e) { if ("string" == typeof e) return yt(e, t); var n = Object.prototype.toString.call(e).slice(8, -1); return ( "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? yt(e, t) : void 0 ); } })(e) || (function () { throw new TypeError( "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.", ); })() ); } function yt(e, t) { (null == t || t > e.length) && (t = e.length); for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n]; return r; } function _t(e, t) { if (null == e) return {}; var n, r, o = (function (e, t) { if (null == e) return {}; var n, r, o = {}, i = Object.keys(e); for (r = 0; r < i.length; r++) (n = i[r]), t.indexOf(n) >= 0 || (o[n] = e[n]); return o; })(e, t); if (Object.getOwnPropertySymbols) { var i = Object.getOwnPropertySymbols(e); for (r = 0; r < i.length; r++) (n = i[r]), t.indexOf(n) >= 0 || (Object.prototype.propertyIsEnumerable.call(e, n) && (o[n] = e[n])); } return o; } function bt(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 gt(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? bt(Object(n), !0).forEach(function (t) { St(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : bt(Object(n)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); }); } return e; } function St(e, t, n) { return ( (t = (function (e) { var t = (function (e, t) { if ("object" !== vt(e) || null === e) return e; var n = e[Symbol.toPrimitive]; if (void 0 !== n) { var r = n.call(e, t); if ("object" !== vt(r)) return r; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(e); })(e, "string"); return "symbol" === vt(t) ? t : String(t); })(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0, }) : (e[t] = n), e ); } function Ot(e) { for ( var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 20, n = [], r = 0; r < e.objectIDs.length; r += t ) n.push(gt(gt({}, e), {}, { objectIDs: e.objectIDs.slice(r, r + t) })); return n; } function wt(e) { return e.map(function (e) { var t = e.items, n = _t(e, mt); return gt( gt({}, n), {}, { objectIDs: (null == t ? void 0 : t.map(function (e) { return e.objectID; })) || n.objectIDs, }, ); }); } function Et(e) { var t, n, r, o = ((t = (function (e, t) { return ( (function (e) { if (Array.isArray(e)) return e; })(e) || (function (e, t) { var n = null == e ? null : ("undefined" != typeof Symbol && e[Symbol.iterator]) || e["@@iterator"]; if (null != n) { var r, o, i, c, a = [], u = !0, l = !1; try { if (((i = (n = n.call(e)).next), 0 === t)) { if (Object(n) !== n) return; u = !1; } else for ( ; !(u = (r = i.call(n)).done) && (a.push(r.value), a.length !== t); u = !0 ); } catch (e) { (l = !0), (o = e); } finally { try { if ( !u && null != n.return && ((c = n.return()), Object(c) !== c) ) return; } finally { if (l) throw o; } } return a; } })(e, t) || (function (e, t) { if (e) { if ("string" == typeof e) return pt(e, t); var n = Object.prototype.toString.call(e).slice(8, -1); return ( "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? pt(e, t) : void 0 ); } })(e, t) || (function () { throw new TypeError( "Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.", ); })() ); })((e.version || "").split(".").map(Number), 2)), (n = t[0]), (r = t[1]), n >= 3 || (2 === n && r >= 4) || (1 === n && r >= 10)); function i(t, n, r) { if (o && void 0 !== r) { var i = r[0].__autocomplete_algoliaCredentials, c = { "X-Algolia-Application-Id": i.appId, "X-Algolia-API-Key": i.apiKey, }; e.apply(void 0, [t].concat(ht(n), [{ headers: c }])); } else e.apply(void 0, [t].concat(ht(n))); } return { init: function (t, n) { e("init", { appId: t, apiKey: n }); }, setUserToken: function (t) { e("setUserToken", t); }, clickedObjectIDsAfterSearch: function () { for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]; t.length > 0 && i("clickedObjectIDsAfterSearch", wt(t), t[0].items); }, clickedObjectIDs: function () { for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]; t.length > 0 && i("clickedObjectIDs", wt(t), t[0].items); }, clickedFilters: function () { for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++) n[r] = arguments[r]; n.length > 0 && e.apply(void 0, ["clickedFilters"].concat(n)); }, convertedObjectIDsAfterSearch: function () { for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]; t.length > 0 && i("convertedObjectIDsAfterSearch", wt(t), t[0].items); }, convertedObjectIDs: function () { for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]; t.length > 0 && i("convertedObjectIDs", wt(t), t[0].items); }, convertedFilters: function () { for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++) n[r] = arguments[r]; n.length > 0 && e.apply(void 0, ["convertedFilters"].concat(n)); }, viewedObjectIDs: function () { for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]; t.length > 0 && t .reduce(function (e, t) { var n = t.items, r = _t(t, dt); return [].concat( ht(e), ht( Ot( gt( gt({}, r), {}, { objectIDs: (null == n ? void 0 : n.map(function (e) { return e.objectID; })) || r.objectIDs, }, ), ).map(function (e) { return { items: n, payload: e }; }), ), ); }, []) .forEach(function (e) { var t = e.items; return i("viewedObjectIDs", [e.payload], t); }); }, viewedFilters: function () { for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++) n[r] = arguments[r]; n.length > 0 && e.apply(void 0, ["viewedFilters"].concat(n)); }, }; } function jt(e) { var t = e.items.reduce(function (e, t) { var n; return ( (e[t.__autocomplete_indexName] = ( null !== (n = e[t.__autocomplete_indexName]) && void 0 !== n ? n : [] ).concat(t)), e ); }, {}); return Object.keys(t).map(function (e) { return { index: e, items: t[e], algoliaSource: ["autocomplete"] }; }); } function Pt(e) { return e.objectID && e.__autocomplete_indexName && e.__autocomplete_queryID; } function It(e) { return ( (It = "function" == typeof Symbol && "symbol" == n(Symbol.iterator) ? function (e) { return n(e); } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : n(e); }), It(e) ); } function Dt(e) { return ( (function (e) { if (Array.isArray(e)) return kt(e); })(e) || (function (e) { if ( ("undefined" != typeof Symbol && null != e[Symbol.iterator]) || null != e["@@iterator"] ) return Array.from(e); })(e) || (function (e, t) { if (e) { if ("string" == typeof e) return kt(e, t); var n = Object.prototype.toString.call(e).slice(8, -1); return ( "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? kt(e, t) : void 0 ); } })(e) || (function () { throw new TypeError( "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.", ); })() ); } function kt(e, t) { (null == t || t > e.length) && (t = e.length); for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n]; return r; } function Ct(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 At(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? Ct(Object(n), !0).forEach(function (t) { xt(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Ct(Object(n)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); }); } return e; } function xt(e, t, n) { return ( (t = (function (e) { var t = (function (e, t) { if ("object" !== It(e) || null === e) return e; var n = e[Symbol.toPrimitive]; if (void 0 !== n) { var r = n.call(e, t); if ("object" !== It(r)) return r; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(e); })(e, "string"); return "symbol" === It(t) ? t : String(t); })(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0, }) : (e[t] = n), e ); } var Nt = "https://cdn.jsdelivr.net/npm/search-insights@".concat( "2.6.0", "/dist/search-insights.min.js", ), Tt = rt(function (e) { var t = e.onItemsChange, n = e.items, r = e.insights, o = e.state; t({ insights: r, insightsEvents: jt({ items: n }).map(function (e) { return At({ eventName: "Items Viewed" }, e); }), state: o, }); }, 400); function Rt(e) { var t = (function (e) { return At( { onItemsChange: function (e) { var t = e.insights, n = e.insightsEvents; t.viewedObjectIDs.apply( t, Dt( n.map(function (e) { return At( At({}, e), {}, { algoliaSource: [].concat(Dt(e.algoliaSource || []), [ "autocomplete-internal", ]), }, ); }), ), ); }, onSelect: function (e) { var t = e.insights, n = e.insightsEvents; t.clickedObjectIDsAfterSearch.apply( t, Dt( n.map(function (e) { return At( At({}, e), {}, { algoliaSource: [].concat(Dt(e.algoliaSource || []), [ "autocomplete-internal", ]), }, ); }), ), ); }, onActive: lt, }, e, ); })(e), n = t.insightsClient, r = t.onItemsChange, o = t.onSelect, i = t.onActive, c = n; n || ("undefined" != typeof window && (function (e) { var t = e.window, n = t.AlgoliaAnalyticsObject || "aa"; "string" == typeof n && (c = t[n]), c || ((t.AlgoliaAnalyticsObject = n), t[n] || (t[n] = function () { t[n].queue || (t[n].queue = []); for ( var e = arguments.length, r = new Array(e), o = 0; o < e; o++ ) r[o] = arguments[o]; t[n].queue.push(r); }), (t[n].version = "2.6.0"), (c = t[n]), (function (e) { var t = "[Autocomplete]: Could not load search-insights.js. Please load it manually following https://alg.li/insights-autocomplete"; try { var n = e.document.createElement("script"); (n.async = !0), (n.src = Nt), (n.onerror = function () { console.error(t); }), document.body.appendChild(n); } catch (e) { console.error(t); } })(t)); })({ window: window })); var a = Et(c), u = { current: [] }, l = rt(function (e) { var t = e.state; if (t.isOpen) { var n = t.collections .reduce(function (e, t) { return [].concat(Dt(e), Dt(t.items)); }, []) .filter(Pt); ut( u.current.map(function (e) { return e.objectID; }), n.map(function (e) { return e.objectID; }), ) || ((u.current = n), n.length > 0 && Tt({ onItemsChange: r, items: n, insights: a, state: t })); } }, 0); return { name: "aa.algoliaInsightsPlugin", subscribe: function (e) { var t = e.setContext, n = e.onSelect, r = e.onActive; c("addAlgoliaAgent", "insights-plugin"), t({ algoliaInsightsPlugin: { __algoliaSearchParameters: { clickAnalytics: !0 }, insights: a, }, }), n(function (e) { var t = e.item, n = e.state, r = e.event; Pt(t) && o({ state: n, event: r, insights: a, item: t, insightsEvents: [ At( { eventName: "Item Selected" }, ft({ item: t, items: u.current }), ), ], }); }), r(function (e) { var t = e.item, n = e.state, r = e.event; Pt(t) && i({ state: n, event: r, insights: a, item: t, insightsEvents: [ At( { eventName: "Item Active" }, ft({ item: t, items: u.current }), ), ], }); }); }, onStateChange: function (e) { var t = e.state; l({ state: t }); }, __autocomplete_pluginOptions: e, }; } function qt(e, t) { var n = t; return { then: function (t, r) { return qt(e.then(Mt(t, n, e), Mt(r, n, e)), n); }, catch: function (t) { return qt(e.catch(Mt(t, n, e)), n); }, finally: function (t) { return ( t && n.onCancelList.push(t), qt( e.finally( Mt( t && function () { return (n.onCancelList = []), t(); }, n, e, ), ), n, ) ); }, cancel: function () { n.isCanceled = !0; var e = n.onCancelList; (n.onCancelList = []), e.forEach(function (e) { e(); }); }, isCanceled: function () { return !0 === n.isCanceled; }, }; } function Lt(e) { return qt(e, { isCanceled: !1, onCancelList: [] }); } function Mt(e, t, n) { return e ? function (n) { return t.isCanceled ? n : e(n); } : n; } function Ht(e, t, n, r) { if (!n) return null; if (e < 0 && (null === t || (null !== r && 0 === t))) return n + e; var o = (null === t ? -1 : t) + e; return o <= -1 || o >= n ? (null === r ? null : 0) : o; } function Ut(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 Ft(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? Ut(Object(n), !0).forEach(function (t) { Bt(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Ut(Object(n)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); }); } return e; } function Bt(e, t, n) { return ( (t = (function (e) { var t = (function (e, t) { if ("object" !== Vt(e) || null === e) return e; var n = e[Symbol.toPrimitive]; if (void 0 !== n) { var r = n.call(e, t); if ("object" !== Vt(r)) return r; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(e); })(e, "string"); return "symbol" === Vt(t) ? t : String(t); })(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0, }) : (e[t] = n), e ); } function Vt(e) { return ( (Vt = "function" == typeof Symbol && "symbol" == n(Symbol.iterator) ? function (e) { return n(e); } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : n(e); }), Vt(e) ); } function Kt(e) { var t = (function (e) { var t = e.collections .map(function (e) { return e.items.length; }) .reduce(function (e, t, n) { var r = (e[n - 1] || 0) + t; return e.push(r), e; }, []) .reduce(function (t, n) { return n <= e.activeItemId ? t + 1 : t; }, 0); return e.collections[t]; })(e); if (!t) return null; var n = t.items[ (function (e) { for ( var t = e.state, n = e.collection, r = !1, o = 0, i = 0; !1 === r; ) { var c = t.collections[o]; if (c === n) { r = !0; break; } (i += c.items.length), o++; } return t.activeItemId - i; })({ state: e, collection: t }) ], r = t.source; return { item: n, itemInputValue: r.getItemInputValue({ item: n, state: e }), itemUrl: r.getItemUrl({ item: n, state: e }), source: r, }; } var Wt = /((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i; function zt(e) { return ( (zt = "function" == typeof Symbol && "symbol" == n(Symbol.iterator) ? function (e) { return n(e); } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : n(e); }), zt(e) ); } function Jt(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 $t(e, t, n) { return ( (t = (function (e) { var t = (function (e, t) { if ("object" !== zt(e) || null === e) return e; var n = e[Symbol.toPrimitive]; if (void 0 !== n) { var r = n.call(e, t); if ("object" !== zt(r)) return r; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(e); })(e, "string"); return "symbol" === zt(t) ? t : String(t); })(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0, }) : (e[t] = n), e ); } function Zt(e) { return ( (Zt = "function" == typeof Symbol && "symbol" == n(Symbol.iterator) ? function (e) { return n(e); } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : n(e); }), Zt(e) ); } function Qt(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 Yt(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? Qt(Object(n), !0).forEach(function (t) { Gt(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Qt(Object(n)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); }); } return e; } function Gt(e, t, n) { return ( (t = (function (e) { var t = (function (e, t) { if ("object" !== Zt(e) || null === e) return e; var n = e[Symbol.toPrimitive]; if (void 0 !== n) { var r = n.call(e, t); if ("object" !== Zt(r)) return r; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(e); })(e, "string"); return "symbol" === Zt(t) ? t : String(t); })(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0, }) : (e[t] = n), e ); } function Xt(e) { return ( (Xt = "function" == typeof Symbol && "symbol" == n(Symbol.iterator) ? function (e) { return n(e); } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : n(e); }), Xt(e) ); } function en(e, t) { (null == t || t > e.length) && (t = e.length); for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n]; return r; } function tn(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 nn(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? tn(Object(n), !0).forEach(function (t) { rn(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : tn(Object(n)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); }); } return e; } function rn(e, t, n) { return ( (t = (function (e) { var t = (function (e, t) { if ("object" !== Xt(e) || null === e) return e; var n = e[Symbol.toPrimitive]; if (void 0 !== n) { var r = n.call(e, t); if ("object" !== Xt(r)) return r; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(e); })(e, "string"); return "symbol" === Xt(t) ? t : String(t); })(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0, }) : (e[t] = n), e ); } function on(e, t) { var n, r = "undefined" != typeof window ? window : {}, o = e.plugins || []; return nn( nn( { debug: !1, openOnFocus: !1, placeholder: "", autoFocus: !1, defaultActiveItemId: null, stallThreshold: 300, insights: !1, environment: r, shouldPanelOpen: function (e) { return ct(e.state) > 0; }, reshape: function (e) { return e.sources; }, }, e, ), {}, { id: null !== (n = e.id) && void 0 !== n ? n : "autocomplete-".concat(it++), plugins: o, initialState: nn( { activeItemId: null, query: "", completion: null, collections: [], isOpen: !1, status: "idle", context: {}, }, e.initialState, ), onStateChange: function (t) { var n; null === (n = e.onStateChange) || void 0 === n || n.call(e, t), o.forEach(function (e) { var n; return null === (n = e.onStateChange) || void 0 === n ? void 0 : n.call(e, t); }); }, onSubmit: function (t) { var n; null === (n = e.onSubmit) || void 0 === n || n.call(e, t), o.forEach(function (e) { var n; return null === (n = e.onSubmit) || void 0 === n ? void 0 : n.call(e, t); }); }, onReset: function (t) { var n; null === (n = e.onReset) || void 0 === n || n.call(e, t), o.forEach(function (e) { var n; return null === (n = e.onReset) || void 0 === n ? void 0 : n.call(e, t); }); }, getSources: function (n) { return Promise.all( [] .concat( (function (e) { return ( (function (e) { if (Array.isArray(e)) return en(e); })(e) || (function (e) { if ( ("undefined" != typeof Symbol && null != e[Symbol.iterator]) || null != e["@@iterator"] ) return Array.from(e); })(e) || (function (e, t) { if (e) { if ("string" == typeof e) return en(e, t); var n = Object.prototype.toString.call(e).slice(8, -1); return ( "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? en(e, t) : void 0 ); } })(e) || (function () { throw new TypeError( "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.", ); })() ); })( o.map(function (e) { return e.getSources; }), ), [e.getSources], ) .filter(Boolean) .map(function (e) { return (function (e, t) { var n = []; return Promise.resolve(e(t)).then(function (e) { return Promise.all( e .filter(function (e) { return Boolean(e); }) .map(function (e) { if ((e.sourceId, n.includes(e.sourceId))) throw new Error( "[Autocomplete] The `sourceId` ".concat( JSON.stringify(e.sourceId), " is not unique.", ), ); n.push(e.sourceId); var t = { getItemInputValue: function (e) { return e.state.query; }, getItemUrl: function () {}, onSelect: function (e) { (0, e.setIsOpen)(!1); }, onActive: lt, onResolve: lt, }; Object.keys(t).forEach(function (e) { t[e].__default = !0; }); var r = Ft(Ft({}, t), e); return Promise.resolve(r); }), ); }); })(e, n); }), ) .then(function (e) { return ot(e); }) .then(function (e) { return e.map(function (e) { return nn( nn({}, e), {}, { onSelect: function (n) { e.onSelect(n), t.forEach(function (e) { var t; return null === (t = e.onSelect) || void 0 === t ? void 0 : t.call(e, n); }); }, onActive: function (n) { e.onActive(n), t.forEach(function (e) { var t; return null === (t = e.onActive) || void 0 === t ? void 0 : t.call(e, n); }); }, onResolve: function (n) { e.onResolve(n), t.forEach(function (e) { var t; return null === (t = e.onResolve) || void 0 === t ? void 0 : t.call(e, n); }); }, }, ); }); }); }, navigator: nn( { navigate: function (e) { var t = e.itemUrl; r.location.assign(t); }, navigateNewTab: function (e) { var t = e.itemUrl, n = r.open(t, "_blank", "noopener"); null == n || n.focus(); }, navigateNewWindow: function (e) { var t = e.itemUrl; r.open(t, "_blank", "noopener"); }, }, e.navigator, ), }, ); } function cn(e) { return ( (cn = "function" == typeof Symbol && "symbol" == n(Symbol.iterator) ? function (e) { return n(e); } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : n(e); }), cn(e) ); } function an(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 un(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? an(Object(n), !0).forEach(function (t) { ln(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : an(Object(n)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); }); } return e; } function ln(e, t, n) { return ( (t = (function (e) { var t = (function (e, t) { if ("object" !== cn(e) || null === e) return e; var n = e[Symbol.toPrimitive]; if (void 0 !== n) { var r = n.call(e, t); if ("object" !== cn(r)) return r; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(e); })(e, "string"); return "symbol" === cn(t) ? t : String(t); })(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0, }) : (e[t] = n), e ); } function sn(e) { return ( (sn = "function" == typeof Symbol && "symbol" == n(Symbol.iterator) ? function (e) { return n(e); } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : n(e); }), sn(e) ); } function fn(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 pn(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? fn(Object(n), !0).forEach(function (t) { mn(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : fn(Object(n)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); }); } return e; } function mn(e, t, n) { return ( (t = (function (e) { var t = (function (e, t) { if ("object" !== sn(e) || null === e) return e; var n = e[Symbol.toPrimitive]; if (void 0 !== n) { var r = n.call(e, t); if ("object" !== sn(r)) return r; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(e); })(e, "string"); return "symbol" === sn(t) ? t : String(t); })(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0, }) : (e[t] = n), e ); } function dn(e) { return ( (function (e) { if (Array.isArray(e)) return vn(e); })(e) || (function (e) { if ( ("undefined" != typeof Symbol && null != e[Symbol.iterator]) || null != e["@@iterator"] ) return Array.from(e); })(e) || (function (e, t) { if (e) { if ("string" == typeof e) return vn(e, t); var n = Object.prototype.toString.call(e).slice(8, -1); return ( "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? vn(e, t) : void 0 ); } })(e) || (function () { throw new TypeError( "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.", ); })() ); } function vn(e, t) { (null == t || t > e.length) && (t = e.length); for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n]; return r; } function hn(e) { return Boolean(e.execute); } function yn(e) { var t = e .reduce(function (e, t) { if (!hn(t)) return e.push(t), e; var n = t.searchClient, r = t.execute, o = t.requesterId, i = t.requests, c = e.find(function (e) { return ( hn(t) && hn(e) && e.searchClient === n && Boolean(o) && e.requesterId === o ); }); if (c) { var a; (a = c.items).push.apply(a, dn(i)); } else { var u = { execute: r, requesterId: o, items: i, searchClient: n }; e.push(u); } return e; }, []) .map(function (e) { if (!hn(e)) return Promise.resolve(e); var t = e, n = t.execute, r = t.items; return n({ searchClient: t.searchClient, requests: r }); }); return Promise.all(t).then(function (e) { return ot(e); }); } function _n(e) { return ( (_n = "function" == typeof Symbol && "symbol" == n(Symbol.iterator) ? function (e) { return n(e); } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : n(e); }), _n(e) ); } var bn = ["event", "nextState", "props", "query", "refresh", "store"]; function gn(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 Sn(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? gn(Object(n), !0).forEach(function (t) { On(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : gn(Object(n)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); }); } return e; } function On(e, t, n) { return ( (t = (function (e) { var t = (function (e, t) { if ("object" !== _n(e) || null === e) return e; var n = e[Symbol.toPrimitive]; if (void 0 !== n) { var r = n.call(e, t); if ("object" !== _n(r)) return r; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(e); })(e, "string"); return "symbol" === _n(t) ? t : String(t); })(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0, }) : (e[t] = n), e ); } var wn, En, jn, Pn = null, In = ((wn = -1), (En = -1), (jn = void 0), function (e) { var t = ++wn; return Promise.resolve(e).then(function (e) { return jn && t < En ? jn : ((En = t), (jn = e), e); }); }); function Dn(e) { var t = e.event, n = e.nextState, r = void 0 === n ? {} : n, o = e.props, i = e.query, c = e.refresh, a = e.store, u = (function (e, t) { if (null == e) return {}; var n, r, o = (function (e, t) { if (null == e) return {}; var n, r, o = {}, i = Object.keys(e); for (r = 0; r < i.length; r++) (n = i[r]), t.indexOf(n) >= 0 || (o[n] = e[n]); return o; })(e, t); if (Object.getOwnPropertySymbols) { var i = Object.getOwnPropertySymbols(e); for (r = 0; r < i.length; r++) (n = i[r]), t.indexOf(n) >= 0 || (Object.prototype.propertyIsEnumerable.call(e, n) && (o[n] = e[n])); } return o; })(e, bn); Pn && o.environment.clearTimeout(Pn); var l = u.setCollections, s = u.setIsOpen, f = u.setQuery, p = u.setActiveItemId, m = u.setStatus; if ((f(i), p(o.defaultActiveItemId), !i && !1 === o.openOnFocus)) { var d, v = a.getState().collections.map(function (e) { return Sn(Sn({}, e), {}, { items: [] }); }); m("idle"), l(v), s( null !== (d = r.isOpen) && void 0 !== d ? d : o.shouldPanelOpen({ state: a.getState() }), ); var h = Lt( In(v).then(function () { return Promise.resolve(); }), ); return a.pendingRequests.add(h); } m("loading"), (Pn = o.environment.setTimeout(function () { m("stalled"); }, o.stallThreshold)); var y = Lt( In( o .getSources(Sn({ query: i, refresh: c, state: a.getState() }, u)) .then(function (e) { return Promise.all( e.map(function (e) { return Promise.resolve( e.getItems( Sn({ query: i, refresh: c, state: a.getState() }, u), ), ).then(function (t) { return (function (e, t, n) { if (((o = e), Boolean(null == o ? void 0 : o.execute))) { var r = "algolia" === e.requesterId ? Object.assign.apply( Object, [{}].concat( dn( Object.keys(n.context).map(function (e) { var t; return null === (t = n.context[e]) || void 0 === t ? void 0 : t.__algoliaSearchParameters; }), ), ), ) : {}; return pn( pn({}, e), {}, { requests: e.queries.map(function (n) { return { query: "algolia" === e.requesterId ? pn( pn({}, n), {}, { params: pn(pn({}, r), n.params) }, ) : n, sourceId: t, transformResponse: e.transformResponse, }; }), }, ); } var o; return { items: e, sourceId: t }; })(t, e.sourceId, a.getState()); }); }), ) .then(yn) .then(function (t) { return (function (e, t, n) { return t.map(function (t) { var r, o = e.filter(function (e) { return e.sourceId === t.sourceId; }), i = o.map(function (e) { return e.items; }), c = o[0].transformResponse, a = c ? c({ results: (r = i), hits: r .map(function (e) { return e.hits; }) .filter(Boolean), facetHits: r .map(function (e) { var t; return null === (t = e.facetHits) || void 0 === t ? void 0 : t.map(function (e) { return { label: e.value, count: e.count, _highlightResult: { label: { value: e.highlighted }, }, }; }); }) .filter(Boolean), }) : i; return ( t.onResolve({ source: t, results: i, items: a, state: n.getState(), }), a.every(Boolean), 'The `getItems` function from source "' .concat( t.sourceId, '" must return an array of items but returned ', ) .concat( JSON.stringify(void 0), ".\n\nDid you forget to return items?\n\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems", ), { source: t, items: a } ); }); })(t, e, a); }) .then(function (e) { return (function (e) { var t = e.props, n = e.state, r = e.collections.reduce(function (e, t) { return un( un({}, e), {}, ln( {}, t.source.sourceId, un( un({}, t.source), {}, { getItems: function () { return ot(t.items); }, }, ), ), ); }, {}), o = t.plugins.reduce( function (e, t) { return t.reshape ? t.reshape(e) : e; }, { sourcesBySourceId: r, state: n }, ).sourcesBySourceId; return ot( t.reshape({ sourcesBySourceId: o, sources: Object.values(o), state: n, }), ) .filter(Boolean) .map(function (e) { return { source: e, items: e.getItems() }; }); })({ collections: e, props: o, state: a.getState() }); }); }), ), ) .then(function (e) { var n; m("idle"), l(e); var f = o.shouldPanelOpen({ state: a.getState() }); s( null !== (n = r.isOpen) && void 0 !== n ? n : (o.openOnFocus && !i && f) || f, ); var p = Kt(a.getState()); if (null !== a.getState().activeItemId && p) { var d = p.item, v = p.itemInputValue, h = p.itemUrl, y = p.source; y.onActive( Sn( { event: t, item: d, itemInputValue: v, itemUrl: h, refresh: c, source: y, state: a.getState(), }, u, ), ); } }) .finally(function () { m("idle"), Pn && o.environment.clearTimeout(Pn); }); return a.pendingRequests.add(y); } function kn(e) { return ( (kn = "function" == typeof Symbol && "symbol" == n(Symbol.iterator) ? function (e) { return n(e); } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : n(e); }), kn(e) ); } var Cn = ["event", "props", "refresh", "store"]; function An(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 xn(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? An(Object(n), !0).forEach(function (t) { Nn(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : An(Object(n)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); }); } return e; } function Nn(e, t, n) { return ( (t = (function (e) { var t = (function (e, t) { if ("object" !== kn(e) || null === e) return e; var n = e[Symbol.toPrimitive]; if (void 0 !== n) { var r = n.call(e, t); if ("object" !== kn(r)) return r; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(e); })(e, "string"); return "symbol" === kn(t) ? t : String(t); })(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0, }) : (e[t] = n), e ); } function Tn(e) { return ( (Tn = "function" == typeof Symbol && "symbol" == n(Symbol.iterator) ? function (e) { return n(e); } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : n(e); }), Tn(e) ); } var Rn = ["props", "refresh", "store"], qn = ["inputElement", "formElement", "panelElement"], Ln = ["inputElement"], Mn = ["inputElement", "maxLength"], Hn = ["sourceIndex"], Un = ["sourceIndex"], Fn = ["item", "source", "sourceIndex"]; function Bn(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 Vn(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? Bn(Object(n), !0).forEach(function (t) { Kn(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Bn(Object(n)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); }); } return e; } function Kn(e, t, n) { return ( (t = (function (e) { var t = (function (e, t) { if ("object" !== Tn(e) || null === e) return e; var n = e[Symbol.toPrimitive]; if (void 0 !== n) { var r = n.call(e, t); if ("object" !== Tn(r)) return r; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(e); })(e, "string"); return "symbol" === Tn(t) ? t : String(t); })(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0, }) : (e[t] = n), e ); } function Wn(e, t) { if (null == e) return {}; var n, r, o = (function (e, t) { if (null == e) return {}; var n, r, o = {}, i = Object.keys(e); for (r = 0; r < i.length; r++) (n = i[r]), t.indexOf(n) >= 0 || (o[n] = e[n]); return o; })(e, t); if (Object.getOwnPropertySymbols) { var i = Object.getOwnPropertySymbols(e); for (r = 0; r < i.length; r++) (n = i[r]), t.indexOf(n) >= 0 || (Object.prototype.propertyIsEnumerable.call(e, n) && (o[n] = e[n])); } return o; } function zn(e) { var t = e.props, n = e.refresh, r = e.store, o = Wn(e, Rn), i = function (e, t) { return void 0 !== t ? "".concat(e, "-").concat(t) : e; }; return { getEnvironmentProps: function (e) { var n = e.inputElement, o = e.formElement, i = e.panelElement; function c(e) { (!r.getState().isOpen && r.pendingRequests.isEmpty()) || e.target === n || (!1 === [o, i].some(function (t) { return (n = t) === (r = e.target) || n.contains(r); var n, r; }) && (r.dispatch("blur", null), t.debug || r.pendingRequests.cancelAll())); } return Vn( { onTouchStart: c, onMouseDown: c, onTouchMove: function (e) { !1 !== r.getState().isOpen && n === t.environment.document.activeElement && e.target !== n && n.blur(); }, }, Wn(e, qn), ); }, getRootProps: function (e) { return Vn( { role: "combobox", "aria-expanded": r.getState().isOpen, "aria-haspopup": "listbox", "aria-owns": r.getState().isOpen ? "".concat(t.id, "-list") : void 0, "aria-labelledby": "".concat(t.id, "-label"), }, e, ); }, getFormProps: function (e) { return ( e.inputElement, Vn( { action: "", noValidate: !0, role: "search", onSubmit: function (i) { var c; i.preventDefault(), t.onSubmit( Vn({ event: i, refresh: n, state: r.getState() }, o), ), r.dispatch("submit", null), null === (c = e.inputElement) || void 0 === c || c.blur(); }, onReset: function (i) { var c; i.preventDefault(), t.onReset( Vn({ event: i, refresh: n, state: r.getState() }, o), ), r.dispatch("reset", null), null === (c = e.inputElement) || void 0 === c || c.focus(); }, }, Wn(e, Ln), ) ); }, getLabelProps: function (e) { var n = e || {}, r = n.sourceIndex, o = Wn(n, Hn); return Vn( { htmlFor: "".concat(i(t.id, r), "-input"), id: "".concat(i(t.id, r), "-label"), }, o, ); }, getInputProps: function (e) { var i; function c(e) { (t.openOnFocus || Boolean(r.getState().query)) && Dn( Vn( { event: e, props: t, query: r.getState().completion || r.getState().query, refresh: n, store: r, }, o, ), ), r.dispatch("focus", null); } var a = e || {}, u = (a.inputElement, a.maxLength), l = void 0 === u ? 512 : u, s = Wn(a, Mn), f = Kt(r.getState()), p = (function (e) { return Boolean(e && e.match(Wt)); })( (null === (i = t.environment.navigator) || void 0 === i ? void 0 : i.userAgent) || "", ), m = null != f && f.itemUrl && !p ? "go" : "search"; return Vn( { "aria-autocomplete": "both", "aria-activedescendant": r.getState().isOpen && null !== r.getState().activeItemId ? "".concat(t.id, "-item-").concat(r.getState().activeItemId) : void 0, "aria-controls": r.getState().isOpen ? "".concat(t.id, "-list") : void 0, "aria-labelledby": "".concat(t.id, "-label"), value: r.getState().completion || r.getState().query, id: "".concat(t.id, "-input"), autoComplete: "off", autoCorrect: "off", autoCapitalize: "off", enterKeyHint: m, spellCheck: "false", autoFocus: t.autoFocus, placeholder: t.placeholder, maxLength: l, type: "search", onChange: function (e) { Dn( Vn( { event: e, props: t, query: e.currentTarget.value.slice(0, l), refresh: n, store: r, }, o, ), ); }, onKeyDown: function (e) { !(function (e) { var t = e.event, n = e.props, r = e.refresh, o = e.store, i = (function (e, t) { if (null == e) return {}; var n, r, o = (function (e, t) { if (null == e) return {}; var n, r, o = {}, i = Object.keys(e); for (r = 0; r < i.length; r++) (n = i[r]), t.indexOf(n) >= 0 || (o[n] = e[n]); return o; })(e, t); if (Object.getOwnPropertySymbols) { var i = Object.getOwnPropertySymbols(e); for (r = 0; r < i.length; r++) (n = i[r]), t.indexOf(n) >= 0 || (Object.prototype.propertyIsEnumerable.call(e, n) && (o[n] = e[n])); } return o; })(e, Cn); if ("ArrowUp" === t.key || "ArrowDown" === t.key) { var c = function () { var e = n.environment.document.getElementById( "" .concat(n.id, "-item-") .concat(o.getState().activeItemId), ); e && (e.scrollIntoViewIfNeeded ? e.scrollIntoViewIfNeeded(!1) : e.scrollIntoView(!1)); }, a = function () { var e = Kt(o.getState()); if (null !== o.getState().activeItemId && e) { var n = e.item, c = e.itemInputValue, a = e.itemUrl, u = e.source; u.onActive( xn( { event: t, item: n, itemInputValue: c, itemUrl: a, refresh: r, source: u, state: o.getState(), }, i, ), ); } }; t.preventDefault(), !1 === o.getState().isOpen && (n.openOnFocus || Boolean(o.getState().query)) ? Dn( xn( { event: t, props: n, query: o.getState().query, refresh: r, store: o, }, i, ), ).then(function () { o.dispatch(t.key, { nextActiveItemId: n.defaultActiveItemId, }), a(), setTimeout(c, 0); }) : (o.dispatch(t.key, {}), a(), c()); } else if ("Escape" === t.key) t.preventDefault(), o.dispatch(t.key, null), o.pendingRequests.cancelAll(); else if ("Tab" === t.key) o.dispatch("blur", null), o.pendingRequests.cancelAll(); else if ("Enter" === t.key) { if ( null === o.getState().activeItemId || o.getState().collections.every(function (e) { return 0 === e.items.length; }) ) return void (n.debug || o.pendingRequests.cancelAll()); t.preventDefault(); var u = Kt(o.getState()), l = u.item, s = u.itemInputValue, f = u.itemUrl, p = u.source; if (t.metaKey || t.ctrlKey) void 0 !== f && (p.onSelect( xn( { event: t, item: l, itemInputValue: s, itemUrl: f, refresh: r, source: p, state: o.getState(), }, i, ), ), n.navigator.navigateNewTab({ itemUrl: f, item: l, state: o.getState(), })); else if (t.shiftKey) void 0 !== f && (p.onSelect( xn( { event: t, item: l, itemInputValue: s, itemUrl: f, refresh: r, source: p, state: o.getState(), }, i, ), ), n.navigator.navigateNewWindow({ itemUrl: f, item: l, state: o.getState(), })); else if (t.altKey); else { if (void 0 !== f) return ( p.onSelect( xn( { event: t, item: l, itemInputValue: s, itemUrl: f, refresh: r, source: p, state: o.getState(), }, i, ), ), void n.navigator.navigate({ itemUrl: f, item: l, state: o.getState(), }) ); Dn( xn( { event: t, nextState: { isOpen: !1 }, props: n, query: s, refresh: r, store: o, }, i, ), ).then(function () { p.onSelect( xn( { event: t, item: l, itemInputValue: s, itemUrl: f, refresh: r, source: p, state: o.getState(), }, i, ), ); }); } } })(Vn({ event: e, props: t, refresh: n, store: r }, o)); }, onFocus: c, onBlur: lt, onClick: function (n) { e.inputElement !== t.environment.document.activeElement || r.getState().isOpen || c(n); }, }, s, ); }, getPanelProps: function (e) { return Vn( { onMouseDown: function (e) { e.preventDefault(); }, onMouseLeave: function () { r.dispatch("mouseleave", null); }, }, e, ); }, getListProps: function (e) { var n = e || {}, r = n.sourceIndex, o = Wn(n, Un); return Vn( { role: "listbox", "aria-labelledby": "".concat(i(t.id, r), "-label"), id: "".concat(i(t.id, r), "-list"), }, o, ); }, getItemProps: function (e) { var c = e.item, a = e.source, u = e.sourceIndex, l = Wn(e, Fn); return Vn( { id: "".concat(i(t.id, u), "-item-").concat(c.__autocomplete_id), role: "option", "aria-selected": r.getState().activeItemId === c.__autocomplete_id, onMouseMove: function (e) { if (c.__autocomplete_id !== r.getState().activeItemId) { r.dispatch("mousemove", c.__autocomplete_id); var t = Kt(r.getState()); if (null !== r.getState().activeItemId && t) { var i = t.item, a = t.itemInputValue, u = t.itemUrl, l = t.source; l.onActive( Vn( { event: e, item: i, itemInputValue: a, itemUrl: u, refresh: n, source: l, state: r.getState(), }, o, ), ); } } }, onMouseDown: function (e) { e.preventDefault(); }, onClick: function (e) { var i = a.getItemInputValue({ item: c, state: r.getState() }), u = a.getItemUrl({ item: c, state: r.getState() }); (u ? Promise.resolve() : Dn( Vn( { event: e, nextState: { isOpen: !1 }, props: t, query: i, refresh: n, store: r, }, o, ), ) ).then(function () { a.onSelect( Vn( { event: e, item: c, itemInputValue: i, itemUrl: u, refresh: n, source: a, state: r.getState(), }, o, ), ); }); }, }, l, ); }, }; } function Jn(e) { return ( (Jn = "function" == typeof Symbol && "symbol" == n(Symbol.iterator) ? function (e) { return n(e); } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : n(e); }), Jn(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 Zn(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? $n(Object(n), !0).forEach(function (t) { Qn(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : $n(Object(n)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); }); } return e; } function Qn(e, t, n) { return ( (t = (function (e) { var t = (function (e, t) { if ("object" !== Jn(e) || null === e) return e; var n = e[Symbol.toPrimitive]; if (void 0 !== n) { var r = n.call(e, t); if ("object" !== Jn(r)) return r; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(e); })(e, "string"); return "symbol" === Jn(t) ? t : String(t); })(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0, }) : (e[t] = n), e ); } function Yn(e) { var t, n, r, o, i = e.plugins, c = e.options, a = null === (t = ((null === (n = c.__autocomplete_metadata) || void 0 === n ? void 0 : n.userAgents) || [])[0]) || void 0 === t ? void 0 : t.segment, u = a ? Qn( {}, a, Object.keys( (null === (r = c.__autocomplete_metadata) || void 0 === r ? void 0 : r.options) || {}, ), ) : {}; return { plugins: i.map(function (e) { return { name: e.name, options: Object.keys(e.__autocomplete_pluginOptions || []), }; }), options: Zn({ "autocomplete-core": Object.keys(c) }, u), ua: st.concat( (null === (o = c.__autocomplete_metadata) || void 0 === o ? void 0 : o.userAgents) || [], ), }; } function Gn(e) { var t, n = e.state; return !1 === n.isOpen || null === n.activeItemId ? null : (null === (t = Kt(n)) || void 0 === t ? void 0 : t.itemInputValue) || null; } function Xn(e) { return ( (Xn = "function" == typeof Symbol && "symbol" == n(Symbol.iterator) ? function (e) { return n(e); } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : n(e); }), Xn(e) ); } function er(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 tr(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? er(Object(n), !0).forEach(function (t) { nr(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : er(Object(n)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); }); } return e; } function nr(e, t, n) { return ( (t = (function (e) { var t = (function (e, t) { if ("object" !== Xn(e) || null === e) return e; var n = e[Symbol.toPrimitive]; if (void 0 !== n) { var r = n.call(e, t); if ("object" !== Xn(r)) return r; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(e); })(e, "string"); return "symbol" === Xn(t) ? t : String(t); })(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0, }) : (e[t] = n), e ); } var rr = function (e, t) { switch (t.type) { case "setActiveItemId": case "mousemove": return tr(tr({}, e), {}, { activeItemId: t.payload }); case "setQuery": return tr(tr({}, e), {}, { query: t.payload, completion: null }); case "setCollections": return tr(tr({}, e), {}, { collections: t.payload }); case "setIsOpen": return tr(tr({}, e), {}, { isOpen: t.payload }); case "setStatus": return tr(tr({}, e), {}, { status: t.payload }); case "setContext": return tr(tr({}, e), {}, { context: tr(tr({}, e.context), t.payload) }); case "ArrowDown": var n = tr( tr({}, e), {}, { activeItemId: t.payload.hasOwnProperty("nextActiveItemId") ? t.payload.nextActiveItemId : Ht(1, e.activeItemId, ct(e), t.props.defaultActiveItemId), }, ); return tr(tr({}, n), {}, { completion: Gn({ state: n }) }); case "ArrowUp": var r = tr( tr({}, e), {}, { activeItemId: Ht( -1, e.activeItemId, ct(e), t.props.defaultActiveItemId, ), }, ); return tr(tr({}, r), {}, { completion: Gn({ state: r }) }); case "Escape": return e.isOpen ? tr( tr({}, e), {}, { activeItemId: null, isOpen: !1, completion: null }, ) : tr( tr({}, e), {}, { activeItemId: null, query: "", status: "idle", collections: [], }, ); case "submit": return tr( tr({}, e), {}, { activeItemId: null, isOpen: !1, status: "idle" }, ); case "reset": return tr( tr({}, e), {}, { activeItemId: !0 === t.props.openOnFocus ? t.props.defaultActiveItemId : null, status: "idle", query: "", }, ); case "focus": return tr( tr({}, e), {}, { activeItemId: t.props.defaultActiveItemId, isOpen: (t.props.openOnFocus || Boolean(e.query)) && t.props.shouldPanelOpen({ state: e }), }, ); case "blur": return t.props.debug ? e : tr(tr({}, e), {}, { isOpen: !1, activeItemId: null }); case "mouseleave": return tr(tr({}, e), {}, { activeItemId: t.props.defaultActiveItemId }); default: return ( "The reducer action ".concat( JSON.stringify(t.type), " is not supported.", ), e ); } }; function or(e) { return ( (or = "function" == typeof Symbol && "symbol" == n(Symbol.iterator) ? function (e) { return n(e); } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : n(e); }), or(e) ); } function ir(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 cr(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? ir(Object(n), !0).forEach(function (t) { ar(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ir(Object(n)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); }); } return e; } function ar(e, t, n) { return ( (t = (function (e) { var t = (function (e, t) { if ("object" !== or(e) || null === e) return e; var n = e[Symbol.toPrimitive]; if (void 0 !== n) { var r = n.call(e, t); if ("object" !== or(r)) return r; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(e); })(e, "string"); return "symbol" === or(t) ? t : String(t); })(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0, }) : (e[t] = n), e ); } function ur(e) { var t = [], n = on(e, t), r = (function (e, t, n) { var r, o = t.initialState; return { getState: function () { return o; }, dispatch: function (r, i) { var c = (function (e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? Jt(Object(n), !0).forEach(function (t) { $t(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties( e, Object.getOwnPropertyDescriptors(n), ) : Jt(Object(n)).forEach(function (t) { Object.defineProperty( e, t, Object.getOwnPropertyDescriptor(n, t), ); }); } return e; })({}, o); (o = e(o, { type: r, props: t, payload: i })), n({ state: o, prevState: c }); }, pendingRequests: ((r = []), { add: function (e) { return ( r.push(e), e.finally(function () { r = r.filter(function (t) { return t !== e; }); }) ); }, cancelAll: function () { r.forEach(function (e) { return e.cancel(); }); }, isEmpty: function () { return 0 === r.length; }, }), }; })(rr, n, function (e) { var t = e.prevState, r = e.state; n.onStateChange( cr({ prevState: t, state: r, refresh: c, navigator: n.navigator }, o), ); }), o = (function (e) { var t = e.store; return { setActiveItemId: function (e) { t.dispatch("setActiveItemId", e); }, setQuery: function (e) { t.dispatch("setQuery", e); }, setCollections: function (e) { var n = 0, r = e.map(function (e) { return Yt( Yt({}, e), {}, { items: ot(e.items).map(function (e) { return Yt(Yt({}, e), {}, { __autocomplete_id: n++ }); }), }, ); }); t.dispatch("setCollections", r); }, setIsOpen: function (e) { t.dispatch("setIsOpen", e); }, setStatus: function (e) { t.dispatch("setStatus", e); }, setContext: function (e) { t.dispatch("setContext", e); }, }; })({ store: r }), i = zn(cr({ props: n, refresh: c, store: r, navigator: n.navigator }, o)); function c() { return Dn( cr( { event: new Event("input"), nextState: { isOpen: r.getState().isOpen }, props: n, navigator: n.navigator, query: r.getState().query, refresh: c, store: r, }, o, ), ); } if ( e.insights && !n.plugins.some(function (e) { return "aa.algoliaInsightsPlugin" === e.name; }) ) { var a = "boolean" == typeof e.insights ? {} : e.insights; n.plugins.push(Rt(a)); } return ( n.plugins.forEach(function (e) { var r; return null === (r = e.subscribe) || void 0 === r ? void 0 : r.call( e, cr( cr({}, o), {}, { navigator: n.navigator, refresh: c, onSelect: function (e) { t.push({ onSelect: e }); }, onActive: function (e) { t.push({ onActive: e }); }, onResolve: function (e) { t.push({ onResolve: e }); }, }, ), ); }), (function (e) { var t, n, r = e.metadata, o = e.environment; if ( null === (t = o.navigator) || void 0 === t || null === (n = t.userAgent) || void 0 === n ? void 0 : n.includes("Algolia Crawler") ) { var i = o.document.createElement("meta"), c = o.document.querySelector("head"); (i.name = "algolia:metadata"), setTimeout(function () { (i.content = JSON.stringify(r)), c.appendChild(i); }, 0); } })({ metadata: Yn({ plugins: n.plugins, options: e }), environment: n.environment, }), cr(cr({ refresh: c, navigator: n.navigator }, i), o) ); } function lr(e) { var t = e.translations, n = (void 0 === t ? {} : t).searchByText, r = void 0 === n ? "Search by" : n; return Be.createElement( "a", { href: "https://www.algolia.com/ref/docsearch/?utm_source=".concat( window.location.hostname, "&utm_medium=referral&utm_content=powered_by&utm_campaign=docsearch", ), target: "_blank", rel: "noopener noreferrer", }, Be.createElement("span", { className: "DocSearch-Label" }, r), Be.createElement( "svg", { width: "77", height: "19", "aria-label": "Algolia", role: "img", id: "Layer_1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 2196.2 500", }, Be.createElement( "defs", null, Be.createElement( "style", null, ".cls-1,.cls-2{fill:#003dff;}.cls-2{fill-rule:evenodd;}", ), ), Be.createElement("path", { className: "cls-2", d: "M1070.38,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z", }), Be.createElement("rect", { className: "cls-1", x: "1845.88", y: "104.73", width: "62.58", height: "277.9", rx: "5.9", ry: "5.9", }), Be.createElement("path", { className: "cls-2", d: "M1851.78,71.38h50.77c3.26,0,5.9-2.64,5.9-5.9V5.9c0-3.62-3.24-6.39-6.82-5.83l-50.77,7.95c-2.87,.45-4.99,2.92-4.99,5.83v51.62c0,3.26,2.64,5.9,5.9,5.9Z", }), Be.createElement("path", { className: "cls-2", d: "M1764.03,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z", }), Be.createElement("path", { className: "cls-2", d: "M1631.95,142.72c-11.14-12.25-24.83-21.65-40.78-28.31-15.92-6.53-33.26-9.85-52.07-9.85-18.78,0-36.15,3.17-51.92,9.85-15.59,6.66-29.29,16.05-40.76,28.31-11.47,12.23-20.38,26.87-26.76,44.03-6.38,17.17-9.24,37.37-9.24,58.36,0,20.99,3.19,36.87,9.55,54.21,6.38,17.32,15.14,32.11,26.45,44.36,11.29,12.23,24.83,21.62,40.6,28.46,15.77,6.83,40.12,10.33,52.4,10.48,12.25,0,36.78-3.82,52.7-10.48,15.92-6.68,29.46-16.23,40.78-28.46,11.29-12.25,20.05-27.04,26.25-44.36,6.22-17.34,9.24-33.22,9.24-54.21,0-20.99-3.34-41.19-10.03-58.36-6.38-17.17-15.14-31.8-26.43-44.03Zm-44.43,163.75c-11.47,15.75-27.56,23.7-48.09,23.7-20.55,0-36.63-7.8-48.1-23.7-11.47-15.75-17.21-34.01-17.21-61.2,0-26.89,5.59-49.14,17.06-64.87,11.45-15.75,27.54-23.52,48.07-23.52,20.55,0,36.63,7.78,48.09,23.52,11.47,15.57,17.36,37.98,17.36,64.87,0,27.19-5.72,45.3-17.19,61.2Z", }), Be.createElement("path", { className: "cls-2", d: "M894.42,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z", }), Be.createElement("path", { className: "cls-2", d: "M2133.97,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z", }), Be.createElement("path", { className: "cls-2", d: "M1314.05,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-11.79,18.34-19.6,39.64-22.11,62.59-.58,5.3-.88,10.68-.88,16.14s.31,11.15,.93,16.59c4.28,38.09,23.14,71.61,50.66,94.52,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47h0c17.99,0,34.61-5.93,48.16-15.97,16.29-11.58,28.88-28.54,34.48-47.75v50.26h-.11v11.08c0,21.84-5.71,38.27-17.34,49.36-11.61,11.08-31.04,16.63-58.25,16.63-11.12,0-28.79-.59-46.6-2.41-2.83-.29-5.46,1.5-6.27,4.22l-12.78,43.11c-1.02,3.46,1.27,7.02,4.83,7.53,21.52,3.08,42.52,4.68,54.65,4.68,48.91,0,85.16-10.75,108.89-32.21,21.48-19.41,33.15-48.89,35.2-88.52V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,64.1s.65,139.13,0,143.36c-12.08,9.77-27.11,13.59-43.49,14.7-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-1.32,0-2.63-.03-3.94-.1-40.41-2.11-74.52-37.26-74.52-79.38,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33Z", }), Be.createElement("path", { className: "cls-1", d: "M249.83,0C113.3,0,2,110.09,.03,246.16c-2,138.19,110.12,252.7,248.33,253.5,42.68,.25,83.79-10.19,120.3-30.03,3.56-1.93,4.11-6.83,1.08-9.51l-23.38-20.72c-4.75-4.21-11.51-5.4-17.36-2.92-25.48,10.84-53.17,16.38-81.71,16.03-111.68-1.37-201.91-94.29-200.13-205.96,1.76-110.26,92-199.41,202.67-199.41h202.69V407.41l-115-102.18c-3.72-3.31-9.42-2.66-12.42,1.31-18.46,24.44-48.53,39.64-81.93,37.34-46.33-3.2-83.87-40.5-87.34-86.81-4.15-55.24,39.63-101.52,94-101.52,49.18,0,89.68,37.85,93.91,85.95,.38,4.28,2.31,8.27,5.52,11.12l29.95,26.55c3.4,3.01,8.79,1.17,9.63-3.3,2.16-11.55,2.92-23.58,2.07-35.92-4.82-70.34-61.8-126.93-132.17-131.26-80.68-4.97-148.13,58.14-150.27,137.25-2.09,77.1,61.08,143.56,138.19,145.26,32.19,.71,62.03-9.41,86.14-26.95l150.26,133.2c6.44,5.71,16.61,1.14,16.61-7.47V9.48C499.66,4.25,495.42,0,490.18,0H249.83Z", }), ), ); } function sr(e) { return Be.createElement( "svg", { width: "15", height: "15", "aria-label": e.ariaLabel, role: "img" }, Be.createElement( "g", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.2", }, e.children, ), ); } function fr(e) { var t = e.translations, n = void 0 === t ? {} : t, r = n.selectText, o = void 0 === r ? "to select" : r, i = n.selectKeyAriaLabel, c = void 0 === i ? "Enter key" : i, a = n.navigateText, u = void 0 === a ? "to navigate" : a, l = n.navigateUpKeyAriaLabel, s = void 0 === l ? "Arrow up" : l, f = n.navigateDownKeyAriaLabel, p = void 0 === f ? "Arrow down" : f, m = n.closeText, d = void 0 === m ? "to close" : m, v = n.closeKeyAriaLabel, h = void 0 === v ? "Escape key" : v, y = n.searchByText, _ = void 0 === y ? "Search by" : y; return Be.createElement( Be.Fragment, null, Be.createElement( "div", { className: "DocSearch-Logo" }, Be.createElement(lr, { translations: { searchByText: _ } }), ), Be.createElement( "ul", { className: "DocSearch-Commands" }, Be.createElement( "li", null, Be.createElement( "kbd", { className: "DocSearch-Commands-Key" }, Be.createElement( sr, { ariaLabel: c }, Be.createElement("path", { d: "M12 3.53088v3c0 1-1 2-2 2H4M7 11.53088l-3-3 3-3", }), ), ), Be.createElement("span", { className: "DocSearch-Label" }, o), ), Be.createElement( "li", null, Be.createElement( "kbd", { className: "DocSearch-Commands-Key" }, Be.createElement( sr, { ariaLabel: p }, Be.createElement("path", { d: "M7.5 3.5v8M10.5 8.5l-3 3-3-3" }), ), ), Be.createElement( "kbd", { className: "DocSearch-Commands-Key" }, Be.createElement( sr, { ariaLabel: s }, Be.createElement("path", { d: "M7.5 11.5v-8M10.5 6.5l-3-3-3 3" }), ), ), Be.createElement("span", { className: "DocSearch-Label" }, u), ), Be.createElement( "li", null, Be.createElement( "kbd", { className: "DocSearch-Commands-Key" }, Be.createElement( sr, { ariaLabel: h }, Be.createElement("path", { d: "M13.6167 8.936c-.1065.3583-.6883.962-1.4875.962-.7993 0-1.653-.9165-1.653-2.1258v-.5678c0-1.2548.7896-2.1016 1.653-2.1016.8634 0 1.3601.4778 1.4875 1.0724M9 6c-.1352-.4735-.7506-.9219-1.46-.8972-.7092.0246-1.344.57-1.344 1.2166s.4198.8812 1.3445.9805C8.465 7.3992 8.968 7.9337 9 8.5c.032.5663-.454 1.398-1.4595 1.398C6.6593 9.898 6 9 5.963 8.4851m-1.4748.5368c-.2635.5941-.8099.876-1.5443.876s-1.7073-.6248-1.7073-2.204v-.4603c0-1.0416.721-2.131 1.7073-2.131.9864 0 1.6425 1.031 1.5443 2.2492h-2.956", }), ), ), Be.createElement("span", { className: "DocSearch-Label" }, d), ), ), ); } function pr(e) { var t = e.hit, n = e.children; return Be.createElement("a", { href: t.url }, n); } function mr() { return Be.createElement( "svg", { viewBox: "0 0 38 38", stroke: "currentColor", strokeOpacity: ".5" }, Be.createElement( "g", { fill: "none", fillRule: "evenodd" }, Be.createElement( "g", { transform: "translate(1 1)", strokeWidth: "2" }, Be.createElement("circle", { strokeOpacity: ".3", cx: "18", cy: "18", r: "18", }), Be.createElement( "path", { d: "M36 18c0-9.94-8.06-18-18-18" }, Be.createElement("animateTransform", { attributeName: "transform", type: "rotate", from: "0 18 18", to: "360 18 18", dur: "1s", repeatCount: "indefinite", }), ), ), ), ); } function dr() { return Be.createElement( "svg", { width: "20", height: "20", viewBox: "0 0 20 20" }, Be.createElement( "g", { stroke: "currentColor", fill: "none", fillRule: "evenodd", strokeLinecap: "round", strokeLinejoin: "round", }, Be.createElement("path", { d: "M3.18 6.6a8.23 8.23 0 1112.93 9.94h0a8.23 8.23 0 01-11.63 0", }), Be.createElement("path", { d: "M6.44 7.25H2.55V3.36M10.45 6v5.6M10.45 11.6L13 13", }), ), ); } function vr() { return Be.createElement( "svg", { width: "20", height: "20", viewBox: "0 0 20 20" }, Be.createElement("path", { d: "M10 10l5.09-5.09L10 10l5.09 5.09L10 10zm0 0L4.91 4.91 10 10l-5.09 5.09L10 10z", stroke: "currentColor", fill: "none", fillRule: "evenodd", strokeLinecap: "round", strokeLinejoin: "round", }), ); } function hr() { return Be.createElement( "svg", { className: "DocSearch-Hit-Select-Icon", width: "20", height: "20", viewBox: "0 0 20 20", }, Be.createElement( "g", { stroke: "currentColor", fill: "none", fillRule: "evenodd", strokeLinecap: "round", strokeLinejoin: "round", }, Be.createElement("path", { d: "M18 3v4c0 2-2 4-4 4H2" }), Be.createElement("path", { d: "M8 17l-6-6 6-6" }), ), ); } var yr = function () { return Be.createElement( "svg", { width: "20", height: "20", viewBox: "0 0 20 20" }, Be.createElement("path", { d: "M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4", stroke: "currentColor", fill: "none", fillRule: "evenodd", strokeLinejoin: "round", }), ); }; function _r(e) { switch (e.type) { case "lvl1": return Be.createElement(yr, null); case "content": return Be.createElement(gr, null); default: return Be.createElement(br, null); } } function br() { return Be.createElement( "svg", { width: "20", height: "20", viewBox: "0 0 20 20" }, Be.createElement("path", { d: "M13 13h4-4V8H7v5h6v4-4H7V8H3h4V3v5h6V3v5h4-4v5zm-6 0v4-4H3h4z", stroke: "currentColor", fill: "none", fillRule: "evenodd", strokeLinecap: "round", strokeLinejoin: "round", }), ); } function gr() { return Be.createElement( "svg", { width: "20", height: "20", viewBox: "0 0 20 20" }, Be.createElement("path", { d: "M17 5H3h14zm0 5H3h14zm0 5H3h14z", stroke: "currentColor", fill: "none", fillRule: "evenodd", strokeLinejoin: "round", }), ); } function Sr() { return Be.createElement( "svg", { width: "20", height: "20", viewBox: "0 0 20 20" }, Be.createElement("path", { d: "M10 14.2L5 17l1-5.6-4-4 5.5-.7 2.5-5 2.5 5 5.6.8-4 4 .9 5.5z", stroke: "currentColor", fill: "none", fillRule: "evenodd", strokeLinejoin: "round", }), ); } function Or() { return Be.createElement( "svg", { width: "40", height: "40", viewBox: "0 0 20 20", fill: "none", fillRule: "evenodd", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", }, Be.createElement("path", { d: "M19 4.8a16 16 0 00-2-1.2m-3.3-1.2A16 16 0 001.1 4.7M16.7 8a12 12 0 00-2.8-1.4M10 6a12 12 0 00-6.7 2M12.3 14.7a4 4 0 00-4.5 0M14.5 11.4A8 8 0 0010 10M3 16L18 2M10 18h0", }), ); } function wr() { return Be.createElement( "svg", { width: "40", height: "40", viewBox: "0 0 20 20", fill: "none", fillRule: "evenodd", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", }, Be.createElement("path", { d: "M15.5 4.8c2 3 1.7 7-1 9.7h0l4.3 4.3-4.3-4.3a7.8 7.8 0 01-9.8 1m-2.2-2.2A7.8 7.8 0 0113.2 2.4M2 18L18 2", }), ); } function Er(e) { var t = e.translations, n = void 0 === t ? {} : t, r = n.titleText, o = void 0 === r ? "Unable to fetch results" : r, i = n.helpText, c = void 0 === i ? "You might want to check your network connection." : i; return Be.createElement( "div", { className: "DocSearch-ErrorScreen" }, Be.createElement( "div", { className: "DocSearch-Screen-Icon" }, Be.createElement(Or, null), ), Be.createElement("p", { className: "DocSearch-Title" }, o), Be.createElement("p", { className: "DocSearch-Help" }, c), ); } var jr = ["translations"]; function Pr(e) { var t = e.translations, n = void 0 === t ? {} : t, r = $e(e, jr), o = n.noResultsText, i = void 0 === o ? "No results for" : o, c = n.suggestedQueryText, a = void 0 === c ? "Try searching for" : c, u = n.reportMissingResultsText, l = void 0 === u ? "Believe this query should return results?" : u, s = n.reportMissingResultsLinkText, f = void 0 === s ? "Let us know." : s, p = r.state.context.searchSuggestions; return Be.createElement( "div", { className: "DocSearch-NoResults" }, Be.createElement( "div", { className: "DocSearch-Screen-Icon" }, Be.createElement(wr, null), ), Be.createElement( "p", { className: "DocSearch-Title" }, i, ' "', Be.createElement("strong", null, r.state.query), '"', ), p && p.length > 0 && Be.createElement( "div", { className: "DocSearch-NoResults-Prefill-List" }, Be.createElement("p", { className: "DocSearch-Help" }, a, ":"), Be.createElement( "ul", null, p.slice(0, 3).reduce(function (e, t) { return [].concat( (function (e) { return ( (function (e) { if (Array.isArray(e)) return Ye(e); })(e) || (function (e) { if ( ("undefined" != typeof Symbol && null != e[Symbol.iterator]) || null != e["@@iterator"] ) return Array.from(e); })(e) || Qe(e) || (function () { throw new TypeError( "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.", ); })() ); })(e), [ Be.createElement( "li", { key: t }, Be.createElement( "button", { className: "DocSearch-Prefill", key: t, type: "button", onClick: function () { r.setQuery(t.toLowerCase() + " "), r.refresh(), r.inputRef.current.focus(); }, }, t, ), ), ], ); }, []), ), ), r.getMissingResultsUrl && Be.createElement( "p", { className: "DocSearch-Help" }, "".concat(l, " "), Be.createElement( "a", { href: r.getMissingResultsUrl({ query: r.state.query }), target: "_blank", rel: "noopener noreferrer", }, f, ), ), ); } var Ir = ["hit", "attribute", "tagName"]; function Dr(e, t) { return t.split(".").reduce(function (e, t) { return null != e && e[t] ? e[t] : null; }, e); } function kr(e) { var t = e.hit, n = e.attribute, r = e.tagName; return g( void 0 === r ? "span" : r, We( We({}, $e(e, Ir)), {}, { dangerouslySetInnerHTML: { __html: Dr(t, "_snippetResult.".concat(n, ".value")) || Dr(t, n), }, }, ), ); } function Cr(e) { return e.collection && 0 !== e.collection.items.length ? Be.createElement( "section", { className: "DocSearch-Hits" }, Be.createElement( "div", { className: "DocSearch-Hit-source" }, e.title, ), Be.createElement( "ul", e.getListProps(), e.collection.items.map(function (t, n) { return Be.createElement( Ar, Je( { key: [e.title, t.objectID].join(":"), item: t, index: n }, e, ), ); }), ), ) : null; } function Ar(e) { var t = e.item, n = e.index, r = e.renderIcon, o = e.renderAction, i = e.getItemProps, c = e.onItemClick, a = e.collection, u = e.hitComponent, l = Ze(Be.useState(!1), 2), s = l[0], f = l[1], p = Ze(Be.useState(!1), 2), m = p[0], d = p[1], v = Be.useRef(null), h = u; return Be.createElement( "li", Je( { className: [ "DocSearch-Hit", t.__docsearch_parent && "DocSearch-Hit--Child", s && "DocSearch-Hit--deleting", m && "DocSearch-Hit--favoriting", ] .filter(Boolean) .join(" "), onTransitionEnd: function () { v.current && v.current(); }, }, i({ item: t, source: a.source, onClick: function (e) { c(t, e); }, }), ), Be.createElement( h, { hit: t }, Be.createElement( "div", { className: "DocSearch-Hit-Container" }, r({ item: t, index: n }), t.hierarchy[t.type] && "lvl1" === t.type && Be.createElement( "div", { className: "DocSearch-Hit-content-wrapper" }, Be.createElement(kr, { className: "DocSearch-Hit-title", hit: t, attribute: "hierarchy.lvl1", }), t.content && Be.createElement(kr, { className: "DocSearch-Hit-path", hit: t, attribute: "content", }), ), t.hierarchy[t.type] && ("lvl2" === t.type || "lvl3" === t.type || "lvl4" === t.type || "lvl5" === t.type || "lvl6" === t.type) && Be.createElement( "div", { className: "DocSearch-Hit-content-wrapper" }, Be.createElement(kr, { className: "DocSearch-Hit-title", hit: t, attribute: "hierarchy.".concat(t.type), }), Be.createElement(kr, { className: "DocSearch-Hit-path", hit: t, attribute: "hierarchy.lvl1", }), ), "content" === t.type && Be.createElement( "div", { className: "DocSearch-Hit-content-wrapper" }, Be.createElement(kr, { className: "DocSearch-Hit-title", hit: t, attribute: "content", }), Be.createElement(kr, { className: "DocSearch-Hit-path", hit: t, attribute: "hierarchy.lvl1", }), ), o({ item: t, runDeleteTransition: function (e) { f(!0), (v.current = e); }, runFavoriteTransition: function (e) { d(!0), (v.current = e); }, }), ), ), ); } function xr(e, t, n) { return e.reduce(function (e, r) { var o = t(r); return ( e.hasOwnProperty(o) || (e[o] = []), e[o].length < (n || 5) && e[o].push(r), e ); }, {}); } function Nr(e) { return e; } function Tr(e) { return 1 === e.button || e.altKey || e.ctrlKey || e.metaKey || e.shiftKey; } function Rr() {} var qr = /(|<\/mark>)/g, Lr = RegExp(qr.source); function Mr(e) { var t, n, r = e; if (!r.__docsearch_parent && !e._highlightResult) return e.hierarchy.lvl0; var o = ( (r.__docsearch_parent ? null === (t = r.__docsearch_parent) || void 0 === t || null === (t = t._highlightResult) || void 0 === t || null === (t = t.hierarchy) || void 0 === t ? void 0 : t.lvl0 : null === (n = e._highlightResult) || void 0 === n || null === (n = n.hierarchy) || void 0 === n ? void 0 : n.lvl0) || {} ).value; return o && Lr.test(o) ? o.replace(qr, "") : o; } function Hr(e) { return Be.createElement( "div", { className: "DocSearch-Dropdown-Container" }, e.state.collections.map(function (t) { if (0 === t.items.length) return null; var n = Mr(t.items[0]); return Be.createElement( Cr, Je({}, e, { key: t.source.sourceId, title: n, collection: t, renderIcon: function (e) { var n, r = e.item, o = e.index; return Be.createElement( Be.Fragment, null, r.__docsearch_parent && Be.createElement( "svg", { className: "DocSearch-Hit-Tree", viewBox: "0 0 24 54" }, Be.createElement( "g", { stroke: "currentColor", fill: "none", fillRule: "evenodd", strokeLinecap: "round", strokeLinejoin: "round", }, r.__docsearch_parent !== (null === (n = t.items[o + 1]) || void 0 === n ? void 0 : n.__docsearch_parent) ? Be.createElement("path", { d: "M8 6v21M20 27H8.3" }) : Be.createElement("path", { d: "M8 6v42M20 27H8.3" }), ), ), Be.createElement( "div", { className: "DocSearch-Hit-icon" }, Be.createElement(_r, { type: r.type }), ), ); }, renderAction: function () { return Be.createElement( "div", { className: "DocSearch-Hit-action" }, Be.createElement(hr, null), ); }, }), ); }), e.resultsFooterComponent && Be.createElement( "section", { className: "DocSearch-HitsFooter" }, Be.createElement(e.resultsFooterComponent, { state: e.state }), ), ); } var Ur = ["translations"]; function Fr(e) { var t = e.translations, n = void 0 === t ? {} : t, r = $e(e, Ur), o = n.recentSearchesTitle, i = void 0 === o ? "Recent" : o, c = n.noRecentSearchesText, a = void 0 === c ? "No recent searches" : c, u = n.saveRecentSearchButtonTitle, l = void 0 === u ? "Save this search" : u, s = n.removeRecentSearchButtonTitle, f = void 0 === s ? "Remove this search from history" : s, p = n.favoriteSearchesTitle, m = void 0 === p ? "Favorite" : p, d = n.removeFavoriteSearchButtonTitle, v = void 0 === d ? "Remove this search from favorites" : d; return "idle" === r.state.status && !1 === r.hasCollections ? r.disableUserPersonalization ? null : Be.createElement( "div", { className: "DocSearch-StartScreen" }, Be.createElement("p", { className: "DocSearch-Help" }, a), ) : !1 === r.hasCollections ? null : Be.createElement( "div", { className: "DocSearch-Dropdown-Container" }, Be.createElement( Cr, Je({}, r, { title: i, collection: r.state.collections[0], renderIcon: function () { return Be.createElement( "div", { className: "DocSearch-Hit-icon" }, Be.createElement(dr, null), ); }, renderAction: function (e) { var t = e.item, n = e.runFavoriteTransition, o = e.runDeleteTransition; return Be.createElement( Be.Fragment, null, Be.createElement( "div", { className: "DocSearch-Hit-action" }, Be.createElement( "button", { className: "DocSearch-Hit-action-button", title: l, type: "submit", onClick: function (e) { e.preventDefault(), e.stopPropagation(), n(function () { r.favoriteSearches.add(t), r.recentSearches.remove(t), r.refresh(); }); }, }, Be.createElement(Sr, null), ), ), Be.createElement( "div", { className: "DocSearch-Hit-action" }, Be.createElement( "button", { className: "DocSearch-Hit-action-button", title: f, type: "submit", onClick: function (e) { e.preventDefault(), e.stopPropagation(), o(function () { r.recentSearches.remove(t), r.refresh(); }); }, }, Be.createElement(vr, null), ), ), ); }, }), ), Be.createElement( Cr, Je({}, r, { title: m, collection: r.state.collections[1], renderIcon: function () { return Be.createElement( "div", { className: "DocSearch-Hit-icon" }, Be.createElement(Sr, null), ); }, renderAction: function (e) { var t = e.item, n = e.runDeleteTransition; return Be.createElement( "div", { className: "DocSearch-Hit-action" }, Be.createElement( "button", { className: "DocSearch-Hit-action-button", title: v, type: "submit", onClick: function (e) { e.preventDefault(), e.stopPropagation(), n(function () { r.favoriteSearches.remove(t), r.refresh(); }); }, }, Be.createElement(vr, null), ), ); }, }), ), ); } var Br = ["translations"], Vr = Be.memo( function (e) { var t = e.translations, n = void 0 === t ? {} : t, r = $e(e, Br); if ("error" === r.state.status) return Be.createElement(Er, { translations: null == n ? void 0 : n.errorScreen, }); var o = r.state.collections.some(function (e) { return e.items.length > 0; }); return r.state.query ? !1 === o ? Be.createElement( Pr, Je({}, r, { translations: null == n ? void 0 : n.noResultsScreen, }), ) : Be.createElement(Hr, r) : Be.createElement( Fr, Je({}, r, { hasCollections: o, translations: null == n ? void 0 : n.startScreen, }), ); }, function (e, t) { return "loading" === t.state.status || "stalled" === t.state.status; }, ), Kr = ["translations"]; function Wr(e) { var t = e.translations, n = void 0 === t ? {} : t, r = $e(e, Kr), o = n.resetButtonTitle, i = void 0 === o ? "Clear the query" : o, c = n.resetButtonAriaLabel, a = void 0 === c ? "Clear the query" : c, u = n.cancelButtonText, l = void 0 === u ? "Cancel" : u, s = n.cancelButtonAriaLabel, f = void 0 === s ? "Cancel" : s, p = n.searchInputLabel, m = void 0 === p ? "Search" : p, d = r.getFormProps({ inputElement: r.inputRef.current }).onReset; return ( Be.useEffect( function () { r.autoFocus && r.inputRef.current && r.inputRef.current.focus(); }, [r.autoFocus, r.inputRef], ), Be.useEffect( function () { r.isFromSelection && r.inputRef.current && r.inputRef.current.select(); }, [r.isFromSelection, r.inputRef], ), Be.createElement( Be.Fragment, null, Be.createElement( "form", { className: "DocSearch-Form", onSubmit: function (e) { e.preventDefault(); }, onReset: d, }, Be.createElement( "label", Je({ className: "DocSearch-MagnifierLabel" }, r.getLabelProps()), Be.createElement(Xe, null), Be.createElement( "span", { className: "DocSearch-VisuallyHiddenForAccessibility" }, m, ), ), Be.createElement( "div", { className: "DocSearch-LoadingIndicator" }, Be.createElement(mr, null), ), Be.createElement( "input", Je( { className: "DocSearch-Input", ref: r.inputRef }, r.getInputProps({ inputElement: r.inputRef.current, autoFocus: r.autoFocus, maxLength: 64, }), ), ), Be.createElement( "button", { type: "reset", title: i, className: "DocSearch-Reset", "aria-label": a, hidden: !r.state.query, }, Be.createElement(vr, null), ), ), Be.createElement( "button", { className: "DocSearch-Cancel", type: "reset", "aria-label": f, onClick: r.onClose, }, l, ), ) ); } var zr = ["_highlightResult", "_snippetResult"]; function Jr(e) { var t = e.key, n = e.limit, r = void 0 === n ? 5 : n, o = (function (e) { return !1 === (function () { var e = "__TEST_KEY__"; try { return ( localStorage.setItem(e, ""), localStorage.removeItem(e), !0 ); } catch (e) { return !1; } })() ? { setItem: function () {}, getItem: function () { return []; }, } : { setItem: function (t) { return window.localStorage.setItem(e, JSON.stringify(t)); }, getItem: function () { var t = window.localStorage.getItem(e); return t ? JSON.parse(t) : []; }, }; })(t), i = o.getItem().slice(0, r); return { add: function (e) { var t = e, n = (t._highlightResult, t._snippetResult, $e(t, zr)), c = i.findIndex(function (e) { return e.objectID === n.objectID; }); c > -1 && i.splice(c, 1), i.unshift(n), (i = i.slice(0, r)), o.setItem(i); }, remove: function (e) { (i = i.filter(function (t) { return t.objectID !== e.objectID; })), o.setItem(i); }, getAll: function () { return i; }, }; } function $r(e) { var t, n = "algoliasearch-client-js-".concat(e.key), r = function () { return void 0 === t && (t = e.localStorage || window.localStorage), t; }, o = function () { return JSON.parse(r().getItem(n) || "{}"); }, i = function (e) { r().setItem(n, JSON.stringify(e)); }; return { get: function (t, n) { var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : { miss: function () { return Promise.resolve(); }, }; return Promise.resolve() .then(function () { !(function () { var t = e.timeToLive ? 1e3 * e.timeToLive : null, n = o(), r = Object.fromEntries( Object.entries(n).filter(function (e) { return void 0 !== c(e, 2)[1].timestamp; }), ); if ((i(r), t)) { var a = Object.fromEntries( Object.entries(r).filter(function (e) { var n = c(e, 2)[1], r = new Date().getTime(); return !(n.timestamp + t < r); }), ); i(a); } })(); var n = JSON.stringify(t); return o()[n]; }) .then(function (e) { return Promise.all([e ? e.value : n(), void 0 !== e]); }) .then(function (e) { var t = c(e, 2), n = t[0], o = t[1]; return Promise.all([n, o || r.miss(n)]); }) .then(function (e) { return c(e, 1)[0]; }); }, set: function (e, t) { return Promise.resolve().then(function () { var i = o(); return ( (i[JSON.stringify(e)] = { timestamp: new Date().getTime(), value: t, }), r().setItem(n, JSON.stringify(i)), t ); }); }, delete: function (e) { return Promise.resolve().then(function () { var t = o(); delete t[JSON.stringify(e)], r().setItem(n, JSON.stringify(t)); }); }, clear: function () { return Promise.resolve().then(function () { r().removeItem(n); }); }, }; } function Zr(e) { var t = a(e.caches), n = t.shift(); return void 0 === n ? { get: function (e, t) { var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : { miss: function () { return Promise.resolve(); }, }; return t() .then(function (e) { return Promise.all([e, n.miss(e)]); }) .then(function (e) { return c(e, 1)[0]; }); }, set: function (e, t) { return Promise.resolve(t); }, delete: function (e) { return Promise.resolve(); }, clear: function () { return Promise.resolve(); }, } : { get: function (e, r) { var o = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : { miss: function () { return Promise.resolve(); }, }; return n.get(e, r, o).catch(function () { return Zr({ caches: t }).get(e, r, o); }); }, set: function (e, r) { return n.set(e, r).catch(function () { return Zr({ caches: t }).set(e, r); }); }, delete: function (e) { return n.delete(e).catch(function () { return Zr({ caches: t }).delete(e); }); }, clear: function () { return n.clear().catch(function () { return Zr({ caches: t }).clear(); }); }, }; } function Qr() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : { serializable: !0 }, t = {}; return { get: function (n, r) { var o = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : { miss: function () { return Promise.resolve(); }, }, i = JSON.stringify(n); if (i in t) return Promise.resolve(e.serializable ? JSON.parse(t[i]) : t[i]); var c = r(), a = (o && o.miss) || function () { return Promise.resolve(); }; return c .then(function (e) { return a(e); }) .then(function () { return c; }); }, set: function (n, r) { return ( (t[JSON.stringify(n)] = e.serializable ? JSON.stringify(r) : r), Promise.resolve(r) ); }, delete: function (e) { return delete t[JSON.stringify(e)], Promise.resolve(); }, clear: function () { return (t = {}), Promise.resolve(); }, }; } function Yr(e) { for (var t = e.length - 1; t > 0; t--) { var n = Math.floor(Math.random() * (t + 1)), r = e[t]; (e[t] = e[n]), (e[n] = r); } return e; } function Gr(e, t) { return t ? (Object.keys(t).forEach(function (n) { e[n] = t[n](e); }), e) : e; } function Xr(e) { for ( var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++ ) n[r - 1] = arguments[r]; var o = 0; return e.replace(/%s/g, function () { return encodeURIComponent(n[o++]); }); } var eo = 0, to = 1; function no(e, t) { var n = e || {}, r = n.data || {}; return ( Object.keys(n).forEach(function (e) { -1 === [ "timeout", "headers", "queryParameters", "data", "cacheable", ].indexOf(e) && (r[e] = n[e]); }), { data: Object.entries(r).length > 0 ? r : void 0, timeout: n.timeout || t, headers: n.headers || {}, queryParameters: n.queryParameters || {}, cacheable: n.cacheable, } ); } var ro = { Read: 1, Write: 2, Any: 3 }; function oo(e) { var n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1; return t(t({}, e), {}, { status: n, lastUpdate: Date.now() }); } function io(e) { return "string" == typeof e ? { protocol: "https", url: e, accept: ro.Any } : { protocol: e.protocol || "https", url: e.url, accept: e.accept || ro.Any, }; } var co = "GET", ao = "POST"; function uo(e, n, r, o) { var i = [], c = (function (e, n) { if (e.method !== co && (void 0 !== e.data || void 0 !== n.data)) { var r = Array.isArray(e.data) ? e.data : t(t({}, e.data), n.data); return JSON.stringify(r); } })(r, o), u = (function (e, n) { var r = t(t({}, e.headers), n.headers), o = {}; return ( Object.keys(r).forEach(function (e) { var t = r[e]; o[e.toLowerCase()] = t; }), o ); })(e, o), l = r.method, s = r.method !== co ? {} : t(t({}, r.data), o.data), f = t( t(t({ "x-algolia-agent": e.userAgent.value }, e.queryParameters), s), o.queryParameters, ), p = 0, m = function t(n, a) { var s = n.pop(); if (void 0 === s) throw { name: "RetryError", message: "Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.", transporterStackTrace: po(i), }; var m = { data: c, headers: u, method: l, url: so(s, r.path, f), connectTimeout: a(p, e.timeouts.connect), responseTimeout: a(p, o.timeout), }, d = function (e) { var t = { request: m, response: e, host: s, triesLeft: n.length }; return i.push(t), t; }, v = { onSuccess: function (e) { return (function (e) { try { return JSON.parse(e.content); } catch (t) { throw (function (e, t) { return { name: "DeserializationError", message: e, response: t, }; })(t.message, e); } })(e); }, onRetry: function (r) { var o = d(r); return ( r.isTimedOut && p++, Promise.all([ e.logger.info("Retryable failure", mo(o)), e.hostsCache.set(s, oo(s, r.isTimedOut ? 3 : 2)), ]).then(function () { return t(n, a); }) ); }, onFail: function (e) { throw ( (d(e), (function (e, t) { var n = e.content, r = e.status, o = n; try { o = JSON.parse(n).message; } catch (n) {} return (function (e, t, n) { return { name: "ApiError", message: e, status: t, transporterStackTrace: n, }; })(o, r, t); })(e, po(i))) ); }, }; return e.requester.send(m).then(function (e) { return (function (e, t) { return (function (e) { var t = e.status; return ( e.isTimedOut || (function (e) { var t = e.isTimedOut, n = e.status; return !t && 0 == ~~n; })(e) || (2 != ~~(t / 100) && 4 != ~~(t / 100)) ); })(e) ? t.onRetry(e) : ((n = e), 2 == ~~(n.status / 100) ? t.onSuccess(e) : t.onFail(e)); var n; })(e, v); }); }; return (function (e, t) { return Promise.all( t.map(function (t) { return e.get(t, function () { return Promise.resolve(oo(t)); }); }), ).then(function (e) { var n = e.filter(function (e) { return (function (e) { return 1 === e.status || Date.now() - e.lastUpdate > 12e4; })(e); }), r = e.filter(function (e) { return (function (e) { return 3 === e.status && Date.now() - e.lastUpdate <= 12e4; })(e); }), o = [].concat(a(n), a(r)); return { getTimeout: function (e, t) { return (0 === r.length && 0 === e ? 1 : r.length + 3 + e) * t; }, statelessHosts: o.length > 0 ? o.map(function (e) { return io(e); }) : t, }; }); })(e.hostsCache, n).then(function (e) { return m(a(e.statelessHosts).reverse(), e.getTimeout); }); } function lo(e) { var t = { value: "Algolia for JavaScript (".concat(e, ")"), add: function (e) { var n = "; " .concat(e.segment) .concat(void 0 !== e.version ? " (".concat(e.version, ")") : ""); return ( -1 === t.value.indexOf(n) && (t.value = "".concat(t.value).concat(n)), t ); }, }; return t; } function so(e, t, n) { var r = fo(n), o = "" .concat(e.protocol, "://") .concat(e.url, "/") .concat("/" === t.charAt(0) ? t.substr(1) : t); return r.length && (o += "?".concat(r)), o; } function fo(e) { return Object.keys(e) .map(function (t) { return Xr( "%s=%s", t, ((n = e[t]), "[object Object]" === Object.prototype.toString.call(n) || "[object Array]" === Object.prototype.toString.call(n) ? JSON.stringify(e[t]) : e[t]), ); var n; }) .join("&"); } function po(e) { return e.map(function (e) { return mo(e); }); } function mo(e) { var n = e.request.headers["x-algolia-api-key"] ? { "x-algolia-api-key": "*****" } : {}; return t( t({}, e), {}, { request: t( t({}, e.request), {}, { headers: t(t({}, e.request.headers), n) }, ), }, ); } var vo = function (e) { return function (t, n) { return t.method === co ? e.transporter.read(t, n) : e.transporter.write(t, n); }; }, ho = function (e) { return function (t) { var n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; return Gr( { transporter: e.transporter, appId: e.appId, indexName: t }, n.methods, ); }; }, yo = function (e) { return function (n, r) { var o = n.map(function (e) { return t(t({}, e), {}, { params: fo(e.params || {}) }); }); return e.transporter.read( { method: ao, path: "1/indexes/*/queries", data: { requests: o }, cacheable: !0, }, r, ); }; }, _o = function (e) { return function (n, r) { return Promise.all( n.map(function (n) { var o = n.params, c = o.facetName, a = o.facetQuery, u = i(o, Ve); return ho(e)(n.indexName, { methods: { searchForFacetValues: So }, }).searchForFacetValues(c, a, t(t({}, r), u)); }), ); }; }, bo = function (e) { return function (t, n, r) { return e.transporter.read( { method: ao, path: Xr("1/answers/%s/prediction", e.indexName), data: { query: t, queryLanguages: n }, cacheable: !0, }, r, ); }; }, go = function (e) { return function (t, n) { return e.transporter.read( { method: ao, path: Xr("1/indexes/%s/query", e.indexName), data: { query: t }, cacheable: !0, }, n, ); }; }, So = function (e) { return function (t, n, r) { return e.transporter.read( { method: ao, path: Xr("1/indexes/%s/facets/%s/query", e.indexName, t), data: { facetQuery: n }, cacheable: !0, }, r, ); }; }; function Oo(e, n, r) { var o = { appId: e, apiKey: n, timeouts: { connect: 1, read: 2, write: 30 }, requester: { send: function (e) { return new Promise(function (t) { var n = new XMLHttpRequest(); n.open(e.method, e.url, !0), Object.keys(e.headers).forEach(function (t) { return n.setRequestHeader(t, e.headers[t]); }); var r, o = function (e, r) { return setTimeout(function () { n.abort(), t({ status: 0, content: r, isTimedOut: !0 }); }, 1e3 * e); }, i = o(e.connectTimeout, "Connection timeout"); (n.onreadystatechange = function () { n.readyState > n.OPENED && void 0 === r && (clearTimeout(i), (r = o(e.responseTimeout, "Socket timeout"))); }), (n.onerror = function () { 0 === n.status && (clearTimeout(i), clearTimeout(r), t({ content: n.responseText || "Network request failed", status: n.status, isTimedOut: !1, })); }), (n.onload = function () { clearTimeout(i), clearTimeout(r), t({ content: n.responseText, status: n.status, isTimedOut: !1, }); }), n.send(e.data); }); }, }, logger: (3, { debug: function (e, t) { return Promise.resolve(); }, info: function (e, t) { return Promise.resolve(); }, error: function (e, t) { return console.error(e, t), Promise.resolve(); }, }), responsesCache: Qr(), requestsCache: Qr({ serializable: !1 }), hostsCache: Zr({ caches: [$r({ key: "4.19.1-".concat(e) }), Qr()] }), userAgent: lo("4.19.1").add({ segment: "Browser", version: "lite" }), authMode: eo, }; return (function (e) { var n = e.appId, r = (function (e, t, n) { var r = { "x-algolia-api-key": n, "x-algolia-application-id": t }; return { headers: function () { return e === to ? r : {}; }, queryParameters: function () { return e === eo ? r : {}; }, }; })(void 0 !== e.authMode ? e.authMode : to, n, e.apiKey), o = (function (e) { var t = e.hostsCache, n = e.logger, r = e.requester, o = e.requestsCache, i = e.responsesCache, a = e.timeouts, u = e.userAgent, l = e.hosts, s = e.queryParameters, f = { hostsCache: t, logger: n, requester: r, requestsCache: o, responsesCache: i, timeouts: a, userAgent: u, headers: e.headers, queryParameters: s, hosts: l.map(function (e) { return io(e); }), read: function (e, t) { var n = no(t, f.timeouts.read), r = function () { return uo( f, f.hosts.filter(function (e) { return 0 != (e.accept & ro.Read); }), e, n, ); }; if (!0 !== (void 0 !== n.cacheable ? n.cacheable : e.cacheable)) return r(); var o = { request: e, mappedRequestOptions: n, transporter: { queryParameters: f.queryParameters, headers: f.headers, }, }; return f.responsesCache.get( o, function () { return f.requestsCache.get(o, function () { return f.requestsCache .set(o, r()) .then( function (e) { return Promise.all([f.requestsCache.delete(o), e]); }, function (e) { return Promise.all([ f.requestsCache.delete(o), Promise.reject(e), ]); }, ) .then(function (e) { var t = c(e, 2); return t[0], t[1]; }); }); }, { miss: function (e) { return f.responsesCache.set(o, e); }, }, ); }, write: function (e, t) { return uo( f, f.hosts.filter(function (e) { return 0 != (e.accept & ro.Write); }), e, no(t, f.timeouts.write), ); }, }; return f; })( t( t( { hosts: [ { url: "".concat(n, "-dsn.algolia.net"), accept: ro.Read }, { url: "".concat(n, ".algolia.net"), accept: ro.Write }, ].concat( Yr([ { url: "".concat(n, "-1.algolianet.com") }, { url: "".concat(n, "-2.algolianet.com") }, { url: "".concat(n, "-3.algolianet.com") }, ]), ), }, e, ), {}, { headers: t( t({}, r.headers()), {}, { "content-type": "application/x-www-form-urlencoded" }, e.headers, ), queryParameters: t(t({}, r.queryParameters()), e.queryParameters), }, ), ), i = { transporter: o, appId: n, addAlgoliaAgent: function (e, t) { o.userAgent.add({ segment: e, version: t }); }, clearCache: function () { return Promise.all([ o.requestsCache.clear(), o.responsesCache.clear(), ]).then(function () {}); }, }; return Gr(i, e.methods); })( t( t(t({}, o), r), {}, { methods: { search: yo, searchForFacetValues: _o, multipleQueries: yo, multipleSearchForFacetValues: _o, customRequest: vo, initIndex: function (e) { return function (t) { return ho(e)(t, { methods: { search: go, searchForFacetValues: So, findAnswers: bo, }, }); }; }, }, }, ), ); } Oo.version = "4.19.1"; var wo = ["footer", "searchBox"]; function Eo(e) { var t = e.appId, n = e.apiKey, r = e.indexName, o = e.placeholder, i = void 0 === o ? "Search docs" : o, c = e.searchParameters, a = e.maxResultsPerGroup, u = e.onClose, l = void 0 === u ? Rr : u, s = e.transformItems, f = void 0 === s ? Nr : s, p = e.hitComponent, m = void 0 === p ? pr : p, d = e.resultsFooterComponent, v = void 0 === d ? function () { return null; } : d, h = e.navigator, y = e.initialScrollY, _ = void 0 === y ? 0 : y, b = e.transformSearchClient, g = void 0 === b ? Nr : b, S = e.disableUserPersonalization, O = void 0 !== S && S, w = e.initialQuery, E = void 0 === w ? "" : w, j = e.translations, P = void 0 === j ? {} : j, I = e.getMissingResultsUrl, D = e.insights, k = void 0 !== D && D, C = P.footer, A = P.searchBox, x = $e(P, wo), N = Ze( Be.useState({ query: "", collections: [], completion: null, context: {}, isOpen: !1, activeItemId: null, status: "idle", }), 2, ), T = N[0], R = N[1], q = Be.useRef(null), L = Be.useRef(null), M = Be.useRef(null), H = Be.useRef(null), U = Be.useRef(null), F = Be.useRef(10), B = Be.useRef( "undefined" != typeof window ? window.getSelection().toString().slice(0, 64) : "", ).current, V = Be.useRef(E || B).current, K = (function (e, t, n) { return Be.useMemo( function () { var r = Oo(e, t); return ( r.addAlgoliaAgent("docsearch", "3.6.1"), !1 === /docsearch.js \(.*\)/.test(r.transporter.userAgent.value) && r.addAlgoliaAgent("docsearch-react", "3.6.1"), n(r) ); }, [e, t, n], ); })(t, n, g), W = Be.useRef( Jr({ key: "__DOCSEARCH_FAVORITE_SEARCHES__".concat(r), limit: 10 }), ).current, z = Be.useRef( Jr({ key: "__DOCSEARCH_RECENT_SEARCHES__".concat(r), limit: 0 === W.getAll().length ? 7 : 4, }), ).current, J = Be.useCallback( function (e) { if (!O) { var t = "content" === e.type ? e.__docsearch_parent : e; t && -1 === W.getAll().findIndex(function (e) { return e.objectID === t.objectID; }) && z.add(t); } }, [W, z, O], ), $ = Be.useCallback( function (e) { if (T.context.algoliaInsightsPlugin && e.__autocomplete_id) { var t = e, n = { eventName: "Item Selected", index: t.__autocomplete_indexName, items: [t], positions: [e.__autocomplete_id], queryID: t.__autocomplete_queryID, }; T.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch( n, ); } }, [T.context.algoliaInsightsPlugin], ), Z = Be.useMemo( function () { return ur({ id: "docsearch", defaultActiveItemId: 0, placeholder: i, openOnFocus: !0, initialState: { query: V, context: { searchSuggestions: [] } }, insights: k, navigator: h, onStateChange: function (e) { R(e.state); }, getSources: function (e) { var o = e.query, i = e.state, u = e.setContext, s = e.setStatus; if (!o) return O ? [] : [ { sourceId: "recentSearches", onSelect: function (e) { var t = e.item, n = e.event; J(t), Tr(n) || l(); }, getItemUrl: function (e) { return e.item.url; }, getItems: function () { return z.getAll(); }, }, { sourceId: "favoriteSearches", onSelect: function (e) { var t = e.item, n = e.event; J(t), Tr(n) || l(); }, getItemUrl: function (e) { return e.item.url; }, getItems: function () { return W.getAll(); }, }, ]; var p = Boolean(k); return K.search([ { query: o, indexName: r, params: We( { attributesToRetrieve: [ "hierarchy.lvl0", "hierarchy.lvl1", "hierarchy.lvl2", "hierarchy.lvl3", "hierarchy.lvl4", "hierarchy.lvl5", "hierarchy.lvl6", "content", "type", "url", ], attributesToSnippet: [ "hierarchy.lvl1:".concat(F.current), "hierarchy.lvl2:".concat(F.current), "hierarchy.lvl3:".concat(F.current), "hierarchy.lvl4:".concat(F.current), "hierarchy.lvl5:".concat(F.current), "hierarchy.lvl6:".concat(F.current), "content:".concat(F.current), ], snippetEllipsisText: "…", highlightPreTag: "", highlightPostTag: "", hitsPerPage: 20, clickAnalytics: p, }, c, ), }, ]) .catch(function (e) { throw ("RetryError" === e.name && s("error"), e); }) .then(function (e) { var o = e.results[0], c = o.hits, s = o.nbHits, m = xr( c, function (e) { return Mr(e); }, a, ); i.context.searchSuggestions.length < Object.keys(m).length && u({ searchSuggestions: Object.keys(m) }), u({ nbHits: s }); var d = {}; return ( p && (d = { __autocomplete_indexName: r, __autocomplete_queryID: o.queryID, __autocomplete_algoliaCredentials: { appId: t, apiKey: n, }, }), Object.values(m).map(function (e, t) { return { sourceId: "hits".concat(t), onSelect: function (e) { var t = e.item, n = e.event; J(t), Tr(n) || l(); }, getItemUrl: function (e) { return e.item.url; }, getItems: function () { return Object.values( xr( e, function (e) { return e.hierarchy.lvl1; }, a, ), ) .map(f) .map(function (e) { return e.map(function (t) { var n = null, r = e.find(function (e) { return ( "lvl1" === e.type && e.hierarchy.lvl1 === t.hierarchy.lvl1 ); }); return ( "lvl1" !== t.type && r && (n = r), We( We({}, t), {}, { __docsearch_parent: n }, d, ) ); }); }) .flat(); }, }; }) ); }); }, }); }, [r, c, a, K, l, z, W, J, V, i, h, f, O, k, t, n], ), Q = Z.getEnvironmentProps, Y = Z.getRootProps, G = Z.refresh; return ( (function (e) { var t = e.getEnvironmentProps, n = e.panelElement, r = e.formElement, o = e.inputElement; Be.useEffect( function () { if (n && r && o) { var e = t({ panelElement: n, formElement: r, inputElement: o }), i = e.onTouchStart, c = e.onTouchMove; return ( window.addEventListener("touchstart", i), window.addEventListener("touchmove", c), function () { window.removeEventListener("touchstart", i), window.removeEventListener("touchmove", c); } ); } }, [t, n, r, o], ); })({ getEnvironmentProps: Q, panelElement: H.current, formElement: M.current, inputElement: U.current, }), (function (e) { var t = e.container; Be.useEffect( function () { if (t) { var e = t.querySelectorAll( "a[href]:not([disabled]), button:not([disabled]), input:not([disabled])", ), n = e[0], r = e[e.length - 1]; return ( t.addEventListener("keydown", o), function () { t.removeEventListener("keydown", o); } ); } function o(e) { "Tab" === e.key && (e.shiftKey ? document.activeElement === n && (e.preventDefault(), r.focus()) : document.activeElement === r && (e.preventDefault(), n.focus())); } }, [t], ); })({ container: q.current }), Be.useEffect(function () { return ( document.body.classList.add("DocSearch--active"), function () { var e, t; document.body.classList.remove("DocSearch--active"), null === (e = (t = window).scrollTo) || void 0 === e || e.call(t, 0, _); } ); }, []), Be.useEffect(function () { window.matchMedia("(max-width: 768px)").matches && (F.current = 5); }, []), Be.useEffect( function () { H.current && (H.current.scrollTop = 0); }, [T.query], ), Be.useEffect( function () { V.length > 0 && (G(), U.current && U.current.focus()); }, [V, G], ), Be.useEffect(function () { function e() { if (L.current) { var e = 0.01 * window.innerHeight; L.current.style.setProperty("--docsearch-vh", "".concat(e, "px")); } } return ( e(), window.addEventListener("resize", e), function () { window.removeEventListener("resize", e); } ); }, []), Be.createElement( "div", Je({ ref: q }, Y({ "aria-expanded": !0 }), { className: [ "DocSearch", "DocSearch-Container", "stalled" === T.status && "DocSearch-Container--Stalled", "error" === T.status && "DocSearch-Container--Errored", ] .filter(Boolean) .join(" "), role: "button", tabIndex: 0, onMouseDown: function (e) { e.target === e.currentTarget && l(); }, }), Be.createElement( "div", { className: "DocSearch-Modal", ref: L }, Be.createElement( "header", { className: "DocSearch-SearchBar", ref: M }, Be.createElement( Wr, Je({}, Z, { state: T, autoFocus: 0 === V.length, inputRef: U, isFromSelection: Boolean(V) && V === B, translations: A, onClose: l, }), ), ), Be.createElement( "div", { className: "DocSearch-Dropdown", ref: H }, Be.createElement( Vr, Je({}, Z, { indexName: r, state: T, hitComponent: m, resultsFooterComponent: v, disableUserPersonalization: O, recentSearches: z, favoriteSearches: W, inputRef: U, translations: x, getMissingResultsUrl: I, onItemClick: function (e, t) { $(e), J(e), Tr(t) || l(); }, }), ), ), Be.createElement( "footer", { className: "DocSearch-Footer" }, Be.createElement(fr, { translations: C }), ), ), ) ); } function jo(e) { var t, n, r = Be.useRef(null), o = Ze(Be.useState(!1), 2), i = o[0], c = o[1], a = Ze(Be.useState((null == e ? void 0 : e.initialQuery) || void 0), 2), u = a[0], l = a[1], s = Be.useCallback( function () { c(!0); }, [c], ), f = Be.useCallback( function () { c(!1); }, [c], ); return ( (function (e) { var t = e.isOpen, n = e.onOpen, r = e.onClose, o = e.onInput, i = e.searchButtonRef; Be.useEffect( function () { function e(e) { var c; ((27 === e.keyCode && t) || ("k" === (null === (c = e.key) || void 0 === c ? void 0 : c.toLowerCase()) && (e.metaKey || e.ctrlKey)) || (!(function (e) { var t = e.target, n = t.tagName; return ( t.isContentEditable || "INPUT" === n || "SELECT" === n || "TEXTAREA" === n ); })(e) && "/" === e.key && !t)) && (e.preventDefault(), t ? r() : document.body.classList.contains("DocSearch--active") || document.body.classList.contains("DocSearch--active") || n()), i && i.current === document.activeElement && o && /[a-zA-Z0-9]/.test(String.fromCharCode(e.keyCode)) && o(e); } return ( window.addEventListener("keydown", e), function () { window.removeEventListener("keydown", e); } ); }, [t, n, r, o, i], ); })({ isOpen: i, onOpen: s, onClose: f, onInput: Be.useCallback( function (e) { c(!0), l(e.key); }, [c, l], ), searchButtonRef: r, }), Be.createElement( Be.Fragment, null, Be.createElement(tt, { ref: r, translations: null == e || null === (t = e.translations) || void 0 === t ? void 0 : t.button, onClick: s, }), i && Ie( Be.createElement( Eo, Je({}, e, { initialScrollY: window.scrollY, initialQuery: u, translations: null == e || null === (n = e.translations) || void 0 === n ? void 0 : n.modal, onClose: f, }), ), document.body, ), ) ); } return function (e) { Ae( Be.createElement( jo, o({}, e, { transformSearchClient: function (t) { return ( t.addAlgoliaAgent("docsearch.js", "3.6.1"), e.transformSearchClient ? e.transformSearchClient(t) : t ); }, }), ), (function (e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : window; return "string" == typeof e ? t.document.querySelector(e) : e; })(e.container, e.environment), ); }; }); //# sourceMappingURL=index.js.map docsearch({ container: "#docsearch", appId: "74VN1YECLR", indexName: "gpt-index", apiKey: "c4b0e099fa9004f69855e474b3e7d3bb", }); ================================================ FILE: docs/api_docs/mkdocs.yml ================================================ docs_dir: docs/api_reference site_url: https://developers.llamaindex.ai/python/workflows-api-reference/ extra: homepage: / extra_css: - _static/css/custom.css - _static/css/algolia.css extra_javascript: - _static/js/algolia.js markdown_extensions: - attr_list - admonition - pymdownx.details - pymdownx.superfences - md_in_html - mkdocs-click - toc: permalink: "#" plugins: - search - include_dir_to_nav - render_swagger - gh-admonitions - mkdocstrings: handlers: python: load_external_modules: false options: allow_inspection: false docstring_options: ignore_init_summary: true docstring_style: google filters: - "!^_" - "!^__init__" members_order: source merge_init_into_class: false show_symbol_type_heading: true show_symbol_type_toc: true separate_signature: true show_root_full_path: true show_root_heading: false show_root_toc_entry: false show_signature_annotations: true signature_crossrefs: true extensions: - griffe_fieldz paths: - ../../workflows - ../../packages/llama-agents-client/src - ../../packages/llama-agents-server/src site_name: LlamaIndex Workflows theme: custom_dir: overrides favicon: _static/assets/LlamaLogoBrowserTab.png features: - navigation.instant - navigation.indexes - navigation.expand - navigation.top - navigation.footer - toc.follow - content.code.copy - search.suggest - search.highlight logo: _static/assets/LlamaSquareBlack.svg name: material palette: - media: (prefers-color-scheme) toggle: icon: material/brightness-auto name: Switch to light mode - accent: purple media: "(prefers-color-scheme: light)" primary: white scheme: default toggle: icon: material/brightness-7 name: Switch to dark mode - accent: purple media: "(prefers-color-scheme: dark)" primary: black scheme: slate toggle: icon: material/brightness-4 name: Switch to system preference ================================================ FILE: docs/api_docs/overrides/main.html ================================================ {% extends "base.html" %} {% block header %} {{ super() }} {% endblock %} ================================================ FILE: docs/api_docs/overrides/partials/copyright.html ================================================ ================================================ FILE: docs/api_docs/overrides/partials/search.html ================================================ {% import "partials/language.html" as lang with context %}
================================================ FILE: docs/api_docs/pyproject.toml ================================================ [build-system] requires = ["hatchling"] build-backend = "hatchling.build" [project] name = "docs" version = "0.1.0" description = "" authors = [{name = "Your Name", email = "you@example.com"}] requires-python = ">=3.10" readme = "README.md" dependencies = [ "llama-index-workflows[server,client]", "mkdocs>=1.6.1,<2", "mkdocstrings[python]>=0.26.1,<1", "mkdocs-include-dir-to-nav>=1.2.0,<2", "mkdocs-material>=9.5.39,<10", "mkdocs-redirects>=1.2.1,<2", "mkdocs-click>=0.8.1,<1", "mkdocs-render-swagger-plugin>=0.1.2,<1", "griffe-fieldz>=0.2.0,<1", "mkdocs-github-admonitions-plugin>=0.0.3,<1", "pymdown-extensions>=10.21.2" ] [tool.uv] package = false [tool.uv.sources] llama-index-workflows = {workspace = true} llama-agents-client = {workspace = true} ================================================ FILE: docs/src/components/Header.astro ================================================ --- import config from 'virtual:starlight/user-config'; import LanguageSelect from 'virtual:starlight/components/LanguageSelect'; import Search from 'virtual:starlight/components/Search'; import SiteTitle from 'virtual:starlight/components/SiteTitle'; import SocialIcons from 'virtual:starlight/components/SocialIcons'; import ThemeSelect from 'virtual:starlight/components/ThemeSelect'; /** * Render the `Search` component if Pagefind is enabled or the default search component has been overridden. */ const shouldRenderSearch = config.pagefind || config.components.Search !== '@astrojs/starlight/components/Search.astro'; ---
{shouldRenderSearch && }
================================================ FILE: docs/src/components/HomepageFeatures/index.js ================================================ import clsx from 'clsx'; import Heading from '@theme/Heading'; import styles from './styles.module.css'; const FeatureList = [ { title: 'Easy to Use', Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default, description: ( <> Docusaurus was designed from the ground up to be easily installed and used to get your website up and running quickly. ), }, { title: 'Focus on What Matters', Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default, description: ( <> Docusaurus lets you focus on your docs, and we'll do the chores. Go ahead and move your docs into the docs directory. ), }, { title: 'Powered by React', Svg: require('@site/static/img/undraw_docusaurus_react.svg').default, description: ( <> Extend or customize your website layout by reusing React. Docusaurus can be extended while reusing the same header and footer. ), }, ]; function Feature({Svg, title, description}) { return (
{title}

{description}

); } export default function HomepageFeatures() { return (
{FeatureList.map((props, idx) => ( ))}
); } ================================================ FILE: docs/src/components/HomepageFeatures/styles.module.css ================================================ .features { display: flex; align-items: center; padding: 2rem 0; width: 100%; } .featureSvg { height: 200px; width: 200px; } ================================================ FILE: docs/src/components/ProtectedContent.jsx ================================================ import React, { useState, useEffect } from 'react'; const SELF_HOSTING_PASSWORD = 'llamacloud-self-host-2025'; const STORAGE_KEY = 'llamacloud-self-hosting-auth'; export default function ProtectedContent({ children }) { const [isAuthenticated, setIsAuthenticated] = useState(false); const [password, setPassword] = useState(''); const [error, setError] = useState(''); const [isLoading, setIsLoading] = useState(true); useEffect(() => { // Check if user is already authenticated const savedAuth = localStorage.getItem(STORAGE_KEY); if (savedAuth === 'true') { setIsAuthenticated(true); } setIsLoading(false); }, []); const handleSubmit = (e) => { e.preventDefault(); if (password === SELF_HOSTING_PASSWORD) { setIsAuthenticated(true); localStorage.setItem(STORAGE_KEY, 'true'); setError(''); } else { setError('Incorrect password. Please try again.'); setPassword(''); } }; const handleLogout = () => { setIsAuthenticated(false); localStorage.removeItem(STORAGE_KEY); setPassword(''); }; if (isLoading) { return
Loading...
; } if (!isAuthenticated) { return (

Self-Hosting Documentation Access

This section requires a password to access. Interested in self-hosting? Contact sales to learn more.

setPassword(e.target.value)} style={{ width: '100%', padding: '0.5rem', border: '1px solid #ccc', borderRadius: '4px', fontSize: '1rem' }} required />
{error && (

{error}

)}
); } return (
Self-Hosting Documentation Access Granted
{children}
); } ================================================ FILE: docs/src/components/ProtectedTabs.jsx ================================================ const ProtectedTabs = ({ children }) => { return (
{children}
); }; const ProtectedTabItem = ({ label, value, children }) => { return
{children}
; }; export { ProtectedTabs, ProtectedTabItem }; ================================================ FILE: docs/src/components/SiteTitle.astro ================================================ --- import { logos } from 'virtual:starlight/user-images'; import config from 'virtual:starlight/user-config'; const { siteTitle, siteTitleHref } = Astro.locals.starlightRoute; --- { config.logo && logos.dark && ( <> {config.logo.alt} {/* Show light alternate if a user configure both light and dark logos. */} {!('src' in config.logo) && ( {config.logo.alt} )} ) } {siteTitle} ================================================ FILE: docs/src/components/llamaExtract.js ================================================ import React from 'react'; export const LEPython = ({children}) => ( <> In Python:
extractor = LlamaExtract(
  {children}
)
) export const LEAPI = ({children, endpoint = "", isUpload=false, outputFile=false}) => { if (!endpoint) endpoint = "parsing/upload" let outputLine = <> if (outputFile) outputLine = <>  \
  --output "file.png" let uploadLine = <> if (isUpload) uploadLine = <>  \
  -F 'file=@/path/to/your/file.pdf;type=application/pdf' let paramList = <> if(typeof children == "string") { let entries = children.split("|") paramList = entries.map((line) => { return <> \
  --form '{line}' }) } return ( <> Using the API:
curl -X 'POST' \
  'https://api.cloud.llamaindex.ai/api/{endpoint}'  \
  -H 'accept: application/json' \
  -H 'Content-Type: multipart/form-data' \
  -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" {paramList} {uploadLine} {outputLine}
) } ================================================ FILE: docs/src/components/llamaParse.js ================================================ import React from 'react'; export const LPPython = ({children}) => ( <> In Python:
parser = LlamaParse(
  {children}
)
) export const LPAPI = ({children, endpoint = "", isUpload=false, outputFile=false}) => { if (!endpoint) endpoint = "upload" let outputLine = <> if (outputFile) outputLine = <>  \
  --output "file.png" let uploadLine = <> if (isUpload) uploadLine = <>  \
  -F 'file=@/path/to/your/file.pdf;type=application/pdf' let paramList = <> if(typeof children !== "undefined") { // Get the raw text content of children let rawContent = ""; if (typeof children === "string") { rawContent = children; } else { // For React elements, get their text content // this is because React interprets key-value pairs with URLs as prop values rawContent = React.Children.toArray(children) .map(child => { if (typeof child === "string") return child; if (React.isValidElement(child)) return child.props.children || ""; return ""; }) .join(""); } // Split by | if multiple parameters const entries = rawContent.split("|"); paramList = entries.map((line) => { return <> \
  --form '{line.trim()}' }); } return ( <> Using the API:
curl -X 'POST' \
  'https://api.cloud.llamaindex.ai/api/v1/parsing/{endpoint}'  \
  -H 'accept: application/json' \
  -H 'Content-Type: multipart/form-data' \
  -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" {paramList} {uploadLine} {outputLine}
) } ================================================ FILE: docs/src/components/mdx_components.jsx ================================================ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import { Children, cloneElement } from 'react'; export const StyledTitle = ({ title, subtitle }) => { return (

{title}

{subtitle && {subtitle}}
); } export const StyledTab = ({ children }) => { return ( {Children.map(children, (child) => { if (child.type !== TabItem) return child; return cloneElement(child, { children: (
{child.props.children}
), }); })}
); }; export const ImageSizer = ({ children, width = '350px' }) => { return (
{children}
); }; ================================================ FILE: docs/src/content/docs/llamaagents/_meta.yml ================================================ label: Agents collapsed: true hidden: false order: 5.5 ================================================ FILE: docs/src/content/docs/llamaagents/cloud/_meta.yml ================================================ label: Cloud collapsed: true hidden: false order: 2 ================================================ FILE: docs/src/content/docs/llamaagents/cloud/agent-data-overview.md ================================================ --- title: Agent Data sidebar: order: 30 --- :::caution Cloud deployments of LlamaAgents are now in beta preview and broadly available for feedback. You can try them out locally or deploy to LlamaCloud and send us feedback with the in-app button. ::: ### What is Agent Data? Skip the database setup. LlamaAgents workflows and JavaScript UIs share a persistent Agent Data store built into the LlamaCloud API. It uses the same authentication as the rest of the API. Agent Data is a queryable store for JSON records produced by your agents. Each record is linked to a `deployment_name` (the deployed agent) and an optional `collection` (a logical bucket; defaults to `default`). Use it to persist extractions, events, metrics, and other structured output, then search and aggregate across records. Key concepts: - **deployment_name**: the identifier of the agent deployment the data belongs to. Access is authorized against that agent's project. - **collection**: a logical namespace within an agent for organizing different data types or apps. Storage is JSON. We recommend storing homogeneous data types within a single collection. - **data**: the JSON payload shaped by your app. SDKs provide typed wrappers. Important behavior and constraints: - **Deployment required**: The `deployment_name` must correspond to an existing deployment. Data is associated with that deployment and its project. - **Local development**: When running locally, omit `deployment_name` to use the shared `_public` Agent Data store. Use distinct `collection` names to separate apps during local development. - **Access control**: You can only read/write data for agents in projects you can access. `_public` data is visible across agents within the same project. ### SDK Reference For CRUD operations, search, filtering, sorting, aggregation, and deletion, see the generated SDK reference: **[Agent Data API Reference](https://developers.llamaindex.ai/reference/resources/beta/subresources/agent_data/)** The reference covers all available operations: - **Create / Get / Update / Delete** individual records - **Search** with filtering, sorting, and pagination - **Aggregate** by grouping fields with counts and first-item retrieval - **Delete by query** for bulk deletion using the filter DSL SDK packages: - **Python**: [`llama-cloud`](https://pypi.org/project/llama-cloud/) (`pip install 'llama-cloud>=1'`) - **JavaScript**: [`@llamaindex/llama-cloud`](https://www.npmjs.com/package/@llamaindex/llama-cloud) (`npm install @llamaindex/llama-cloud`) ### ExtractedData wrapper `ExtractedData` is a specialized wrapper type available in the Python SDK (`llama-cloud`) and the JavaScript UI library (`@llamaindex/ui`). It is not part of the generated API reference, so it is documented here. `ExtractedData[T]` is designed for extraction workflows where data goes through review and approval stages. Use it as the type parameter when storing extraction results in Agent Data. **Fields:** | Field | Description | |-------|-------------| | `original_data` | The data as originally extracted (preserved for change tracking) | | `data` | The current state of the data (updated by human review) | | `status` | Workflow status: `pending_review`, `accepted`, `rejected`, `error`, or custom string | | `overall_confidence` | Aggregated confidence score (auto-calculated from field_metadata) | | `field_metadata` | Dict mapping field paths to metadata including confidence scores and citations | | `file_id` | LlamaCloud file ID of the source document | | `file_name` | Name of the source file | | `file_hash` | Content hash for deduplication | | `metadata` | Additional application-specific metadata | **Python usage:** ```python from pydantic import BaseModel from llama_cloud.types.beta.extracted_data import ExtractedData class Invoice(BaseModel): vendor: str | None = None total: float | None = None date: str | None = None ``` Use the `client.beta.agent_data` resource to store `ExtractedData` records. The data is serialized as a JSON dict matching the `ExtractedData` shape. **Creating from an extraction job:** The `from_extract_job` factory method creates an `ExtractedData` instance directly from a completed `ExtractV2Job`, automatically capturing field metadata (confidence scores, citations): ```python from llama_cloud.types.beta.extracted_data import ExtractedData extracted = ExtractedData.from_extract_job( job=extract_job, schema=Invoice, ) await client.beta.agent_data.create( data=extracted.model_dump(), deployment_name=deployment_name, collection="invoices", ) ``` **Creating manually:** Use `ExtractedData.create` when constructing extracted data from other sources or transforming to a different schema: ```python from llama_cloud.types.beta.extracted_data import ExtractedData invoice = Invoice(vendor="Acme Corp", total=1500.00, date="2024-01-15") extracted = ExtractedData.create( data=invoice, status="pending_review", file_id="file-abc123", file_name="invoice.pdf", file_hash="sha256:...", field_metadata={ "vendor": {"confidence": 0.95, "citation": [{"page": 1, "matching_text": "Acme Corp"}]}, "total": {"confidence": 0.92}, }, ) ``` **JavaScript / TypeScript usage:** In `@llamaindex/ui`, `ExtractedData` is available as a TypeScript type for use in UI components that display extraction results with review workflows. ================================================ FILE: docs/src/content/docs/llamaagents/cloud/builder.md ================================================ --- title: Agent Builder sidebar: order: 10 --- Agent Builder is a natural language interface for creating document workflows in LlamaCloud. Describe what you want to extract from your documents in plain English, and an AI coding agent generates a complete workflow you can deploy with a few clicks. The generated code is yours. It's a real Python project in your GitHub repository that you can customize, extend, or deploy on your own infrastructure. ![Agent Builder UI](./assets/agent-builder.jpg) ## How It Works Agent Builder transforms your descriptions into working document pipelines: 1. **Describe** your extraction needs in plain English 2. **Review** the generated workflow code and visual graph 3. **Deploy** to LlamaCloud, or take the code and run it on your own infrastructure The agent understands LlamaCloud services and can configure extraction schemas, classification rules, and multi-step pipelines through conversation.